diff --git a/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js b/cypress/e2e/participant/default-tests/playFluency-ARF.cy.js index bfdcea87e..bdbea210b 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 - Fluency ARF'); + cy.get('.p-tabview').contains('ROAM - Single-Digit'); cy.visit(`/game/fluency-arf`); // Click jspsych button to begin @@ -28,8 +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 - Fluency ARF') - .should('have.attr', 'data-game-status', 'complete'); + cy.get('.tabview-nav-link-label').contains('ROAM - Single-Digit').should('exist'); }); }); diff --git a/cypress/e2e/participant/default-tests/playSWR.cy.js b/cypress/e2e/participant/default-tests/playSWR.cy.js index f214d8ba4..ad6ed3cc2 100644 --- a/cypress/e2e/participant/default-tests/playSWR.cy.js +++ b/cypress/e2e/participant/default-tests/playSWR.cy.js @@ -12,7 +12,9 @@ describe('Testing playthrough of SWR as a participant', () => { cy.get('.p-tabview').contains('ROAR - Word'); cy.visit(`/game/swr`); - cy.get('.jspsych-btn', { timeout: timeout }).should('be.visible').click(); + cy.get('.jspsych-btn', { timeout: 3 * timeout }) + .should('be.visible') + .click(); // handles error where full screen throws a permissions error cy.wait(0.1 * timeout); diff --git a/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-3G.cy.js b/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-3G.cy.js index 6390a7003..bd395a901 100644 --- a/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-3G.cy.js +++ b/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-3G.cy.js @@ -11,7 +11,7 @@ describe('Test playthrough of Fluency as a participant', () => { cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.p-tabview', { timeout: timeout }).contains('ROAM - Fluency ARF'); + cy.get('.p-tabview', { timeout: timeout }).contains('ROAM - Single-Digit'); cy.visit(`/game/fluency-arf`); // Click jspsych button to begin @@ -21,12 +21,11 @@ describe('Test playthrough of Fluency as a participant', () => { playFluency(endText); + // Check if game is marked as complete on the dashboard // Check if game is marked as complete on the dashboard cy.visit('/'); cy.wait(0.2 * timeout); cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.tabview-nav-link-label', { timeout: timeout }) - .contains('ROAM - Fluency ARF') - .should('have.attr', 'data-game-status', 'complete'); + cy.get('.tabview-nav-link-label').contains('ROAM - Single-Digit').should('exist'); }); }); diff --git a/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-HighLatency.cy.js b/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-HighLatency.cy.js index a9c09107a..6475ff1e7 100644 --- a/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-HighLatency.cy.js +++ b/cypress/e2e/participant/network-tests/roam-fluency/playFluency-ARF-HighLatency.cy.js @@ -11,7 +11,7 @@ describe('Test playthrough of Fluency as a participant', () => { cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.p-tabview', { timeout: timeout }).contains('ROAM - Fluency ARF'); + cy.get('.p-tabview', { timeout: timeout }).contains('ROAM - Single-Digit'); cy.visit(`/game/fluency-arf`); // Click jspsych button to begin @@ -21,12 +21,11 @@ describe('Test playthrough of Fluency as a participant', () => { playFluency(endText); + // Check if game is marked as complete on the dashboard // Check if game is marked as complete on the dashboard cy.visit('/'); cy.wait(0.2 * timeout); cy.selectAdministration(Cypress.env('testRoarAppsAdministration')); - cy.get('.tabview-nav-link-label', { timeout: timeout }) - .contains('ROAM - Fluency ARF') - .should('have.attr', 'data-game-status', 'complete'); + cy.get('.tabview-nav-link-label').contains('ROAM - Single-Digit').should('exist'); }); }); diff --git a/cypress/e2e/participant/playPA.cy.js b/cypress/e2e/participant/playPA.cy.js deleted file mode 100644 index edd9e5d3c..000000000 --- a/cypress/e2e/participant/playPA.cy.js +++ /dev/null @@ -1,43 +0,0 @@ -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('exist') - .click(); - cy.get('.tabview-nav-link-label', { timeout: 2 * timeout }) - .contains('ROAR-Phoneme') - .should('have.attr', 'data-game-status', 'complete'); - }); -}); diff --git a/cypress/support/helper-functions/roam-fluency/fluencyHelpers.js b/cypress/support/helper-functions/roam-fluency/fluencyHelpers.js index 1bc696aff..dd09d3db0 100644 --- a/cypress/support/helper-functions/roam-fluency/fluencyHelpers.js +++ b/cypress/support/helper-functions/roam-fluency/fluencyHelpers.js @@ -1,6 +1,5 @@ const timeout = Cypress.env('timeout'); const participantId = '123456789'; -const practiceNumber = '1'; const questionInput = '42'; function typeEnter() { @@ -16,20 +15,14 @@ function playFluencyIntro() { // Click textbox and enter random participantId cy.get('#input-0', { timeout: timeout }).type(`${participantId} {enter}`); - typeEnter(); - - // Input any number - cy.get('#practice_number', { timeout: timeout }).type(practiceNumber); - - // Click enter + waitTimeout(); typeEnter(); waitTimeout(); - // Click enter - typeEnter(); + // Click enter + cy.get('body').type('1 {enter}'); waitTimeout(); - // Click enter typeEnter(); waitTimeout(); @@ -37,10 +30,20 @@ function playFluencyIntro() { cy.get('body').type('{backspace}'); waitTimeout(); - // Enter x2 - cy.get('body').type('x2 {enter}'); + // Input example number, enter x1 + cy.get('#practice_number').type('10'); waitTimeout(); + cy.get('#practice_number').type('{enter}'); + typeEnter(); + waitTimeout(); + + // Enter x2 + //cy.get("body").type("x2 {enter}"); + typeEnter(); + typeEnter(); + //waitTimeout(); + // Type 4, enter x2 cy.get('#question_input_key').type('4'); waitTimeout(); @@ -80,7 +83,6 @@ function checkGameComplete(endText) { cy.get('body').type('{enter}'); }); cy.log('Game complete.'); - cy.get('body', { timeout: timeout }).type('{enter}'); } else { cy.log('Continuing game...'); playFluencyLoop(); diff --git a/package-lock.json b/package-lock.json index 41c0c45a7..6034d2527 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,15 +8,15 @@ "name": "roar-dashboard", "version": "1.7.1", "dependencies": { - "@bdelab/roam-fluency": "^1.9.14", + "@bdelab/roam-fluency": "^1.10.5", "@bdelab/roar-firekit": "^4.8.7", "@bdelab/roar-letter": "^1.6.7", "@bdelab/roar-multichoice": "^1.9.4", "@bdelab/roar-pa": "^1.6.4", "@bdelab/roar-sre": "^1.11.4", - "@bdelab/roar-swr": "^1.8.4", + "@bdelab/roar-swr": "^1.8.7", "@bdelab/roar-utils": "^1.0.18", - "@bdelab/roar-vocab": "^1.6.10", + "@bdelab/roar-vocab": "^1.6.11", "@sentry/browser": "^7.103.0", "@sentry/integrations": "^7.103.0", "@sentry/vite-plugin": "^2.14.2", @@ -1560,9 +1560,9 @@ } }, "node_modules/@bdelab/roam-fluency": { - "version": "1.9.14", - "resolved": "https://registry.npmjs.org/@bdelab/roam-fluency/-/roam-fluency-1.9.14.tgz", - "integrity": "sha512-Pi/Fwf5yVg8DSNQq4KQouTZtVNVyo6OUjS3IqR+j3tv1ULMCOCeLVm8wwd7hj03PD2LjlMtjrNw7Ubugnh9Krw==", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/@bdelab/roam-fluency/-/roam-fluency-1.10.5.tgz", + "integrity": "sha512-qDkIjiz3ViiVjDmrEuAAyph4qQ7mfO/zHian3G5WzPkn3KFvJlE0e9UWkLgym9YnQCjMg0CcaZC/u8BfJVYgtQ==", "dependencies": { "@bdelab/jscat": "^4.0.0", "@bdelab/roar-firekit": "^4.7.0", @@ -3187,9 +3187,9 @@ } }, "node_modules/@bdelab/roar-swr": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/@bdelab/roar-swr/-/roar-swr-1.8.4.tgz", - "integrity": "sha512-y1ziD1TdiXgnnd5IvuJo3nLlVzCjmotHzRvbfo3PmVs8aKDTZgXjSMo6IlPsAQJujKeoCOzpTnxX8Y2gpKiFQA==", + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/@bdelab/roar-swr/-/roar-swr-1.8.7.tgz", + "integrity": "sha512-wYT8GLnDHgDyBgNmpgOA9SaqTTGSbd3fxzlDLnGYv8xxgBBJ9DEKGPXrjDhiSHELFmWZEckrHjSmCnYb8ggolw==", "dependencies": { "@bdelab/jscat": "^4.0.0", "@bdelab/roar-firekit": "^4.7.0", @@ -3630,9 +3630,9 @@ } }, "node_modules/@bdelab/roar-vocab": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@bdelab/roar-vocab/-/roar-vocab-1.6.10.tgz", - "integrity": "sha512-yAp3/8q1llKNGeY+voRa0FffQIDwN+/VnsSk64s5IafGhL65DNyPmUCyPUlBwYjQo/CfkAo7uDrIvFSAJCHDxw==", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@bdelab/roar-vocab/-/roar-vocab-1.6.11.tgz", + "integrity": "sha512-o0wB5yR9HLeki0dttK5EvvsCp/WymkD0BTAN/KBqf05OXppwqLSc85T0+U53FDQWURiKIdDS47YuIonxOf4YvQ==", "dependencies": { "@babel/core": "^7.19.0", "@babel/preset-env": "^7.19.0", @@ -26837,9 +26837,9 @@ } }, "@bdelab/roam-fluency": { - "version": "1.9.14", - "resolved": "https://registry.npmjs.org/@bdelab/roam-fluency/-/roam-fluency-1.9.14.tgz", - "integrity": "sha512-Pi/Fwf5yVg8DSNQq4KQouTZtVNVyo6OUjS3IqR+j3tv1ULMCOCeLVm8wwd7hj03PD2LjlMtjrNw7Ubugnh9Krw==", + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/@bdelab/roam-fluency/-/roam-fluency-1.10.5.tgz", + "integrity": "sha512-qDkIjiz3ViiVjDmrEuAAyph4qQ7mfO/zHian3G5WzPkn3KFvJlE0e9UWkLgym9YnQCjMg0CcaZC/u8BfJVYgtQ==", "requires": { "@bdelab/jscat": "^4.0.0", "@bdelab/roar-firekit": "^4.7.0", @@ -28164,9 +28164,9 @@ } }, "@bdelab/roar-swr": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/@bdelab/roar-swr/-/roar-swr-1.8.4.tgz", - "integrity": "sha512-y1ziD1TdiXgnnd5IvuJo3nLlVzCjmotHzRvbfo3PmVs8aKDTZgXjSMo6IlPsAQJujKeoCOzpTnxX8Y2gpKiFQA==", + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/@bdelab/roar-swr/-/roar-swr-1.8.7.tgz", + "integrity": "sha512-wYT8GLnDHgDyBgNmpgOA9SaqTTGSbd3fxzlDLnGYv8xxgBBJ9DEKGPXrjDhiSHELFmWZEckrHjSmCnYb8ggolw==", "requires": { "@bdelab/jscat": "^4.0.0", "@bdelab/roar-firekit": "^4.7.0", @@ -28506,9 +28506,9 @@ } }, "@bdelab/roar-vocab": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@bdelab/roar-vocab/-/roar-vocab-1.6.10.tgz", - "integrity": "sha512-yAp3/8q1llKNGeY+voRa0FffQIDwN+/VnsSk64s5IafGhL65DNyPmUCyPUlBwYjQo/CfkAo7uDrIvFSAJCHDxw==", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@bdelab/roar-vocab/-/roar-vocab-1.6.11.tgz", + "integrity": "sha512-o0wB5yR9HLeki0dttK5EvvsCp/WymkD0BTAN/KBqf05OXppwqLSc85T0+U53FDQWURiKIdDS47YuIonxOf4YvQ==", "requires": { "@babel/core": "^7.19.0", "@babel/preset-env": "^7.19.0", diff --git a/package.json b/package.json index ceae594bb..6a1d69eaa 100644 --- a/package.json +++ b/package.json @@ -24,15 +24,15 @@ "version": "npm run format && git add -A" }, "dependencies": { - "@bdelab/roam-fluency": "^1.9.14", + "@bdelab/roam-fluency": "^1.10.5", "@bdelab/roar-firekit": "^4.8.7", "@bdelab/roar-letter": "^1.6.7", "@bdelab/roar-multichoice": "^1.9.4", "@bdelab/roar-pa": "^1.6.4", "@bdelab/roar-sre": "^1.11.4", - "@bdelab/roar-swr": "^1.8.4", + "@bdelab/roar-swr": "^1.8.7", "@bdelab/roar-utils": "^1.0.18", - "@bdelab/roar-vocab": "^1.6.10", + "@bdelab/roar-vocab": "^1.6.11", "@sentry/browser": "^7.103.0", "@sentry/integrations": "^7.103.0", "@sentry/vite-plugin": "^2.14.2", diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 87508fb66..9141fc554 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -83,9 +83,9 @@ const isAtHome = computed(() => { const dropDownActions = computed(() => { const rawActions = getSidebarActions({ - isSuperAdmin: isSuperAdmin.value, + isSuperAdmin: isSuperAdmin.value, isAdmin: isAdmin.value, - includeHomeLink: !isAtHome.value + includeHomeLink: !isAtHome.value, }); return rawActions.map((action) => { return { @@ -148,6 +148,7 @@ const toggleMenu = (event) => { }; import ROARLogo from '@/assets/RoarLogo.vue'; +import LanguageSelector from './LanguageSelector.vue'; diff --git a/src/components/tasks/TaskFluency.vue b/src/components/tasks/TaskFluency.vue index 87b01a36b..105c19d95 100644 --- a/src/components/tasks/TaskFluency.vue +++ b/src/components/tasks/TaskFluency.vue @@ -17,7 +17,8 @@ import _get from 'lodash/get'; import { fetchDocById } from '@/helpers/query/utils'; const props = defineProps({ - taskId: { type: String, required: true, default: 'fluency' }, + taskId: { type: String, required: true, default: 'fluency-arf' }, + language: { type: String, required: true, default: 'en' }, }); const taskId = props.taskId; @@ -79,6 +80,7 @@ async function startTask() { grade: _get(userData.value, 'studentData.grade'), birthMonth: userDateObj.getMonth() + 1, birthYear: userDateObj.getFullYear(), + language: props.language, }; const gameParams = { ...appKit._taskInfo.variantParams }; diff --git a/src/pages/IndividualReport.vue b/src/pages/IndividualReport.vue index 8952369ed..adabe3c3a 100644 --- a/src/pages/IndividualReport.vue +++ b/src/pages/IndividualReport.vue @@ -79,7 +79,7 @@ :expanded="expanded" /> -
+
@@ -228,19 +228,18 @@ const exportToPdf = async () => { } const supportGraphic = document.getElementById('support-graphic'); if (supportGraphic !== null) { - yCounter = await addElementToPdf(supportGraphic, doc, yCounter); + await addElementToPdf(supportGraphic, doc, yCounter); } doc.save(`IndividualScoreReport_${studentFirstName.value}${studentLastName.value}.pdf`), (exportLoading.value = false); - - return; }; const tasks = computed(() => taskData?.value?.map((assignment) => assignment.taskId)); const formattedTasks = computed(() => { return ( + // eslint-disable-next-line vue/no-side-effects-in-computed-properties tasks?.value .sort((a, b) => { if (Object.keys(taskDisplayNames).includes(a) && Object.keys(taskDisplayNames).includes(b)) { diff --git a/src/pages/LEVANTE/RegisterUsers.vue b/src/pages/LEVANTE/RegisterUsers.vue index e95d387c0..caef1fb38 100644 --- a/src/pages/LEVANTE/RegisterUsers.vue +++ b/src/pages/LEVANTE/RegisterUsers.vue @@ -227,7 +227,6 @@ function getKeyByValue(object, value) { return Object.keys(object).find((key) => object[key] === value); } - async function submitUsers() { // Reset error users activeSubmit.value = true; diff --git a/src/router/index.js b/src/router/index.js index af1a15407..a32b041dc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -97,42 +97,42 @@ const routes = [ path: '/game/fluency-arf', name: 'Fluency-ARF', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-arf' }, + props: { taskId: 'fluency-arf', language: 'en' }, meta: { pageTitle: 'Fluency-ARF' }, }, { path: '/game/fluency-arf-es', name: 'Fluency-ARF-ES', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-arf-es' }, + props: { taskId: 'fluency-arf-es', language: 'es' }, meta: { pageTitle: 'Fluency-ARF ES' }, }, { path: '/game/fluency-calf', name: 'Fluency-CALF', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-calf' }, + props: { taskId: 'fluency-calf', language: 'en' }, meta: { pageTitle: 'Fluency-CALF' }, }, { path: '/game/fluency-calf-es', name: 'Fluency-CALF-ES', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-calf-es' }, + props: { taskId: 'fluency-calf-es', language: 'es' }, meta: { pageTitle: 'Fluency-CALF ES' }, }, { path: '/game/fluency-alpaca', name: 'Fluency-Alpaca', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-alpaca' }, + props: { taskId: 'fluency-alpaca', language: 'en' }, meta: { pageTitle: 'Fluency-Alpaca' }, }, { path: '/game/fluency-alpaca-es', name: 'Fluency-Alpaca-ES', component: () => import('../components/tasks/TaskFluency.vue'), - props: { taskId: 'fluency-alpaca-es' }, + props: { taskId: 'fluency-alpaca-es', language: 'es' }, meta: { pageTitle: 'Fluency-Alpaca ES' }, }, { @@ -325,7 +325,7 @@ const router = createRouter({ router.beforeEach(async (to) => { // Don't allow routing to LEVANTE pages if not in LEVANTE instance if (import.meta.env.MODE !== 'LEVANTE' && to.meta?.project === 'LEVANTE') { - return { path: "/"} + return { path: '/' }; } const store = useAuthStore(); diff --git a/src/router/sidebarActions.js b/src/router/sidebarActions.js index 2b8d1fb19..6a1b4bf6b 100644 --- a/src/router/sidebarActions.js +++ b/src/router/sidebarActions.js @@ -64,7 +64,7 @@ const sidebarActionOptions = [ }, ]; -export const getSidebarActions = ({isSuperAdmin = false, isAdmin = false, includeHomeLink = true}) => { +export const getSidebarActions = ({ isSuperAdmin = false, isAdmin = false, includeHomeLink = true }) => { if (import.meta.env.MODE === 'LEVANTE') { return sidebarActionOptions.filter((action) => { if (action.project === 'LEVANTE' || action.project === 'ALL') {