Skip to content

Commit

Permalink
Merge branch 'main' into enh/change-password-email
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyel committed Jul 19, 2024
2 parents e9e1f8a + 1c006d8 commit f73f5d1
Show file tree
Hide file tree
Showing 83 changed files with 3,010 additions and 1,814 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cypress-participant-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
env:
NODE_OPTIONS: '--max_old_space_size=8192'
NODE_ENV: 'test'
CLEVER_USERNAME: ${{ secrets.CLEVER_USERNAME }}
CLEVER_PASSWORD: ${{ secrets.CLEVER_PASSWORD }}
CYPRESS_BASE_URL: 'http://localhost:5173'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: Tests for PR ${{ github.event.number }} "${{ github.event.pull_request.title }}" from commit "${{ github.event.pull_request.head.sha }}"
Expand Down
6 changes: 5 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module.exports = defineConfig({
participantPassword: process.env.PARTICIPANT_PASSWORD,
participantEmail: process.env.PARTICIPANT_EMAIL,
participantEmailPassword: process.env.PARTICIPANT_EMAIL_PASSWORD,
cleverOAuthLink: 'https://clever.com/oauth/authorize',
cleverSchoolName: '61e8aee84cf0e71b14295d45',
cleverUsername: process.env.CLEVER_USERNAME,
cleverPassword: process.env.CLEVER_PASSWORD,
testAdministrationName: 'Cypress Test Administration',
testAdministrationId: 'kKUSypkMc36mPEzleDE6',
testAdministratorFirstName: 'Cypress Test Administrator First Name',
Expand Down Expand Up @@ -80,7 +84,7 @@ module.exports = defineConfig({
testRoarAppsAdministration: 'Cypress Test Roar Apps Administration',
testRoarAppsAdministrationId: 'K8UaI8p79Dntj5Z2CJk8',
testOptionalRoarAppsAdministration: 'Cypress Test Optional Roar Apps Administration',
testOptionalRoarAppsAdministrationId: '',
testOptionalRoarAppsAdministrationId: 'Fuy4nQaMu6YmfNg1eBYH',
testSpanishRoarAppsAdministration: 'Cypress Test Spanish Roar Apps Administration',
testSpanishRoarAppsAdministrationId: '',
// Generate a list of test users CypressTestStudent0, CypressTestStudent1, ..., CypressTestStudent50
Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/participant/default-tests/checkLegalDoc.cy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const timeout = Cypress.env('timeout');

describe('Test to maintain that assent form shows in when signing in with an un-assented user', () => {
it('passes', () => {
// this is a user that has an assignment of roarVocab -- how can we create a user that can
Expand All @@ -8,7 +10,7 @@ describe('Test to maintain that assent form shows in when signing in with an un-
cy.login(test_login, test_pw);
cy.visit('/');
cy.wait(1000);
cy.get('.p-dialog-title').contains('CONSENT FORM').should('be.visible');
cy.get('.p-dialog-title', { timeout: timeout }).contains('CONSENT FORM').should('be.visible');
cy.get('.p-confirm-dialog-accept').contains('Continue').should('be.visible');
});
});
12 changes: 12 additions & 0 deletions cypress/e2e/participant/default-tests/cleverSignIn.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { signInWithClever } from '../../../support/helper-functions/participant/participant-helpers';

export const timeout = Cypress.env('timeout');

describe('Cypress test to login in Clever', () => {
it('passes', () => {
cy.visit('/');
signInWithClever();

cy.contains('tasks completed!', { timeout: 2 * timeout }).should('be.visible');
});
});
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playCVA.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roar-multichoice';

describe('ROAR - Written Vocabulary Playthrough', () => {
it('Plays CVA', () => {
it('Plays CVA with username/password combo', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playWrittenVocabulary();
playWrittenVocabulary({ auth: 'username' });
}
});
});
it('Plays CVA with Clever auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playWrittenVocabulary({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playFluency-ARF.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roam-fluency';

describe('Test playthrough of Fluency as a participant', () => {
it('Fluency Playthrough Test', () => {
it('Fluency Playthrough Test with username/password authentication', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyARF();
playFluencyARF({ auth: 'username' });
}
});
});
it('Fluency Playthrough Test with Clever authentication', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyARF({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playFluency-CALF.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ import { isCurrentVersion } from '../../../support/utils';

const app = '@bdelab/roam-fluency';

describe('Test playthrough of Fluency as a participant', () => {
describe('Test playthrough of Fluency as a participant using username authentication', () => {
it('Fluency Playthrough Test', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyCALF();
playFluencyCALF({ auth: 'username' });
}
});
});
it('Fluency Playthrough Test using Clever authentication', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyCALF({ auth: 'clever' });
}
});
});
Expand Down
16 changes: 13 additions & 3 deletions cypress/e2e/participant/default-tests/playLetter.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ import { isCurrentVersion } from '../../../support/utils';

const app = '@bdelab/roar-letter';

describe('ROAR - Letra Play Through', () => {
it('Plays Letra', () => {
describe('ROAR - Letter Play Through using username authentication', () => {
it('Plays Letter with username authentication', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playLetter();
playLetter({ auth: 'username' });
}
});
});
it('Plays Letter with Clever authentication', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playLetter({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playMorphology.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roar-multichoice';

describe('ROAR - Written Vocabulary Play Through', () => {
it('Plays Written Vocabulary', () => {
it('Plays Written Vocabulary with username/password auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playMorphology();
playMorphology({ auth: 'username' });
}
});
});
it('Plays Written Vocabulary with Clever auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playMorphology({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playPA.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roar-pa';

describe('Testing playthrough of ROAR-Phoneme as a participant', () => {
it(`ROAR-Phoneme Playthrough Test`, () => {
it(`ROAR-Phoneme Playthrough Test with username auth`, () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playPA();
playPA({ auth: 'username' });
}
});
});
it(`ROAR-Phoneme Playthrough Test with Clever auth`, () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playPA({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playSRE.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roar-sre';

describe('ROAR - Sentence Play Through', () => {
it('Plays SRE', () => {
it('Plays SRE with username auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playSRE();
playSRE({ auth: 'username' });
}
});
});
it('Plays SRE with Clever auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playSRE({ auth: 'clever' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playSWR.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@ import { isCurrentVersion } from '../../../support/utils';
const app = '@bdelab/roar-swr';

describe('ROAR - Word Play Through', () => {
it('Plays Word', () => {
it('Plays Word with username auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playSWR();
playSWR({ auth: 'username' });
}
});
});
it('Plays Word with Clever auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playSWR({ auth: 'clever' });
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/participant/default-tests/playSyntax.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const app = 'core-tasks';
const administration = 'Cypress Test Roar Syntax';

describe('ROAR - Syntax Play Through', () => {
it('Plays the Roar Syntax/Core Tasks Game', () => {
it('Plays the Roar Syntax/Core Tasks Game with username auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playSyntax({ administration: administration });
playSyntax({ administration: administration, auth: 'username' });
}
});
});
Expand Down
14 changes: 12 additions & 2 deletions cypress/e2e/participant/default-tests/playVocab.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ import { isCurrentVersion } from '../../../support/utils';

const app = '@bdelab/roar-vocab';
describe('ROAR - Vocabulary Play Through', () => {
it('Plays Vocabulary', () => {
it('Plays Vocabulary with username auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playVocabulary();
playVocabulary({ auth: 'username' });
}
});
});
it('Plays Vocabulary with Clever auth', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playVocabulary({ auth: 'clever' });
}
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { playFluencyCALF } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers';
import { isCurrentVersion } from '../../../../support/utils';

const app = '@bdelab/roam-fluency';

describe('Test playthrough of Fluency-CALF as a participant in a simulate 3G connection', () => {
it('Fluency Playthrough Test', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyCALF({ auth: 'username' });
}
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { playFluencyCALF } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers';
import { isCurrentVersion } from '../../../../support/utils';

const app = '@bdelab/roam-fluency';

describe('Test playthrough of Fluency-CALF as a participant in a simulate 3G connection', () => {
it('Fluency Playthrough Test', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playFluencyCALF({ auth: 'username' });
}
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { playLetter } from '../../../../support/helper-functions/roar-letter/letterHelpers';
import { isCurrentVersion } from '../../../../support/utils';

const app = '@bdelab/roar-letter';

describe('ROAR - Letter Play Through using username authentication', () => {
it('Plays Letter with username authentication in a simulated 3g connection', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playLetter({ auth: 'username' });
}
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { playLetter } from '../../../../support/helper-functions/roar-letter/letterHelpers';
import { isCurrentVersion } from '../../../../support/utils';

const app = '@bdelab/roar-letter';

describe('ROAR - Letter Play Through using username authentication', () => {
it('Plays Letter with username authentication in a simulated high latency network', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playLetter({ auth: 'username' });
}
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { playMorphology } from '../../../../support/helper-functions/roar-multichoice/multichoiceHelpers';
import { isCurrentVersion } from '../../../../support/utils';

const app = '@bdelab/roar-multichoice';

describe('ROAR - Written Vocabulary Play Through', () => {
it('Plays Written Vocabulary with a simulated 3g network', () => {
cy.wrap(isCurrentVersion(app)).then((isCurrentVersion) => {
if (isCurrentVersion) {
cy.log(`Did not detect a new version of ${app}, skipping test.`);
} else {
cy.log(`Detected a new version of ${app}, running test.`);
playMorphology({ auth: 'username' });
}
});
});
});
Loading

0 comments on commit f73f5d1

Please sign in to comment.