-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fluency-colombia-prep
- Loading branch information
Showing
13 changed files
with
18,961 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
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'); | ||
}); | ||
}); |
49 changes: 49 additions & 0 deletions
49
cypress/e2e/partner-admin/default-tests/viewIndividualReport.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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const testDistrictId = Cypress.env('testDistrictId'); | ||
const testPartnerAdministrationName = Cypress.env('testPartnerAdministrationName'); | ||
const testPartnerAdministrationId = Cypress.env('testPartnerAdministrationId'); | ||
const testPartnerAdminUsername = Cypress.env('partnerAdminUsername'); | ||
const testPartnerAdminPassword = Cypress.env('partnerAdminPassword'); | ||
const timeout = Cypress.env('timeout'); | ||
const baseUrl = Cypress.env('baseUrl'); | ||
const testUserList = Cypress.env('testUserList'); | ||
const testAssignments = ['vocab', 'Multichoice']; | ||
|
||
function checkUrl() { | ||
cy.login(testPartnerAdminUsername, testPartnerAdminPassword); | ||
cy.navigateTo('/'); | ||
cy.url({ timeout: timeout }).should('eq', `${baseUrl}/`); | ||
} | ||
|
||
function clickScoreButton() { | ||
cy.get('button', { timeout: timeout }).contains('Scores').first().click(); | ||
cy.url({ timeout: timeout }).should( | ||
'eq', | ||
`${baseUrl}/scores/${testPartnerAdministrationId}/district/${testDistrictId}`, | ||
); | ||
} | ||
|
||
function checkAssignmentColumns() { | ||
cy.get('[data-cy="roar-data-table"] thead th').then(($header) => { | ||
const tableHeaders = $header.map((index, elem) => Cypress.$(elem).text()).get(); | ||
|
||
testAssignments.forEach((assignment) => { | ||
expect(tableHeaders).to.include(assignment); | ||
}); | ||
}); | ||
} | ||
|
||
describe('The partner admin can view score reports for a given administration.', () => { | ||
it('Selects an administration and views its score report.', () => { | ||
checkUrl(); | ||
cy.getAdministrationCard(testPartnerAdministrationName); | ||
clickScoreButton(); | ||
cy.checkUserList(testUserList); | ||
checkAssignmentColumns(testAssignments); | ||
cy.get('button').contains('Report').click(); | ||
cy.wait(4000); | ||
cy.get('div').contains('Individual Score Report'); | ||
cy.get('button').contains('Expand All Sections').click(); | ||
cy.get('button').contains('Export to PDF'); | ||
cy.get('div').contains('The ROAR assessements return 3 kinds of scores'); | ||
}); | ||
}); |
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
Oops, something went wrong.