Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 8.4.0 #401

Merged
merged 46 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
298831e
feat: simplify and amke more efficient reader-lib models
jouwdan Jul 24, 2023
f3849bc
feat: optimise course service
jouwdan Jul 24, 2023
33f468a
feat: make handleAuthentication async
jouwdan Jul 24, 2023
4634f83
feat: optimise analytics service
jouwdan Jul 24, 2023
8b87961
fix: optimise sweep and purge
jouwdan Jul 27, 2023
e71ff6c
fix: directly get iterable of listeners without accessing keys
jouwdan Jul 27, 2023
79cd7c8
feat: optimise lo utils
jouwdan Jul 27, 2023
a842983
feat: optimise course utils
jouwdan Jul 27, 2023
d5902c4
fix: cypress setup
jouwdan Jul 28, 2023
14f028a
fix: prettier and config files
jouwdan Jul 29, 2023
f73645f
style: enforce code styling
jouwdan Jul 29, 2023
e544614
first draft of tutors-gen lib
edeleastar Aug 1, 2023
0d0f1ce
adjustments to support tutors-gen-lib
edeleastar Aug 1, 2023
e32e74d
first draft of tutors-gen-html
edeleastar Aug 1, 2023
abefd72
revised tasks and launch configs for tutors-gen-lib
edeleastar Aug 1, 2023
50040ba
feat: almost complete html generator
edeleastar Aug 3, 2023
f08449b
refactor: simplify emitter
edeleastar Aug 3, 2023
1d04c2b
refactor: simplify package structure + support archives
edeleastar Aug 3, 2023
2ee1c98
fix: lab current step highlight
edeleastar Aug 4, 2023
89dea74
feature: implement sorting
edeleastar Aug 4, 2023
b35533e
fix: renable icons, colours + title bar behaviour
edeleastar Aug 4, 2023
df9a7cc
refactor: package tidy up
edeleastar Aug 4, 2023
a021f70
Merge pull request #388 from tutors-sdk/tutors-gen-lib
edeleastar Aug 4, 2023
a3a5940
fix: version number + package names corrections
edeleastar Aug 4, 2023
1239a8a
Github issue: #385 Cypress Tests, A basic test to see if the Course t…
20041540MichaelKelly Aug 4, 2023
085fa4f
Github issue: #385 remove the video created of the test
20041540MichaelKelly Aug 4, 2023
78baef4
Merge pull request #389 from 20041540MichaelKelly/feat/cypress_testing
edeleastar Aug 5, 2023
9fbc830
refactor: remove redundant libs + rename core generator components
edeleastar Aug 5, 2023
725476d
fix: version updates
edeleastar Aug 5, 2023
c1d8346
fix: revert svelte config issues causing failure to launch
edeleastar Aug 5, 2023
ffa4394
Merge pull request #394 from tutors-sdk/tutors-generators-refactor
edeleastar Aug 5, 2023
2ac4d95
fix: support units as direct children of course lo
edeleastar Aug 7, 2023
eb1a607
refactor: simplify breadcrumbs + support units on home page correctly
edeleastar Aug 7, 2023
b8ed21e
fix: breadcrumb anjustments
edeleastar Aug 7, 2023
4ec5f46
chore: bump all versions to 3.0.5, 1.0.5
edeleastar Aug 8, 2023
8977e15
fix: issue https://github.com/tutors-sdk/tutors/issues/386
edeleastar Aug 8, 2023
d7d7a18
refactor: restructure package structure + version managememt
edeleastar Aug 10, 2023
fae0554
fix: missing markdown import
edeleastar Aug 10, 2023
26d2efc
refactor: re-enable strict type checking
edeleastar Aug 11, 2023
28444d2
refactor: introduce course, panel and units types. Simplify builder
edeleastar Aug 11, 2023
39a5a8a
version: bump to 3.0.11
edeleastar Aug 11, 2023
77e301c
feature: walls feature progression
edeleastar Aug 12, 2023
7c50951
feature: wall completed first functional version
edeleastar Aug 12, 2023
d68d8a4
version: publish 3.0.12
edeleastar Aug 12, 2023
09e8567
cypress-testing#398 - This branch, we do extensive testing on the sta…
20041540MichaelKelly Aug 13, 2023
d8438ff
Merge pull request #400 from 20041540MichaelKelly/feat/Cypress-Tests/…
edeleastar Aug 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@


# generated files from ts sources in specific ts only modules
**/cli/tutors-html/src/**/*.js
**/cli/tutors-html/src/**/*.js.map
**/cli/tutors-html/src/**/*.d.ts
**/cli/tutors-json/src/**/*.js
**/cli/tutors-json/src/**/*.js.map
**/cli/tutors-json/src/**/*.d.ts
**/cli/tutors-gen/src/**/*.js
**/cli/tutors-gen/src/**/*.js.map
**/cli/tutors-gen/src/**/*.d.ts
**/cli/tutors-time/src/**/*.js
**/cli/tutors-time/src/**/*.js.map
**/cli/tutors-time/src/**/*.d.ts
**/packages/tutors-lib/src/**/*.js
**/packages/tutors-lib/src/**/*.js.map
**/packages/tutors-lib/src/**/*.d.ts
**/cli/tutors-gen-lib/src/**/*.js
**/cli/tutors-gen-lib/src/**/*.js.map
**/cli/tutors-gen-lib/src/**/*.d.ts
**/cli/tutors-publish/src/**/*.js
**/cli/tutors-publish/src/**/*.js.map
**/cli/tutors-publish/src/**/*.d.ts
**/cli/tutors-publish-html/src/**/*.js
**/cli/tutors-publish-html/src/**/*.js.map
**/cli/tutors-publish-html/src/**/*.d.ts
**/test/reference-course/json
**/test/reference-course/public-site

Expand Down
44 changes: 16 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,28 @@
"version": "0.1.0",
"configurations": [
{
"name": "tutors-json",
"program": "${workspaceFolder}//cli/tutors-json/src/tutors-json.js",
"name": "tutors-publish",
"program": "${workspaceFolder}//cli/tutors-publish/src/tutors-publish.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"cwd": "${workspaceFolder}/test/reference-course"
},
{
"name": "tutors-gen",
"program": "${workspaceFolder}//cli/tutors-gen/src/tutors-gen.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/test/reference-course",
//"cwd": "${workspaceFolder}/test/reference-course",
"cwd": "/Users/edeleastar/repos/tutors/courses/tutors-reference-course",
"console": "integratedTerminal"
// "cwd": "/Users/edeleastar/repos/modules/hdip/2022/course-portfolio-2022"
//"cwd": "/Users/edeleastar/repos/modules/hdip/2021/sem-3/full-stack-web-dev-2021"
},
{
"name": "tutors-html",
"program": "${workspaceFolder}//cli/tutors-html/src/tutors-html.js",
"name": "tutors-publish-html",
"program": "${workspaceFolder}//cli/tutors-publish-html/src/tutors-publish-html.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"skipFiles": [
"<node_internals>/**"
],
"type": "node",
"cwd": "${workspaceFolder}/test/reference-course"
},
{
"name": "tutors-time",
"program": "${workspaceFolder}//cli/tutors-time/src/tutors-time.js",
"request": "launch",
"skipFiles": ["<node_internals>/**"],
"type": "node",
"cwd": "${workspaceFolder}/cli/tutors-time"
//"cwd": "${workspaceFolder}/test/reference-course",
"cwd": "/Users/edeleastar/repos/tutors/courses/tutors-reference-course",
"console": "integratedTerminal"
},
{
"type": "chrome",
Expand All @@ -54,5 +43,4 @@
}
]
}

/* /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 */
/* /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 */
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"task.allowAutomaticTasks": "on",
"editor.formatOnSave": true,
"files.exclude": {
"**/*.js": { "when": "$(basename).ts" },
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map": true,
"**/*.d.ts": true,
"**/node_modules": true,
Expand All @@ -12,4 +14,4 @@
"**/package-lock.json": true,
"**/.github": true
}
}
}
48 changes: 16 additions & 32 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,42 @@
"tasks": [
{
"type": "typescript",
"tsconfig": "cli/tutors-json/tsconfig.json",
"tsconfig": "cli/tutors-gen-lib/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc: watch - cli/tutors-json/tsconfig.json",
"label": "tsc: watch - cli/tutors-gen-lib/tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "typescript",
"tsconfig": "cli/tutors-html/tsconfig.json",
"tsconfig": "cli/tutors-publish/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc: watch - cli/tutors-html/tsconfig.json",
"label": "tsc: watch - cli/tutors-publish/tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "typescript",
"tsconfig": "cli/tutors-gen/tsconfig.json",
"tsconfig": "cli/tutors-publish-html/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc: watch - cli/tutors-gen/tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "typescript",
"tsconfig": "cli/tutors-time/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"group": "build",
"label": "tsc: watch - cli/tutors-time/tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
},
{
"type": "typescript",
"tsconfig": "packages/tutors-lib/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"group": "build",
"label": "tsc: watch - packages/tutors-lib/tsconfig.json",
"label": "tsc: watch - cli/tutors-publish-html/tsconfig.json",
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
}
6 changes: 2 additions & 4 deletions apps/course/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.DS_Store
.svelte-kit
node_modules
.netlify
apps/course/build
/test/reference-course
/build
/.svelte-kit
/package
.env
.env.*
Expand Down
10 changes: 6 additions & 4 deletions apps/course/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"singleQuote": false,
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 180,
"svelteStrictMode": true,
"bracketSameLine": true
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
36 changes: 36 additions & 0 deletions apps/course/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { defineConfig } from "cypress";
import pkg from 'cy-verify-downloads'; //The cypress-verify-download plugin
const { verifyDownloadTasks } = pkg;

export default defineConfig({
env: {
FAIL_FAST_STRATEGY: "run",
FAIL_FAST_ENABLED: true
},
e2e: {
async setupNodeEvents(on, config) {
// The below is needed to store the downloaded folder/file in the correction location
// for the plugin to check if it has downloaded in the correct default location
// A known issue with cypress
on('before:browser:launch', (browser = {}, options) => {
if (browser.family === 'chromium') {
options.preferences.default['download'] = { default_directory: config['downloadsFolder'].replace(/\\/g, "\\\\") }
return options
}
if (browser.family === 'firefox') {
options.preferences['browser.download.folderList'] = 2;
options.preferences['browser.download.dir'] = config['downloadsFolder'].replace(/\\/g, "\\\\");
return options;
}
});
on('task', verifyDownloadTasks); //This is for the cy-verify-download plugin
const cypressFailFastPlugin = await import("cypress-fail-fast/plugin");
cypressFailFastPlugin.default(on, config);
return config;
},
//Replace with the url that you are using
//baseUrl: "https://reader.tutors.dev/course/tutors-cypress-testing",
baseUrl: "https://tutors-reference-course-html.netlify.app/",
specPattern: "cypress/e2e/**/**.cy.ts"
}
});
Binary file added apps/course/cypress/downloads/archive.zip
Binary file not shown.
80 changes: 80 additions & 0 deletions apps/course/cypress/e2e/tutorsHtmlGenerator.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/// <reference types="cypress" />

let course: any = null;

describe("Loading the JSON fixture", function () {
before(function () {
//passing through the tutors json to be ingested and iterate over each objetc and assign out to c
cy.fixture("static-tutors.json").then((c: any) => {
course = c;
});
cy.on("fail", (err, runnable) => {
cy.log(err.message);
return false;
});
});

beforeEach('Check: Define the dimensions of the screen being used', function () {
//This defines the dimensions of the screen
cy.viewport(1440, 1440);
//this is a dyamic way of passing through the url which is defined in the
//cypress.config.ts file.
cy.visit(course.route);
});

/**
* This test case is checking that the headers and summary are present on all the
* cards. You would expect all to match as it is coming from the JSON fixture
*/
it('Course Reference page', function () {
// Test case
cy.visit(course.route);
cy.wait(500);
cy.get('.p-3.shadow-lg.bg-neutral.text-neutral-content.rounded-box.nav-corner.mb-1.justify-start.z-40.flex.mt-2').contains(course.title.trim());
cy.wait(1000);
cy.get('div.ml-4.flex-nowrap').should('include.text', course.title.trim());
course.los.forEach((topic) => {
if (!topic.hide) {
cy.get('.card-title').should('include.text', topic.title.trim())
cy.get('.card-body').should('include.text', topic.summary.trim())
}
});
cy.get('[class="btn btn-sm"]').should("exist");
cy.contains('[data-testid="drawer"]').should("not.exist");
});


it("Topics", function () {
course.los.forEach((topic) => {
if (!topic.hide) {
console.log(topic);
cy.clickStaticCard(topic);
cy.wait(500);
cy.go("back");
cy.wait(500);
}
});
});

it("Deep Topics", function () {

course.los.forEach((topic) => {
if (!topic.hide) {
cy.wait(500);
cy.clickStaticCard(topic);
topic.los.forEach((lo) => {
cy.clickStaticCard(lo);
lo.los.forEach((l) => {
cy.clickStaticCard(l);
});
cy.clickStaticBreadCrumb(1)
});
cy.clickStaticBreadCrumb(0)
}
});
});

it('Verify the folder downloaded', () => {
cy.verifyDownload('\\archive.zip', { timeout: 2500 });
});
});
Loading
Loading