Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep Roam Fluency for Colombia #407

Merged
merged 15 commits into from
Mar 11, 2024
Merged
6 changes: 2 additions & 4 deletions cypress/e2e/participant/default-tests/playFluency-ARF.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 - Fluency ARF').should('exist');
});
});
4 changes: 3 additions & 1 deletion cypress/e2e/participant/default-tests/playSWR.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 0 additions & 43 deletions cypress/e2e/participant/playPA.cy.js

This file was deleted.

28 changes: 15 additions & 13 deletions cypress/support/helper-functions/roam-fluency/fluencyHelpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const timeout = Cypress.env('timeout');
const participantId = '123456789';
const practiceNumber = '1';
const questionInput = '42';

function typeEnter() {
Expand All @@ -16,31 +15,35 @@ 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();

// Click backspace
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();
Expand Down Expand Up @@ -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();
Expand Down
Loading
Loading