-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
5,617 additions
and
1,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Run Cypress Partner Admin Tests | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
concurrency: | ||
group: ci-preview-tests-${{ github.ref }}-2 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cypress-run: | ||
name: Run Cypress Partner Admin Tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: [chromium, edge] | ||
containers: [1, 2] | ||
env: | ||
NODE_OPTIONS: '--max_old_space_size=8192' | ||
NODE_ENV: 'test' | ||
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 }}" | ||
COMMIT_INFO_SHA: ${{ github.event.pull_request.head.sha }} | ||
PARTNER_ADMIN_USERNAME: ${{ secrets.PARTNER_ADMIN_USERNAME }} | ||
PARTNER_ADMIN_PASSWORD: ${{ secrets.PARTNER_ADMIN_PASSWORD }} | ||
PARTNER_ADMIN_ID: ${{ secrets.PARTNER_ADMIN_ID }} | ||
PARTICIPANT_USERNAME: ${{ secrets.PARTICIPANT_USERNAME}} | ||
PARTICIPANT_PASSWORD: ${{ secrets.PARTICIPANT_PASSWORD }} | ||
PARTICIPANT_EMAIL: ${{ secrets.PARTICIPANT_EMAIL }} | ||
PARTICIPANT_EMAIL_PASSWORD: ${{ secrets.PARTICIPANT_EMAIL_PASSWORD }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
browser: ${{ matrix.browser }} | ||
build: npm ci && npm run build | ||
start: npm run dev | ||
wait-on: ${{ env.CYPRESS_BASE_URL }} | ||
wait-on-timeout: 120 | ||
record: true | ||
parallel: true | ||
spec: 'cypress/e2e/partner-admin/default-tests/**/*' | ||
ci-build-id: ${{ github.run_id }}-${{ matrix.browser }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build and Deploy | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
concurrency: | ||
group: ci-preview-tests-${{ github.ref }}-1 | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-preview: | ||
name: Deploy Preview | ||
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
- name: 'vite build' | ||
run: npm ci && npm run build | ||
- name: Deploy to Firebase Hosting Channel | ||
id: firebase-deploy | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GSE_ROAR_ADMIN }}' | ||
projectId: gse-roar-admin | ||
target: staging | ||
- run: echo ${{ fromJson(steps.firebase-deploy.outputs.urls)[0] }} | ||
outputs: | ||
deployUrl: ${{ fromJson(steps.firebase-deploy.outputs.urls)[0] }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 18 additions & 25 deletions
43
cypress/e2e/participant/default-tests/es-tests/playFluency-ARF-ES.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,27 @@ | ||
import { playFluency } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers'; | ||
import { playFluencyARF } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers'; | ||
import { isCurrentVersion } from '../../../../support/utils'; | ||
|
||
const timeout = Cypress.env('timeout'); | ||
const administration = Cypress.env('testSpanishRoarAppsAdministration'); | ||
const language = 'es'; | ||
const task = 'fluency-arf-es'; | ||
const endText = 'Has terminado.'; | ||
|
||
const app = '@bdelab/roam-fluency'; | ||
|
||
describe('Test playthrough of Fluency ARF ES as a participant', () => { | ||
it('Fluency Playthrough Test', () => { | ||
Cypress.on('uncaught:exception', () => { | ||
return false; | ||
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({ | ||
administration: administration, | ||
language: language, | ||
task: task, | ||
endText: endText, | ||
}); | ||
} | ||
}); | ||
|
||
cy.login(Cypress.env('participantUsername'), Cypress.env('participantPassword')); | ||
cy.visit('/'); | ||
|
||
cy.selectAdministration(administration); | ||
|
||
cy.get('.p-tabview').contains('ROAM - Un Dígito'); | ||
cy.visit(`/game/fluency-arf-es`); | ||
|
||
// Click jspsych button to begin | ||
cy.get('.jspsych-btn', { timeout: 5 * timeout }) | ||
.should('be.visible') | ||
.click(); | ||
|
||
playFluency(endText); | ||
|
||
// Check if game is marked as complete on the dashboard | ||
cy.visit('/'); | ||
cy.wait(0.2 * timeout); | ||
cy.selectAdministration(administration); | ||
cy.get('.tabview-nav-link-label').contains('ROAM - Un Dígito').should('exist'); | ||
}); | ||
}); |
44 changes: 19 additions & 25 deletions
44
cypress/e2e/participant/default-tests/es-tests/playFluency-CALF-ES.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
import { playFluency } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers'; | ||
import { playFluencyCALF } from '../../../../support/helper-functions/roam-fluency/fluencyHelpers'; | ||
import { isCurrentVersion } from '../../../../support/utils'; | ||
|
||
const timeout = Cypress.env('timeout'); | ||
const administration = Cypress.env('testSpanishRoarAppsAdministration'); | ||
const language = 'es'; | ||
const task = 'fluency-calf-es'; | ||
const endText = 'Has terminado.'; | ||
const continueText = 'continuar'; | ||
|
||
const app = '@bdelab/roam-fluency'; | ||
|
||
describe('Test playthrough of Fluency ARF ES as a participant', () => { | ||
it('Fluency Playthrough Test', () => { | ||
Cypress.on('uncaught:exception', () => { | ||
return false; | ||
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({ | ||
administration: administration, | ||
language: language, | ||
task: task, | ||
endText: endText, | ||
continueText: continueText, | ||
}); | ||
} | ||
}); | ||
|
||
cy.login(Cypress.env('participantUsername'), Cypress.env('participantPassword')); | ||
cy.visit('/'); | ||
|
||
cy.selectAdministration(administration); | ||
|
||
cy.get('.p-tabview').contains('ROAM - Varios Dígitos'); | ||
cy.visit(`/game/fluency-calf-es`); | ||
|
||
// Click jspsych button to begin | ||
cy.get('.jspsych-btn', { timeout: 5 * timeout }) | ||
.should('be.visible') | ||
.click(); | ||
|
||
playFluency(endText, continueText); | ||
|
||
// Check if game is marked as complete on the dashboard | ||
cy.visit('/'); | ||
cy.wait(0.2 * timeout); | ||
cy.selectAdministration(administration); | ||
cy.get('.tabview-nav-link-label').contains('ROAM - Varios Dígitos').should('exist'); | ||
}); | ||
}); |
16 changes: 15 additions & 1 deletion
16
cypress/e2e/participant/default-tests/es-tests/playLetter-ES.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
import { playLetter } from '../../../../support/helper-functions/roar-letter/letterHelpers'; | ||
import { isCurrentVersion } from '../../../../support/utils'; | ||
|
||
const administration = Cypress.env('testSpanishRoarAppsAdministration'); | ||
const language = 'es'; | ||
const gameCompleteText = '¡Has terminado! ¡Gracias por ayudarme a encontrar esas letras!'; | ||
|
||
const app = '@bdelab/roar-letter'; | ||
|
||
describe('ROAR - Letra Play Through', () => { | ||
it('Plays Letra', () => { | ||
playLetter(administration, language, gameCompleteText); | ||
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({ | ||
administration: administration, | ||
language: language, | ||
gameCompleteText: gameCompleteText, | ||
}); | ||
} | ||
}); | ||
}); | ||
}); |
15 changes: 14 additions & 1 deletion
15
cypress/e2e/participant/default-tests/es-tests/playSentence-ES.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import { playSRE } from '../../../../support/helper-functions/roar-sre/sreHelpers'; | ||
import { isCurrentVersion } from '../../../../support/utils'; | ||
|
||
const administration = Cypress.env('testSpanishRoarAppsAdministration'); | ||
const language = 'es'; | ||
|
||
const app = '@bdelab/roar-sre'; | ||
|
||
describe('ROAR - Sentence Play Through', () => { | ||
it('Plays SRE', () => { | ||
playSRE(administration, language); | ||
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({ | ||
administration: administration, | ||
language: language, | ||
}); | ||
} | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.