From 89d35c4f573fc3eb791e5097461081a36931cc2c Mon Sep 17 00:00:00 2001 From: Lucas Song Date: Wed, 14 Feb 2024 16:15:24 -0800 Subject: [PATCH] Updates for review -- minor sorting/aesthetic changes --- cypress/e2e/participant/playPA.cy.js | 43 +++ src/components/GameTabs.vue | 7 +- .../reports/IndividualScoreReportTask.vue | 246 +++++++++++------- src/components/tasks/TaskLevante.vue | 4 + src/helpers/query/assignments.js | 25 +- src/main.js | 2 +- src/pages/IndividualReport.vue | 204 +++++++-------- src/pages/ScoreReport.vue | 9 +- 8 files changed, 317 insertions(+), 223 deletions(-) create mode 100644 cypress/e2e/participant/playPA.cy.js diff --git a/cypress/e2e/participant/playPA.cy.js b/cypress/e2e/participant/playPA.cy.js new file mode 100644 index 000000000..d755ece82 --- /dev/null +++ b/cypress/e2e/participant/playPA.cy.js @@ -0,0 +1,43 @@ +import { playPA } from '../../support/helperFunctions/roar-pa/paHelpers'; + +const timeout = Cypress.env('timeout'); +const startText = 'In this game we are going to look for words that BEGIN with the same sound.'; +const endBlockText = { + endText1: "Let's go help my friends now!", + endText2: 'We have one last friend to help!', + endText3: 'You have helped me and all my friends!', +}; +const breakBlockText = { + breakText1: "Great job! So many bananas! Let's get a few more!", + breakText2: 'Look at all those carrots!', + breakText3: "You are doing great! I am almost ready to go out and swim! Let's get a few more crabs.", +}; + +describe('Testing playthrough of ROAR-Phoneme as a participant', () => { + it(`ROAR-Phoneme Playthrough Test`, () => { + cy.login(Cypress.env('participantUsername'), Cypress.env('participantPassword')); + cy.visit('/'); + + cy.get('.p-dropdown-trigger', { timeout: 2 * timeout }).click(); + cy.get('.p-dropdown-item', { timeout: 2 * timeout }) + .contains(Cypress.env('testRoarAppsAdministration')) + .click(); + + // cy.get(".p-tabview").contains(pa.name); + cy.visit('/game/pa'); + + playPA(startText, endBlockText, breakBlockText); + + cy.visit('/'); + cy.get('.p-dropdown-trigger', { timeout: 2 * timeout }) + .should('be.visible') + .click(); + cy.get('.p-dropdown-item', { timeout: 2 * timeout }) + .contains(Cypress.env('testRoarAppsAdministration')) + .should('be.visible') + .click(); + cy.get('.tabview-nav-link-label', { timeout: 2 * timeout }) + .contains('ROAR-Phoneme') + .should('have.attr', 'data-game-status', 'complete'); + }); +}); diff --git a/src/components/GameTabs.vue b/src/components/GameTabs.vue index 2e347194d..11f4ae4fe 100644 --- a/src/components/GameTabs.vue +++ b/src/components/GameTabs.vue @@ -59,12 +59,7 @@ diff --git a/src/components/reports/IndividualScoreReportTask.vue b/src/components/reports/IndividualScoreReportTask.vue index 8f1958111..30e11d838 100644 --- a/src/components/reports/IndividualScoreReportTask.vue +++ b/src/components/reports/IndividualScoreReportTask.vue @@ -1,16 +1,20 @@ - \ No newline at end of file + diff --git a/src/components/tasks/TaskLevante.vue b/src/components/tasks/TaskLevante.vue index 8a1dd6775..8863e3b58 100644 --- a/src/components/tasks/TaskLevante.vue +++ b/src/components/tasks/TaskLevante.vue @@ -1,7 +1,11 @@ diff --git a/src/helpers/query/assignments.js b/src/helpers/query/assignments.js index 7fba5ad0f..535db239b 100644 --- a/src/helpers/query/assignments.js +++ b/src/helpers/query/assignments.js @@ -947,18 +947,19 @@ export const assignmentPageFetcher = async ( const batchUserDocs = await adminAxiosInstance .post(':batchGet', { documents: userDocPaths, - mask: { fieldPaths: userSelectFields },}) - .then(({ data }) => { - return _without( - data.map(({ found }) => { - if (found) { - const userId = found.name.split('/users/')[1]; - return { - name: found.name, - data: { - ..._mapValues(found.fields, (value) => convertValues(value)), - userId, - }, + mask: { fieldPaths: userSelectFields }, + }) + .then(({ data }) => { + return _without( + data.map(({ found }) => { + if (found) { + const userId = found.name.split('/users/')[1]; + return { + name: found.name, + data: { + ..._mapValues(found.fields, (value) => convertValues(value)), + userId, + }, }; } return undefined; diff --git a/src/main.js b/src/main.js index d85857f98..55c6fe58a 100644 --- a/src/main.js +++ b/src/main.js @@ -34,7 +34,7 @@ import PvInputNumber from 'primevue/inputnumber'; import PvInputSwitch from 'primevue/inputswitch'; import PvInputText from 'primevue/inputtext'; import PvInlineMessage from 'primevue/inlinemessage'; -import PvKnob from 'primevue/knob'; +import PvKnob from 'primevue/knob'; import PvListbox from 'primevue/listbox'; import PvMessage from 'primevue/message'; import PvMenu from 'primevue/menu'; diff --git a/src/pages/IndividualReport.vue b/src/pages/IndividualReport.vue index aec10e0a5..8ad71afe8 100644 --- a/src/pages/IndividualReport.vue +++ b/src/pages/IndividualReport.vue @@ -7,9 +7,7 @@
-
- Individual Score Report -
+
Individual Score Report
{{ studentFirstName }} {{ studentLastName }}
@@ -20,23 +18,18 @@ Grade: {{ getGradeWithSuffix(studentData.studentData.grade) }}

-

- Class: { Placeholder } -

-

- Administration: {{ administrationData?.name }} -

+

Class: { Placeholder }

+

Administration: {{ administrationData?.name }}

-
-
- It looks like {{ studentFirstName }} is still working on completing their assigned games! -
+
It looks like {{ studentFirstName }} is still working on completing their assigned games!
-

{{ studentFirstName }}'s individual score report will be built when the student has completed at least one - assessment.

+

+ {{ studentFirstName }}'s individual score report will be built when the student has completed at least one + assessment. +

@@ -44,48 +37,56 @@
+ icon-pos="right" + data-html2canvas-ignore="true" + @click="setExpand" + /> + outlined + class="text-white" + label="Export to PDF" + icon="pi pi-download" + icon-pos="right" + data-html2canvas-ignore="true" + @click="printDownload" + />
-
- The Rapid Online Assessment of Reading (ROAR) - assesses students across a range of foundational reading skills. -
- {{ studentFirstName }} completed the following games: -
-
    +
    + The Rapid Online Assessment of Reading (ROAR) assesses students across a range of foundational reading skills. +
    {{ studentFirstName }} completed the following games:
    +
    • {{ formattedTasks }}
    - In this report, you will find {{ studentFirstName }}’s scoring at the time of testing, - as well as ways you can support {{ studentFirstName }} in - their path to reading fluency! + In this report, you will find {{ studentFirstName }}’s scoring at the time of testing, as well as ways you can + support {{ studentFirstName }} in their path to reading fluency and comprehension!
-
+ :student-data="studentData" + :task-data="taskData" + :raw-task-data="rawTaskData" + :expanded="expanded" + />
- This score report provides a broad overview of your student’s reading development. Understand that a - student’s - progress may not be linear, and their scores are not fixed- everyone has room to grow and learn. - - To learn more about any given test or subskill, click here. + This score report provides a broad overview of your student’s reading development. Understand that a student’s + progress may not be linear, and their scores are not fixed- everyone has room to grow and learn. To learn more + about any given test or subskill, and to find more resources for supporting your student + click here.
@@ -93,16 +94,17 @@ outlined class="text-white" label="Export to PDF" icon="pi pi-download"