From 0227cfe0f1cc99d498ef66a60b14606a3e9a56b6 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 14 Mar 2024 15:28:52 -0700 Subject: [PATCH 01/31] format' --- .../default-tests/viewIndividualReport.cy.js | 14 +++++--- .../reports/IndividualScoreReportTask.vue | 11 +++++++ src/pages/IndividualReport.vue | 33 +++++++++++++++++-- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js b/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js index e77c34888..f7719db74 100644 --- a/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js +++ b/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js @@ -32,6 +32,14 @@ function checkAssignmentColumns() { }); } +function checkIndividualScoreReport() { + cy.get('button').contains('Report').click(); + cy.get('div', { timeout: 3 * timeout }).should('contain', 'Individual Score Report'); + cy.get('button').contains('Expand All Sections').click(); + cy.get('button').contains('Export to PDF'); + cy.get('div').contains('The ROAR assessments return 3 kinds of scores'); +} + describe('The partner admin can view score reports for a given administration.', () => { it('Selects an administration and views its score report.', () => { checkUrl(); @@ -39,10 +47,6 @@ describe('The partner admin can view score reports for a given administration.', clickScoreButton(); cy.checkUserList(testUserList); checkAssignmentColumns(testAssignments); - cy.get('button').contains('Report').click(); - cy.get('div', { timeout: 3 * timeout }).contains('Individual Score Report'); - cy.get('button').contains('Expand All Sections').click(); - cy.get('button').contains('Export to PDF'); - cy.get('div').contains('The ROAR assessements return 3 kinds of scores'); + checkIndividualScoreReport(); }); }); diff --git a/src/components/reports/IndividualScoreReportTask.vue b/src/components/reports/IndividualScoreReportTask.vue index c29f6a6d0..b55750b69 100644 --- a/src/components/reports/IndividualScoreReportTask.vue +++ b/src/components/reports/IndividualScoreReportTask.vue @@ -23,6 +23,7 @@
{{ taskDisplayNames[task.taskId]?.extendedTitle }}
+
Status: Required
Percentile Score
Raw Score
@@ -47,6 +48,7 @@
{{ taskDisplayNames[task.taskId]?.extendedTitle }}
+
Status: Required
Standard Score
Raw Score
@@ -159,6 +161,15 @@ const computedTaskData = computed(() => { }); }); +const getStatus = (_taskId) => { + const optionalFilter = props.taskData?.filter((task) => task.taskId === _taskId && task.optional === true); + if (optionalFilter.length === 0) { + return 'Required'; + } else { + return 'Optional'; + } +}; + const formattedScoreAttributeMap = { wjPercentile: 'Percentile Score', sprPercentile: 'Percentile Score', diff --git a/src/pages/IndividualReport.vue b/src/pages/IndividualReport.vue index adabe3c3a..7c92c750c 100644 --- a/src/pages/IndividualReport.vue +++ b/src/pages/IndividualReport.vue @@ -84,7 +84,7 @@
-
The ROAR assessements return 3 kinds of scores:
+
The ROAR assessments return 3 kinds of scores:
  • Raw Score: A score that captures your students' general performance on the assessment, such as @@ -122,8 +122,8 @@ From a031e6137646d919172d1020012f19bcca56e1e4 Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 14 Mar 2024 15:43:34 -0700 Subject: [PATCH 02/31] add getStatus function, update tests. --- .../participant/default-tests/playFluency-ARF.cy.js | 4 ++-- .../reports/IndividualScoreReportTask.vue | 13 ++++--------- src/pages/IndividualReport.vue | 3 +-- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js b/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js index bdbea210b..2102c21a4 100644 --- a/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js +++ b/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js @@ -14,7 +14,7 @@ describe('Test playthrough of Fluency as a participant', () => { cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.p-tabview').contains('ROAM - Single-Digit'); + cy.get('.p-tabview').contains('ROAM - Single Digit'); cy.visit(`/game/fluency-arf`); // Click jspsych button to begin @@ -28,6 +28,6 @@ describe('Test playthrough of Fluency as a participant', () => { cy.visit('/'); cy.wait(0.2 * timeout); cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.tabview-nav-link-label').contains('ROAM - Single-Digit').should('exist'); + cy.get('.tabview-nav-link-label').contains('ROAM - Single Digit').should('exist'); }); }); diff --git a/src/components/reports/IndividualScoreReportTask.vue b/src/components/reports/IndividualScoreReportTask.vue index b55750b69..e6f4c8c0e 100644 --- a/src/components/reports/IndividualScoreReportTask.vue +++ b/src/components/reports/IndividualScoreReportTask.vue @@ -23,7 +23,7 @@
    {{ taskDisplayNames[task.taskId]?.extendedTitle }}
    -
    Status: Required
    +
    Status: {{ getStatus(task) }}
    Percentile Score
    Raw Score
    @@ -48,7 +48,7 @@
    {{ taskDisplayNames[task.taskId]?.extendedTitle }}
    -
    Status: Required
    +
    Status: {{ getStatus(task) }}
    Standard Score
    Raw Score
    @@ -161,13 +161,8 @@ const computedTaskData = computed(() => { }); }); -const getStatus = (_taskId) => { - const optionalFilter = props.taskData?.filter((task) => task.taskId === _taskId && task.optional === true); - if (optionalFilter.length === 0) { - return 'Required'; - } else { - return 'Optional'; - } +const getStatus = (_task) => { + return _task.optional ? 'Optional' : 'Required'; }; const formattedScoreAttributeMap = { diff --git a/src/pages/IndividualReport.vue b/src/pages/IndividualReport.vue index 7c92c750c..703282131 100644 --- a/src/pages/IndividualReport.vue +++ b/src/pages/IndividualReport.vue @@ -254,8 +254,7 @@ const updateTaskData = () => { // Watch for changes in taskData and update the taskData with the new optional tasks watch( () => taskData.value, - (newVal, oldVal) => { - console.log('taskData changed'); + () => { updateTaskData(); }, { deep: true }, From c5b628a720d0458c7ac061bc36a388045f0c12ce Mon Sep 17 00:00:00 2001 From: Kyle Date: Mon, 25 Mar 2024 17:56:41 -0700 Subject: [PATCH 03/31] merge to main, update tests --- cypress/support/helper-functions/roar-sre/sreHelpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/support/helper-functions/roar-sre/sreHelpers.js b/cypress/support/helper-functions/roar-sre/sreHelpers.js index f09af402e..67db6bf4b 100644 --- a/cypress/support/helper-functions/roar-sre/sreHelpers.js +++ b/cypress/support/helper-functions/roar-sre/sreHelpers.js @@ -49,9 +49,9 @@ export const playSRE = (administration, language, optional = false) => { function playSREGame() { for (let i = 0; i < 80; i++) { cy.log('loop 0', i); - cy.wait(0.1 * timeout); + cy.wait(0.3 * timeout); cy.get('body').type('{leftarrow}{rightarrow}'); - cy.wait(0.1 * timeout); + cy.wait(0.3 * timeout); cy.get('body').type('{leftarrow}{rightarrow}'); } } From 87e75e017b551fd36164963b4cdfab6ce0e893cf Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Mar 2024 09:29:16 -0700 Subject: [PATCH 04/31] format --- src/components/reports/IndividualScoreReportTask.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/reports/IndividualScoreReportTask.vue b/src/components/reports/IndividualScoreReportTask.vue index 265410de6..64e4b440b 100644 --- a/src/components/reports/IndividualScoreReportTask.vue +++ b/src/components/reports/IndividualScoreReportTask.vue @@ -69,8 +69,10 @@ />
    From eb844ba40e37cdf35f41ac935845fa897595b49f Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Mar 2024 09:31:46 -0700 Subject: [PATCH 05/31] add env variable for test list --- cypress.config.js | 1 + .../e2e/partner-admin/default-tests/viewIndividualReport.cy.js | 2 +- .../partner-admin/default-tests/viewProgressReports.spec.cy.js | 2 +- .../e2e/partner-admin/default-tests/viewScoreReports.spec.cy.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress.config.js b/cypress.config.js index eeb872ed5..49e81ea9e 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -50,6 +50,7 @@ module.exports = defineConfig({ testClassInitials: 'TC', testGroupName: 'zzzTestGroup', testGroupInitials: 'TG', + testAssignmentsList: ['Vocabulary', 'Multichoice', 'Written-Vocab'], testPartnerAdministrationName: 'zzzCypressTestAdministration', testPartnerAdministrationId: 'pdOfQuakqN4re3cI5mr5', testPartnerDistrictName: 'zzzCypressTestDistrict', diff --git a/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js b/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js index 49847d324..1eda10880 100644 --- a/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js +++ b/cypress/e2e/partner-admin/default-tests/viewIndividualReport.cy.js @@ -6,7 +6,7 @@ const testPartnerAdminPassword = Cypress.env('partnerAdminPassword'); const timeout = Cypress.env('timeout'); const baseUrl = Cypress.env('baseUrl'); const testUserList = Cypress.env('testUserList'); -const testAssignments = ['Vocabulary', 'Multichoice', 'Written-Vocab']; +const testAssignments = Cypress.env('testAssignmentsList'); function checkUrl() { cy.login(testPartnerAdminUsername, testPartnerAdminPassword); diff --git a/cypress/e2e/partner-admin/default-tests/viewProgressReports.spec.cy.js b/cypress/e2e/partner-admin/default-tests/viewProgressReports.spec.cy.js index 041358937..990689a3c 100644 --- a/cypress/e2e/partner-admin/default-tests/viewProgressReports.spec.cy.js +++ b/cypress/e2e/partner-admin/default-tests/viewProgressReports.spec.cy.js @@ -6,7 +6,7 @@ const baseUrl = Cypress.env('baseUrl'); const testPartnerAdminUsername = Cypress.env('partnerAdminUsername'); const testPartnerAdminPassword = Cypress.env('partnerAdminPassword'); const testUserList = Cypress.env('testUserList'); -const testAssignments = ['Vocabulary', 'Multichoice', 'Written-Vocab']; +const testAssignments = Cypress.env('testAssignmentsList'); function checkUrl() { cy.login(testPartnerAdminUsername, testPartnerAdminPassword); diff --git a/cypress/e2e/partner-admin/default-tests/viewScoreReports.spec.cy.js b/cypress/e2e/partner-admin/default-tests/viewScoreReports.spec.cy.js index a740b3e17..68f6ae7a6 100644 --- a/cypress/e2e/partner-admin/default-tests/viewScoreReports.spec.cy.js +++ b/cypress/e2e/partner-admin/default-tests/viewScoreReports.spec.cy.js @@ -6,7 +6,7 @@ const testPartnerAdminPassword = Cypress.env('partnerAdminPassword'); const timeout = Cypress.env('timeout'); const baseUrl = Cypress.env('baseUrl'); const testUserList = Cypress.env('testUserList'); -const testAssignments = ['Vocabulary', 'Multichoice', 'Written-Vocab']; +const testAssignments = Cypress.env('testAssignmentsList'); function checkUrl() { cy.login(testPartnerAdminUsername, testPartnerAdminPassword); From a554a569a8a1e3c7369a51bbe36aca29d76f88a2 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Mar 2024 10:37:26 -0700 Subject: [PATCH 06/31] initial commit --- src/components/tasks/RegisterTask.vue | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/components/tasks/RegisterTask.vue b/src/components/tasks/RegisterTask.vue index 7087533a3..8e9f3c099 100644 --- a/src/components/tasks/RegisterTask.vue +++ b/src/components/tasks/RegisterTask.vue @@ -125,11 +125,17 @@
    -
    +
    -
    - - +
    +
    + + +
    +
    + + +
    { return; } + const convertedParams = convertParamsToObj(variantParams); + // Write variant to Db try { await authStore.roarfirekit.registerTaskVariant({ @@ -354,11 +363,10 @@ const handleVariantSubmit = async (isFormValid) => { taskDescription: variantFields.selectedGame.description, taskImage: variantFields.selectedGame.image, variantName: variantFields.variantName, - // variantDescription, - variantParams: { - ...convertParamsToObj(variantParams), - variantURL: buildTaskURL(variantFields.selectedGame?.taskURL || '', variantParams), - }, + // If this is an external task, build the game variant url with the variant params and append to variant params object for use in game standalone mode + variantParams: isExternalTask.value + ? { ...convertedParams, variantURL: buildTaskURL(variantFields.selectedGame?.taskURL || '', variantParams) } + : convertedParams, }); toast.add({ severity: 'success', summary: 'Hoorah!', detail: 'Variant successfully created.', life: 3000 }); From 982e9239deb83ab35ce634c6f9cf73ed8c8ff282 Mon Sep 17 00:00:00 2001 From: Kyle Date: Tue, 26 Mar 2024 14:43:16 -0700 Subject: [PATCH 07/31] add conditional url to register task --- src/components/tasks/RegisterTask.vue | 44 ++++++++++++++++----------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/components/tasks/RegisterTask.vue b/src/components/tasks/RegisterTask.vue index 8e9f3c099..7243c3bc2 100644 --- a/src/components/tasks/RegisterTask.vue +++ b/src/components/tasks/RegisterTask.vue @@ -9,6 +9,10 @@
    +
    + + +
    -
    +
    -
    +
    -
    +
    @@ -218,8 +222,8 @@