From a7ffbbecdafb915dadd46cc63a60a2d5af3a97e5 Mon Sep 17 00:00:00 2001 From: Camus1859 Date: Sat, 4 Dec 2021 16:50:05 -0500 Subject: [PATCH 01/32] fix: checking response status --- cypress/integration/student_demonstrations_growth.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cypress/integration/student_demonstrations_growth.js b/cypress/integration/student_demonstrations_growth.js index 763229a8c..8864ee296 100644 --- a/cypress/integration/student_demonstrations_growth.js +++ b/cypress/integration/student_demonstrations_growth.js @@ -45,9 +45,8 @@ describe.skip('Student competency growth calculation test', () => { cy.visit(`/cbl/dashboards/demonstrations/student#${studentUsername}/${studentContentArea}`); // ensure that API has loaded required data cy.wait('@studentCompetencyData') - .its('status') - .should('be', 200) - .then(() => { + .then((res) => { + expect(res.status).to.eq(200) const studentCompetencySuffixes = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]); studentCompetencySuffixes.forEach(studentCompetencySuffix => { From 9728e54fd9d37f771d54d1c7f6060eabc3690b35 Mon Sep 17 00:00:00 2001 From: Nafis Bey Date: Sun, 5 Dec 2021 12:48:26 -0500 Subject: [PATCH 02/32] fix(e2e): re-enable `student_demonstrations_growth` test - replace `null` growth values with `0` --- .../student-competency-calculations.json | 12 ++++++------ .../integration/student_demonstrations_growth.js | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/fixtures/student-competency-calculations.json b/cypress/fixtures/student-competency-calculations.json index d28bf8332..5c9d316b9 100644 --- a/cypress/fixtures/student-competency-calculations.json +++ b/cypress/fixtures/student-competency-calculations.json @@ -38,7 +38,7 @@ "ELA.2": { "baseline": null, "average": "7.3", - "growth": null, + "growth": "0", "progress": "40" }, "ELA.3": { @@ -56,13 +56,13 @@ "ELA.5": { "baseline": null, "average": "7.4", - "growth": null, + "growth": "0", "progress": "83" }, "ELA.6": { "baseline": null, "average": "8", - "growth": null, + "growth": "0", "progress": "33" }, "ELA.7": { @@ -82,7 +82,7 @@ "SS.2": { "baseline": null, "average": "8", - "growth": null, + "growth": "0", "progress": "50" } }, @@ -102,7 +102,7 @@ "SCI.3": { "baseline": "9.7", "average": "7", - "growth": null, + "growth": "0", "progress": "33" }, "SCI.4": { @@ -116,7 +116,7 @@ "HOS.4": { "baseline": "9", "average": "9.3", - "growth": null, + "growth": "0", "progress": "100" } } diff --git a/cypress/integration/student_demonstrations_growth.js b/cypress/integration/student_demonstrations_growth.js index 8864ee296..db8fdcae8 100644 --- a/cypress/integration/student_demonstrations_growth.js +++ b/cypress/integration/student_demonstrations_growth.js @@ -1,4 +1,4 @@ -describe.skip('Student competency growth calculation test', () => { +describe('Student competency growth calculation test', () => { // load sample database before tests before(() => { @@ -45,17 +45,17 @@ describe.skip('Student competency growth calculation test', () => { cy.visit(`/cbl/dashboards/demonstrations/student#${studentUsername}/${studentContentArea}`); // ensure that API has loaded required data cy.wait('@studentCompetencyData') - .then((res) => { - expect(res.status).to.eq(200) + .its('status') + .should('eq', 200) + .then(() => { - const studentCompetencySuffixes = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]); - studentCompetencySuffixes.forEach(studentCompetencySuffix => { + const studentCompetencies = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]); + studentCompetencies.forEach(studentCompetency => { // ensure competency card elements have rendered cy.get('li.slate-demonstrations-student-competencycard') .then(() => { - const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentContentArea}.${studentCompetencySuffix}"}`); - - compareCompetencyValues(`${studentContentArea}.${studentCompetencySuffix}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetencySuffix]); + const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentCompetency}"}`); + compareCompetencyValues(`${studentCompetency}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetency]); }); }); }); From 6a554134b97cbe2cd1574f6aec2e4dc526df7608 Mon Sep 17 00:00:00 2001 From: Camus1859 Date: Sun, 5 Dec 2021 14:54:01 -0500 Subject: [PATCH 03/32] refactor: added new student competencies --- .../student-competency-calculations.json | 158 ++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/cypress/fixtures/student-competency-calculations.json b/cypress/fixtures/student-competency-calculations.json index 5c9d316b9..e1031a813 100644 --- a/cypress/fixtures/student-competency-calculations.json +++ b/cypress/fixtures/student-competency-calculations.json @@ -27,6 +27,22 @@ } } }, + "student2":{ + "ELA":{ + "ELA.2":{ + "baseline":"9", + "average":null, + "growth": "0", + "progress":"0" + }, + "ELA.3":{ + "baseline":"9", + "average":"9", + "growth": "0", + "progress":"33" + } + } + }, "student3": { "ELA": { "ELA.1": { @@ -120,5 +136,147 @@ "progress": "100" } } + }, + "student4":{ + "ELA":{ + "ELA.1":{ + "baseline":null, + "average":"6", + "growth":"0" , + "progress":"33" + }, + "ELA.2":{ + "baseline":null, + "average":"6", + "growth":"0" , + "progress":"40" + }, + "ELA.3":{ + "baseline":null, + "average":"7", + "growth":"1" , + "progress":"100" + }, + "ELA.4":{ + "baseline":null, + "average":"6.7", + "growth":"1" , + "progress":"100" + }, + "ELA.5":{ + "baseline":null, + "average":"7", + "growth":"1" , + "progress":"83" + }, + "ELA.6":{ + "baseline":null, + "average":"7", + "growth":"0" , + "progress":"33" + }, + "ELA.7":{ + "baseline":null, + "average":"6.4", + "growth":"0", + "progress":"63" + } + }, + "SCI":{ + "SCI.1":{ + "baseline":null, + "average":"6.6", + "growth":"0", + "progress":"38" + }, + "SCI.3":{ + "baseline":null, + "average":null, + "growth":"0", + "progress":"0" + } + }, + "NGE":{ + "NGE.1":{ + "baseline":null, + "average":"9.4", + "growth":"-1.3", + "progress":"35" + } + }, + "HOS":{ + "HOS.1":{ + "baseline":null, + "average":"9.1", + "growth":"0", + "progress":"45" + } + }, + "HW":{ + "HW.1":{ + "baseline":null, + "average":"8", + "growth":"0", + "progress":"33" + }, + "HW.2":{ + "baseline":null, + "average":"8.4", + "growth":"0", + "progress":"42" + }, + "HW.3":{ + "baseline":null, + "average":"9.2", + "growth":"2.5", + "progress":"56" + } + } + }, + "student5":{ + "ELA":{ + "ELA.1":{ + "baseline":"5", + "average":"6.5", + "growth":"1.5", + "progress":"33" + }, + "ELA.2":{ + "baseline":"5", + "average":"7", + "growth":"2", + "progress":"40" + }, + "ELA.3":{ + "baseline":5, + "average":"8.2", + "growth":"3.2", + "progress":"100" + }, + "ELA.4":{ + "baseline":"5", + "average":"7.5", + "growth":"2.5", + "progress":"100" + }, + "ELA.5":{ + "baseline":"5", + "average":"7", + "growth":"2", + "progress":"83" + }, + "ELA.6":{ + "baseline":"5", + "average":"8", + "growth":"3", + "progress":"33" + }, + "ELA.7":{ + "baseline":"5", + "average":"6.2", + "growth":"1.3", + "progress":"63" + } + } } } \ No newline at end of file From e2e732f3bb02927087a9410ce8ce9f273ec67bb9 Mon Sep 17 00:00:00 2001 From: Tom Gaffey Date: Tue, 23 Nov 2021 11:21:43 -0500 Subject: [PATCH 04/32] feat(fixtures): add override test cases --- fixtures/cbl_demonstration_skills.sql | 32 +++++++++++++++++++++++++++ fixtures/cbl_demonstrations.sql | 25 +++++++++++++++++++++ fixtures/cbl_student_competencies.sql | 8 +++++++ 3 files changed, 65 insertions(+) diff --git a/fixtures/cbl_demonstration_skills.sql b/fixtures/cbl_demonstration_skills.sql index 251b47a81..42aae2122 100644 --- a/fixtures/cbl_demonstration_skills.sql +++ b/fixtures/cbl_demonstration_skills.sql @@ -2407,6 +2407,38 @@ INSERT INTO `cbl_demonstration_skills` VALUES (2434,'Slate\\CBL\\Demonstrations\ INSERT INTO `cbl_demonstration_skills` VALUES (2435,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:22:59',2,'2021-08-09 00:25:11',2,197,205,9,12,0); INSERT INTO `cbl_demonstration_skills` VALUES (2436,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:24:10',2,NULL,NULL,198,206,9,12,0); INSERT INTO `cbl_demonstration_skills` VALUES (2437,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:35:08',1,NULL,NULL,199,207,9,12,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2438,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:44:05',2,NULL,NULL,200,158,9,5,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2439,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:46:55',2,NULL,NULL,201,163,9,5,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2440,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:02',2,NULL,NULL,202,163,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2441,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:22',2,NULL,NULL,203,164,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2442,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:44',2,NULL,NULL,204,165,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2443,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:49:39',2,NULL,NULL,205,158,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2444,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,159,9,6,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2445,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,160,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2446,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,161,9,8,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2447,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:57',2,NULL,NULL,207,159,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2448,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:40',2,NULL,NULL,208,158,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2449,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:45',2,NULL,NULL,209,159,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2450,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:50',2,NULL,NULL,210,160,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2451,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:56',2,NULL,NULL,211,161,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2452,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:06',2,NULL,NULL,212,163,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2453,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:10',2,NULL,NULL,213,164,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2454,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:15',2,NULL,NULL,214,165,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2455,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:13:57',2,NULL,NULL,215,167,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2456,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:13:57',2,NULL,NULL,215,168,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2457,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:14:20',2,NULL,NULL,216,167,9,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2458,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:27:15',2,NULL,NULL,217,169,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2459,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:29:17',2,NULL,NULL,218,170,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2460,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:29:38',2,NULL,NULL,219,170,9,6,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2461,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:36',2,NULL,NULL,220,169,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2462,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:36',2,NULL,NULL,220,170,9,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2463,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:59',2,NULL,NULL,221,169,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2464,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:59',2,NULL,NULL,221,170,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2465,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:41:50',2,NULL,NULL,222,169,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2466,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,28,10,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2467,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,29,10,8,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2468,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,30,10,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2469,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:16',2,NULL,NULL,224,28,10,NULL,1); CREATE TABLE `history_cbl_demonstration_skills` ( diff --git a/fixtures/cbl_demonstrations.sql b/fixtures/cbl_demonstrations.sql index 0020d6824..c0061f597 100644 --- a/fixtures/cbl_demonstrations.sql +++ b/fixtures/cbl_demonstrations.sql @@ -213,6 +213,31 @@ INSERT INTO `cbl_demonstrations` VALUES (196,'Slate\\CBL\\Demonstrations\\Experi INSERT INTO `cbl_demonstrations` VALUES (197,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:22:58',2,NULL,NULL,6,'2021-08-09 00:22:03',NULL,NULL,'Studio','Testing CBL Archiving','Test'); INSERT INTO `cbl_demonstrations` VALUES (198,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:24:10',2,NULL,NULL,6,'2021-08-09 00:23:14',NULL,NULL,'Studio','Testing CBL Arching','Test'); INSERT INTO `cbl_demonstrations` VALUES (199,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:35:08',1,NULL,NULL,6,'2021-08-09 00:34:31',NULL,NULL,'Studio','Testing CBL Archiving','Test'); +INSERT INTO `cbl_demonstrations` VALUES (200,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:44:05',2,NULL,NULL,4,'2021-11-22 13:43:37',NULL,NULL,'Studio','Testing Overrides','Annotated Writing'); +INSERT INTO `cbl_demonstrations` VALUES (201,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:46:55',2,NULL,NULL,4,'2021-11-22 13:46:30',NULL,NULL,'Studio','Test overrides','Build/Design Project'); +INSERT INTO `cbl_demonstrations` VALUES (202,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:47:02',2,NULL,NULL,4,'2021-11-22 13:46:53',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (203,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:47:22',2,NULL,NULL,4,'2021-11-22 13:47:14',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (204,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:47:44',2,NULL,NULL,4,'2021-11-22 13:47:21',NULL,NULL,'Studio','Test overrides','Debate'); +INSERT INTO `cbl_demonstrations` VALUES (205,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:49:39',2,NULL,NULL,4,'2021-11-22 13:49:27',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (206,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:50:11',2,NULL,NULL,4,'2021-11-22 13:49:41',NULL,NULL,'Studio','Test overrides','Debate'); +INSERT INTO `cbl_demonstrations` VALUES (207,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:50:57',2,NULL,NULL,4,'2021-11-22 13:50:48',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (208,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:40',2,NULL,NULL,6,'2021-11-22 14:03:32',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (209,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:45',2,NULL,NULL,6,'2021-11-22 14:03:37',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (210,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:50',2,NULL,NULL,6,'2021-11-22 14:03:42',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (211,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:56',2,NULL,NULL,6,'2021-11-22 14:03:47',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (212,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:06',2,NULL,NULL,6,'2021-11-22 14:03:58',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (213,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:10',2,NULL,NULL,6,'2021-11-22 14:04:02',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (214,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:15',2,NULL,NULL,6,'2021-11-22 14:04:07',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (215,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:13:57',2,NULL,NULL,4,'2021-11-22 14:13:31',NULL,NULL,'Studio','Test overrides','Build/Design Project'); +INSERT INTO `cbl_demonstrations` VALUES (216,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:14:20',2,NULL,NULL,4,'2021-11-22 14:13:56',NULL,NULL,'Studio','Test overrides','Document-based Questions'); +INSERT INTO `cbl_demonstrations` VALUES (217,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:27:15',2,NULL,NULL,4,'2021-11-22 14:26:49',NULL,NULL,'Studio','Test overrides','Data Analysis Task'); +INSERT INTO `cbl_demonstrations` VALUES (218,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:29:17',2,NULL,NULL,4,'2021-11-22 14:28:52',NULL,NULL,'Studio','Test overrides','Art Project'); +INSERT INTO `cbl_demonstrations` VALUES (219,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:29:38',2,NULL,NULL,4,'2021-11-22 14:29:19',NULL,NULL,'Studio','Test overrides','Annotated Timeline'); +INSERT INTO `cbl_demonstrations` VALUES (220,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:35:36',2,NULL,NULL,6,'2021-11-22 14:35:14',NULL,NULL,'Studio','Test overrides','Document-based Questions'); +INSERT INTO `cbl_demonstrations` VALUES (221,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:35:59',2,NULL,NULL,6,'2021-11-22 14:35:35',NULL,NULL,'Studio','Test overrides','Annotated Timeline'); +INSERT INTO `cbl_demonstrations` VALUES (222,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:41:50',2,NULL,NULL,6,'2021-11-22 14:41:41',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (223,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:45:02',2,NULL,NULL,6,'2021-11-22 14:44:31',NULL,NULL,'Studio','Testing overrides','Annotated Writing'); +INSERT INTO `cbl_demonstrations` VALUES (224,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:45:16',2,NULL,NULL,6,'2021-11-22 14:45:08',NULL,NULL,NULL,NULL,NULL); CREATE TABLE `history_cbl_demonstrations` ( diff --git a/fixtures/cbl_student_competencies.sql b/fixtures/cbl_student_competencies.sql index adeab72bd..0fd4e5bc5 100644 --- a/fixtures/cbl_student_competencies.sql +++ b/fixtures/cbl_student_competencies.sql @@ -650,3 +650,11 @@ INSERT INTO `cbl_student_competencies` VALUES (632,'Slate\\CBL\\StudentCompetenc INSERT INTO `cbl_student_competencies` VALUES (633,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:08',2,6,11,9,'enrollment',NULL); INSERT INTO `cbl_student_competencies` VALUES (634,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:08',2,6,41,9,'enrollment',NULL); INSERT INTO `cbl_student_competencies` VALUES (635,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:22',2,6,40,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (636,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,29,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (637,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,30,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (638,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,31,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (639,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,32,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (640,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,29,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (641,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,30,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (642,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,31,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (643,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,32,9,'enrollment',NULL); From 449a2f087900dc9764e79dc037e5d09dea40148f Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 7 Dec 2021 08:38:10 -0500 Subject: [PATCH 05/32] fix(e2e): update student competency API data expectations --- cypress/integration/api/student-competencies.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cypress/integration/api/student-competencies.js b/cypress/integration/api/student-competencies.js index 1319ee738..c2bdb509e 100644 --- a/cypress/integration/api/student-competencies.js +++ b/cypress/integration/api/student-competencies.js @@ -15,17 +15,17 @@ describe('/cbl/student-competencies API', () => { expect(response).property('status').to.eq(200); expect(response).property('body').to.be.an('object'); expect(response.body).property('success').to.be.true; - expect(response.body).property('total').to.eq(635); + expect(response.body).property('total').to.eq(643); expect(response.body).property('limit').to.eq(0); expect(response.body).property('data').to.be.an('array'); - expect(response.body.data).to.have.length(635); + expect(response.body.data).to.have.length(643); expect(response.body.data[0]).to.include({ - ID: 635, + ID: 643, Class: 'Slate\\CBL\\StudentCompetency', - Created: 1628468422, + Created: 1637588605, CreatorID: 2, StudentID: 6, - CompetencyID: 40, + CompetencyID: 32, Level: 9, EnteredVia: 'enrollment', BaselineRating: null From 7644ce2f7a5792e7fa4175d28f32670433383939 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Tue, 7 Dec 2021 08:47:18 -0500 Subject: [PATCH 06/32] chore(deps): bump slate to v2.16.13 --- .holo/sources/slate.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.holo/sources/slate.toml b/.holo/sources/slate.toml index 56aedb742..a6755a699 100644 --- a/.holo/sources/slate.toml +++ b/.holo/sources/slate.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/SlateFoundation/slate" -ref = "refs/tags/v2.16.12" +ref = "refs/tags/v2.16.13" From 23248ea024fdfe7e6e035c408bcdbb19f7574d4d Mon Sep 17 00:00:00 2001 From: Anderson Date: Mon, 6 Sep 2021 13:26:26 -0400 Subject: [PATCH 07/32] test: removed skip to allow test to run --- cypress/integration/login_admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/login_admin.js b/cypress/integration/login_admin.js index bb776fef5..33c92bbb5 100644 --- a/cypress/integration/login_admin.js +++ b/cypress/integration/login_admin.js @@ -1,4 +1,4 @@ -describe.skip('Admin login test', () => { +describe('Admin login test', () => { // load sample database before tests before(() => { From 0c13a9d85a9ca746ba206f541f2de8a89bd5be3e Mon Sep 17 00:00:00 2001 From: Anderson Date: Mon, 6 Sep 2021 14:13:54 -0400 Subject: [PATCH 08/32] test: specified new selector --- cypress/integration/login_admin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/login_admin.js b/cypress/integration/login_admin.js index 33c92bbb5..1d77d6939 100644 --- a/cypress/integration/login_admin.js +++ b/cypress/integration/login_admin.js @@ -10,7 +10,7 @@ describe('Admin login test', () => { // should be visible after Log In click cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.get('#login-modal').should('be.visible'); // Should be hidden after cancel click @@ -18,7 +18,7 @@ describe('Admin login test', () => { cy.get('#login-modal').should('not.be.visible'); // Should be hidden after X click - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.get('#login-modal').should('be.visible'); cy.get('.modal-close-button').click(); cy.get('#login-modal').should('not.be.visible'); @@ -28,7 +28,7 @@ describe('Admin login test', () => { cy.visit('/'); cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.focused() .should('have.attr', 'name', '_LOGIN[username]') @@ -48,7 +48,7 @@ describe('Admin login test', () => { cy.visit('/'); cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.contains('#login-modal').should('not.have.attr', 'display'); cy.focused() From 580a9a9ae1f336c758f552eab487300f84c3e1c1 Mon Sep 17 00:00:00 2001 From: Anderson Date: Mon, 6 Sep 2021 14:15:02 -0400 Subject: [PATCH 09/32] test: replaced 'contains' with 'get' selector --- cypress/integration/login_admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/login_admin.js b/cypress/integration/login_admin.js index 1d77d6939..9227b550b 100644 --- a/cypress/integration/login_admin.js +++ b/cypress/integration/login_admin.js @@ -50,7 +50,7 @@ describe('Admin login test', () => { cy.get('#login-modal').should('not.be.visible'); cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); - cy.contains('#login-modal').should('not.have.attr', 'display'); + cy.get('#login-modal').should('not.have.attr', 'display'); cy.focused() .should('have.attr', 'name', '_LOGIN[username]') .type('admin') From b14c5c8ee481c97e933b08b265b2c7e59e8de921 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 12:37:20 -0400 Subject: [PATCH 10/32] test: changed type search in drop down --- cypress/integration/student_compentencies.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/student_compentencies.js b/cypress/integration/student_compentencies.js index e6edd542a..5a6e13d10 100644 --- a/cypress/integration/student_compentencies.js +++ b/cypress/integration/student_compentencies.js @@ -1,4 +1,4 @@ -describe.skip('Teacher student competencies test', () => { +describe('Teacher student competencies test', () => { // load sample database before tests before(() => { @@ -44,7 +44,7 @@ describe.skip('Teacher student competencies test', () => { cy.get('#' + studentSelector.el.dom.id) .click() .focused() - .type('ELA'); + .type('EXA'); // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id + ' .x-boundlist-item') From 275989c4693fd3e4b98683455a4cb868a1002ac5 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 12:38:27 -0400 Subject: [PATCH 11/32] test: changed contains search to 'Example School' --- cypress/integration/student_compentencies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_compentencies.js b/cypress/integration/student_compentencies.js index 5a6e13d10..3d335d6d0 100644 --- a/cypress/integration/student_compentencies.js +++ b/cypress/integration/student_compentencies.js @@ -48,7 +48,7 @@ describe('Teacher student competencies test', () => { // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id + ' .x-boundlist-item') - .contains('ELA-001') + .contains('Example School') .click(); // verify hash updates From bc8e2d107357c0727f4d39ee2c126faad9561401 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 12:39:01 -0400 Subject: [PATCH 12/32] test: updated url properties --- cypress/integration/student_compentencies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_compentencies.js b/cypress/integration/student_compentencies.js index 3d335d6d0..85e698043 100644 --- a/cypress/integration/student_compentencies.js +++ b/cypress/integration/student_compentencies.js @@ -52,7 +52,7 @@ describe('Teacher student competencies test', () => { .click(); // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-001'); + cy.location('hash').should('eq', '#ELA/group:example_school'); // verify content loads cy.get('.slate-studentcompetencies-admin-grid').contains('Student Slate'); From 7c3d3cf1ec241e4233c29d6aedb46d084f9b788f Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:12:37 -0400 Subject: [PATCH 13/32] test:removed skip to enable test --- cypress/integration/teacher_demonstrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index ec42a594c..6feb00213 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -1,4 +1,4 @@ -describe.skip('Teacher demonstrations test', () => { +describe('Teacher demonstrations test', () => { // load sample database before tests before(() => { From 5591cac60354daef631994a6e900f94e3e0f57ca Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:13:53 -0400 Subject: [PATCH 14/32] test: changed what user types to 'Exa' --- cypress/integration/teacher_demonstrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index 6feb00213..9fb943c68 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -43,7 +43,7 @@ describe('Teacher demonstrations test', () => { cy.get('#' + studentSelector.el.dom.id) .click() .focused() - .type('ELA'); + .type('Exa'); // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id) From a60ba23591e1851183e3dfdb6e4abf159c821eba Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:16:50 -0400 Subject: [PATCH 15/32] test: checking drop down for 'Example School' --- cypress/integration/teacher_demonstrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index 9fb943c68..bbbb278c6 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -47,7 +47,7 @@ describe('Teacher demonstrations test', () => { // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id) - .contains('ELA-001') + .contains('Example School') .click(); // verify hash updates From 535dc3e719817bb4c4a4ffafcb6b70e1b784ee7c Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:19:06 -0400 Subject: [PATCH 16/32] test: modified url attributes --- cypress/integration/teacher_demonstrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index bbbb278c6..1de69e998 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -51,7 +51,7 @@ describe('Teacher demonstrations test', () => { .click(); // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-001'); + cy.location('hash').should('eq', '#ELA/group:example_school'); // verify content loads cy.get('.cbl-grid-competencies').contains('Reading Critically'); From 41407f87b02b2280acc598a458decdb09424af42 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:21:05 -0400 Subject: [PATCH 17/32] test: updated what drop down is looking for --- cypress/integration/teacher_demonstrations.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index 1de69e998..063fe7e68 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -71,7 +71,8 @@ describe('Teacher demonstrations test', () => { // verify and click empty section element of picker dropdown cy.get('#' + studentSelector.getPicker().id) - .contains('ELA-EMPTY') + .contains('Class of 2019') + .scrollIntoView() .click(); // verify hash updates From 9608a118e0358e9748dff526757b8309831918e8 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 15:21:45 -0400 Subject: [PATCH 18/32] test: modified url attributes --- cypress/integration/teacher_demonstrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index 063fe7e68..fb66c9f22 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -76,7 +76,7 @@ describe('Teacher demonstrations test', () => { .click(); // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-EMPTY'); + cy.location('hash').should('eq', '#ELA/group:class_of_2019'); // verify content loads cy.get('.cbl-grid-main').should('be.empty'); From d98b25f2089dbb41901d47286fbc25b06eb871be Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 7 Sep 2021 16:25:39 -0400 Subject: [PATCH 19/32] this file appeared after i added the dayjs npm package --- package-lock.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..a95cbdf81 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,21 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "dayjs": { + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.6.tgz", + "integrity": "sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw==" + }, + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==" + }, + "prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==" + } + } +} From 12610aeb212c99b587da652c72d9219aef03a671 Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 8 Sep 2021 18:46:33 -0400 Subject: [PATCH 20/32] test:removed skip to enabl test --- cypress/integration/student_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index ad8bca27c..7dc1834ae 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -1,4 +1,4 @@ -describe.skip('Student tasks test', () => { +const dayjs = require('dayjs') // load sample database before tests before(() => { From 7d637a0ac341e6b9646e4e23d55368031dc8f1ea Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 8 Sep 2021 18:47:52 -0400 Subject: [PATCH 21/32] test: added dayjs to create new date --- cypress/integration/student_tasks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index 7dc1834ae..81dcac894 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -10,28 +10,28 @@ const dayjs = require('dayjs') cy.request('POST', `/cbl/tasks/save?format=json`, { data: [{ Title: 'Test Task (Due Today)', - DueDate: Cypress.moment().format('YYYY-MM-DD'), + DueDate: dayjs().format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due This Week)', - DueDate: Cypress.moment().add(5, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().add(5, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due Recently)', - DueDate: Cypress.moment().subtract(9, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().subtract(9, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due Next Week)', - DueDate: Cypress.moment().add(8, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().add(8, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true From 7e6cb17e27de4f9a899f9d778bae6a65ac60c811 Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 8 Sep 2021 18:48:47 -0400 Subject: [PATCH 22/32] test: changed length to 4 --- cypress/integration/student_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index 81dcac894..a49ef5146 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -88,7 +88,7 @@ const dayjs = require('dayjs') .should(($todoListSection) => { expect( $todoListSection.length - ).to.equal(3); + ).to.equal(4); }) // get current tasks list From 147ae5aad951a03924f428245522ed28db1daee4 Mon Sep 17 00:00:00 2001 From: Anderson Date: Wed, 8 Sep 2021 18:49:36 -0400 Subject: [PATCH 23/32] test: changes length to 5 --- cypress/integration/student_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index a49ef5146..8ee20dfce 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -305,7 +305,7 @@ const dayjs = require('dayjs') cy.get('#' + currentTasksTree.id) .should(($tasksTree) => { expect($tasksTree.find('li.slate-tasktree-item').length) - .to.equal(4); + .to.equal(5); }); }); From 38832fd0fa85cfca88ed6c4f5a20e5daab7d0a26 Mon Sep 17 00:00:00 2001 From: Anderson Date: Fri, 10 Sep 2021 16:26:23 -0400 Subject: [PATCH 24/32] fix: added describe desciption --- cypress/integration/student_tasks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index 8ee20dfce..5e05f20ba 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -1,4 +1,5 @@ -const dayjs = require('dayjs') +describe('Student Tasks test', () => { + const dayjs = require('dayjs') // load sample database before tests before(() => { From 358bebc387ecb44f89f0da2a953be7872bb7be56 Mon Sep 17 00:00:00 2001 From: Anderson Date: Mon, 13 Sep 2021 14:48:00 -0400 Subject: [PATCH 25/32] test: added skip --- cypress/integration/student_tasks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index 5e05f20ba..3808e34fc 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -1,4 +1,4 @@ -describe('Student Tasks test', () => { +describe.skip('Student Tasks test', () => { const dayjs = require('dayjs') // load sample database before tests From 506c2710b227a8e7424959668ac1d9494c8d30c4 Mon Sep 17 00:00:00 2001 From: Anderson Date: Mon, 13 Sep 2021 14:48:57 -0400 Subject: [PATCH 26/32] removed package-lock.json --- package-lock.json | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a95cbdf81..000000000 --- a/package-lock.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "dayjs": { - "version": "1.10.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.10.6.tgz", - "integrity": "sha512-AztC/IOW4L1Q41A86phW5Thhcrco3xuAA+YX/BLpLWWjRcTj5TOt/QImBLmCKlrF7u7k47arTnOyL6GnbG8Hvw==" - }, - "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==" - }, - "prettier": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", - "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==" - } - } -} From e0a023323d104e2aadd02dd01baa30fa5b41cea8 Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 14 Sep 2021 11:57:49 -0400 Subject: [PATCH 27/32] test: added force true --- cypress/integration/teacher_demonstrations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index fb66c9f22..a1219866f 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -67,13 +67,13 @@ describe('Teacher demonstrations test', () => { .contains('Show all sections') .scrollIntoView() .closest('button') - .click('center') + .click('center', { force: true }) //scrollIntoView does not appear to be working // verify and click empty section element of picker dropdown cy.get('#' + studentSelector.getPicker().id) .contains('Class of 2019') .scrollIntoView() - .click(); + .click({force: true}); //scrollIntoView does not appear to be working // verify hash updates cy.location('hash').should('eq', '#ELA/group:class_of_2019'); From edfd90b6c05b22e864e3d205153e0e926818309f Mon Sep 17 00:00:00 2001 From: Anderson Date: Tue, 14 Sep 2021 12:04:20 -0400 Subject: [PATCH 28/32] refracter: looking for the key word Jarvus --- cypress/integration/teacher_demonstrations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index a1219866f..d60d14db6 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -71,12 +71,12 @@ describe('Teacher demonstrations test', () => { // verify and click empty section element of picker dropdown cy.get('#' + studentSelector.getPicker().id) - .contains('Class of 2019') + .contains('Jarvus Innovations') .scrollIntoView() .click({force: true}); //scrollIntoView does not appear to be working // verify hash updates - cy.location('hash').should('eq', '#ELA/group:class_of_2019'); + cy.location('hash').should('eq', '#ELA/group:jarvus'); // verify content loads cy.get('.cbl-grid-main').should('be.empty'); From 2f01d2f69f952f361c33b23eaa96610cfff0fd01 Mon Sep 17 00:00:00 2001 From: Nafis Bey Date: Tue, 7 Dec 2021 14:04:46 -0500 Subject: [PATCH 29/32] fix: completion percentage on skills with no ER --- .../SlateDemonstrationsStudent/app/controller/Dashboard.js | 2 +- .../SlateDemonstrationsStudent/app/view/CompetencyCard.js | 2 +- .../SlateDemonstrationsTeacher/app/view/ProgressGrid.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js b/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js index 01cfeea18..53f4ef9b1 100644 --- a/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js +++ b/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js @@ -238,7 +238,7 @@ Ext.define('SlateDemonstrationsStudent.controller.Dashboard', { competenciesSummary.setConfig({ level: isFinite(lowestLevel) ? lowestLevel : null, - percentComplete: totalRequired ? 100 * totalComplete / totalRequired : null, + percentComplete: totalRequired === 0 ? 100 : 100 * totalComplete / totalRequired, percentMissed: totalRequired ? 100 * totalMissed / totalRequired : null, missed: totalRequired ? totalMissed : null, average: averageValues.length ? Ext.Array.sum(averageValues) / averageValues.length : null, diff --git a/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js b/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js index 977cae0f8..0f736a911 100644 --- a/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js +++ b/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js @@ -226,7 +226,7 @@ Ext.define('SlateDemonstrationsStudent.view.CompetencyCard', { demonstrationsAverage = studentCompetency.get('demonstrationsAverage'); level = studentCompetency.get('Level'); demonstrationsRequired = competency.getTotalDemonstrationsRequired(level); - percentComplete = demonstrationsRequired ? 100 * studentCompetency.get('demonstrationsComplete') / demonstrationsRequired : null; + percentComplete = demonstrationsRequired === 0 ? 100 : 100 * studentCompetency.get('demonstrationsComplete') / demonstrationsRequired; } Ext.suspendLayouts(); diff --git a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js index cfb69934c..f99c4eec8 100644 --- a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js +++ b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js @@ -769,10 +769,10 @@ Ext.define('SlateDemonstrationsTeacher.view.ProgressGrid', { countDirty = count != node.renderedCount; averageDirty = average != node.renderedAverage; levelDirty = level != renderedLevel; - demonstrationsRequired = competency.totalDemonstrationsRequired[level] || competency.totalDemonstrationsRequired.default; + demonstrationsRequired = competency.getTotalDemonstrationsRequired(level); if (countDirty || averageDirty) { - percentComplete = 100 * (count || 0) / demonstrationsRequired; + percentComplete = demonstrationsRequired === 0 ? 100 : 100 * (count || 0) / demonstrationsRequired; progressCellEl.toggleCls('is-average-low', percentComplete >= 50 && average !== null && average < studentCompetency.get('minimumAverage')); // eslint-disable-line no-extra-parens } From 5cd64de5d4b4ce3a3feec50902a81e525d0bfe07 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Fri, 17 Dec 2021 12:57:15 -0500 Subject: [PATCH 30/32] chore(deps): bump slate to v2.17.1 --- .holo/sources/slate.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.holo/sources/slate.toml b/.holo/sources/slate.toml index a6755a699..30e1fbbbc 100644 --- a/.holo/sources/slate.toml +++ b/.holo/sources/slate.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/SlateFoundation/slate" -ref = "refs/tags/v2.16.13" +ref = "refs/tags/v2.17.1" From 698f10ade45fc934ebc1a60eb165a566afeac279 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Fri, 17 Dec 2021 18:59:56 -0500 Subject: [PATCH 31/32] fix(demos-teacher): revert use of getTotalDemonstrationsRequired in data context --- .../SlateDemonstrationsTeacher/app/view/ProgressGrid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js index f99c4eec8..e9dbc6282 100644 --- a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js +++ b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js @@ -769,7 +769,7 @@ Ext.define('SlateDemonstrationsTeacher.view.ProgressGrid', { countDirty = count != node.renderedCount; averageDirty = average != node.renderedAverage; levelDirty = level != renderedLevel; - demonstrationsRequired = competency.getTotalDemonstrationsRequired(level); + demonstrationsRequired = competency.totalDemonstrationsRequired[level] || competency.totalDemonstrationsRequired.default; if (countDirty || averageDirty) { percentComplete = demonstrationsRequired === 0 ? 100 : 100 * (count || 0) / demonstrationsRequired; From 4dbc0c60845f32670c2ed8b674d6e3f8ed797378 Mon Sep 17 00:00:00 2001 From: Chris Alfano Date: Wed, 15 Dec 2021 19:43:09 -0500 Subject: [PATCH 32/32] fix: add XHR waits/assertions to teacher_demonstrations test --- cypress/integration/teacher_demonstrations.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index d60d14db6..c620a72c3 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -11,10 +11,21 @@ describe('Teacher demonstrations test', () => { }); it('View single demonstration rubric as teacher', () => { + // set up XHR monitors + cy.intercept('GET', '/cbl/dashboards/demonstrations/teacher/bootstrap').as('getBootstrapData'); + cy.intercept('GET', '/cbl/content-areas?summary=true').as('getCompetencyAreas'); + cy.intercept('GET', '/people/*student-lists').as('getMyStudentLists'); + cy.intercept('GET', '/people/*student-lists?sections=all').as('getAllStudentLists'); + cy.intercept('GET', '/cbl/student-competencies?*').as('getStudentCompetencies'); + // open student demonstrations dashboard cy.visit('/cbl/dashboards/demonstrations/teacher'); + // ensure bootstrap data is loaded + cy.wait('@getBootstrapData'); + cy.get('@getBootstrapData.all').should('have.length', 1); + // verify teacher redirect cy.location('hash').should('eq', '#_'); cy.get('.slate-appcontainer-bodyWrap .slate-placeholder ') @@ -28,6 +39,10 @@ describe('Teacher demonstrations test', () => { // click the selector cy.get('#' + rubricSelector.el.dom.id).click(); + // ensure competency areas are loaded + cy.wait('@getCompetencyAreas'); + cy.get('@getCompetencyAreas.all').should('have.length', 1); + // verify and click first element of picker dropdown cy.get('#' + rubricSelector.getPicker().id + ' .x-boundlist-item') .contains('English Language Arts') @@ -45,11 +60,19 @@ describe('Teacher demonstrations test', () => { .focused() .type('Exa'); + // ensure student lists are loaded + cy.wait('@getMyStudentLists'); + cy.get('@getMyStudentLists.all').should('have.length', 1); + // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id) .contains('Example School') .click(); + // ensure student competencies are loaded + cy.wait('@getStudentCompetencies'); + cy.get('@getStudentCompetencies.all').should('have.length', 1); + // verify hash updates cy.location('hash').should('eq', '#ELA/group:example_school'); @@ -69,12 +92,20 @@ describe('Teacher demonstrations test', () => { .closest('button') .click('center', { force: true }) //scrollIntoView does not appear to be working + // ensure student lists are loaded + cy.wait('@getAllStudentLists'); + cy.get('@getAllStudentLists.all').should('have.length', 1); + // verify and click empty section element of picker dropdown cy.get('#' + studentSelector.getPicker().id) .contains('Jarvus Innovations') .scrollIntoView() .click({force: true}); //scrollIntoView does not appear to be working + // ensure student competencies are loaded + cy.wait('@getStudentCompetencies'); + cy.get('@getStudentCompetencies.all').should('have.length', 2); + // verify hash updates cy.location('hash').should('eq', '#ELA/group:jarvus');