Skip to content

Commit

Permalink
Merge pull request #484 from yeatmanlab/enh/adding-fonema
Browse files Browse the repository at this point in the history
Add Fonema and Letra
  • Loading branch information
Emily-ejag authored Apr 9, 2024
2 parents 62f8b3c + dfdb60c commit e0cfb16
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 21 deletions.
7 changes: 6 additions & 1 deletion cypress/e2e/participant/default-tests/playPA.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const endBlockText = {
endText3: 'You have helped me and all my friends!',
};
const breakBlockText = 'Take a break if needed';
const breakBlockText2 = {
break1: 'Great job',
break2: 'Look at all those carrots',
break3: 'You are doing great',
};

describe('Testing playthrough of ROAR-Phoneme as a participant', () => {
it(`ROAR-Phoneme Playthrough Test`, () => {
Expand All @@ -19,7 +24,7 @@ describe('Testing playthrough of ROAR-Phoneme as a participant', () => {
// cy.get(".p-tabview").contains(pa.name);
cy.visit('/game/pa');

playPA(startText, breakBlockText, endBlockText);
playPA(startText, breakBlockText, breakBlockText2, endBlockText);

cy.visit('/');
cy.wait(0.2 * timeout);
Expand Down
18 changes: 14 additions & 4 deletions cypress/support/helper-functions/roar-pa/paHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const playTrial = (targetText) => {
cy.log(correctAnswer);

cy.log('Game in progress; selecting correct answer.');
// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get(`img[src*="${correctAnswer}.webp"]`, { timeout: timeout })
.first()
.click()
Expand Down Expand Up @@ -109,26 +110,35 @@ function playThirdTutorial() {
cy.get('.continue').click();
}

export function playPA(startText, breakText, endText) {
export function playPA(startText, breakText, breakText2, endText) {
playIntro(startText);

playFirstTutorial();
// fsmBreak
cy.log('break 1');
playTrial(breakText2.break1);
cy.get('.continue', { timeout: 2 * timeout }).click();
playTrial(breakText);

cy.wait(3 * timeout);
cy.get('.continue', { timeout: 4 * timeout }).click();
playSecondTutorial('default');
playTrial(breakText2.break2);
cy.get('.continue', { timeout: 2 * timeout }).click();
playSecondTutorial();
playTrial(breakText);
// lsmBreak
cy.wait(3 * timeout);
cy.log('break 2');
cy.get('.continue', { timeout: 2 * timeout }).click();
playTrial(endText.endText2);

cy.get('.continue', { timeout: 2 * timeout }).click();
playThirdTutorial();
cy.wait(3 * timeout);
cy.get('.continue', { timeout: 4 * timeout }).click();
playThirdTutorial('default');
// delBreak
cy.log('break 3');
playTrial(breakText2.break3);
cy.get('.continue', { timeout: 2 * timeout }).click();
playTrial(endText.endText3);
// playIntro(startText);

Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"dependencies": {
"@bdelab/roam-fluency": "^1.11.10",
"@bdelab/roar-firekit": "^4.9.0",
"@bdelab/roar-letter": "^1.10.0",
"@bdelab/roar-letter": "^1.11.0",
"@bdelab/roar-multichoice": "^1.11.1",
"@bdelab/roar-pa": "^1.7.0",
"@bdelab/roar-pa": "^1.7.1",
"@bdelab/roar-sre": "^1.13.3",
"@bdelab/roar-swr": "^1.9.2",
"@bdelab/roar-utils": "^1.2.1",
Expand Down

0 comments on commit e0cfb16

Please sign in to comment.