-
Notifications
You must be signed in to change notification settings - Fork 4
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
Test All Open Administrations on Release #517
Conversation
Visit the preview URL for this PR (updated for commit d7f90df): https://roar-staging--pr517-test-open-administra-6b4bc6jt.web.app (expires Mon, 20 May 2024 18:24:25 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460 |
3 flaky tests on run #1617 ↗︎
Details:
playOptionalGames.cy.js • 1 flaky test
playFluency-ARF.cy.js • 1 flaky test
es-tests/playFluency-ARF-ES.cy.js • 1 flaky test
Review all test suite changes for PR #517 ↗︎ |
cypress/support/commands.js
Outdated
@@ -105,6 +105,7 @@ Cypress.Commands.add('selectAdministration', (testAdministration) => { | |||
.contains(testAdministration) | |||
.should('exist') | |||
.click(); | |||
cy.log('Selectected administration:', testAdministration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be corrected to Selected
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I requested a few minor changes. Also, I want to check the concurrency of these tests. Are we able to run each administration in parallel? Even better if we can run each assessment of each administration in parallel.
containers: [1, 2, 3, 4] | ||
env: | ||
NODE_ENV: 'test' | ||
CYPRESS_BASE_URL: 'http://localhost:5173' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use the staging link instead of localhost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, because we are testing the open administrations that have been synced from production Firestore to development Firestore. Running on dev will also allow us to run super admin tests which can clean up the dev database on a new relese (i.e. deleting all test runs).
cypress/support/helper-functions/roar-multichoice/languageOptions.js
Outdated
Show resolved
Hide resolved
async function getOpenAdmins() { | ||
cy.get('[data-cy=dropdown-select-administration]').click(); | ||
cy.get('.p-dropdown-panel').within(() => { | ||
cy.get('li').each((el) => { | ||
if (el.text().includes('Synced Administration')) { | ||
openAdmins.push(el.text()); | ||
} | ||
}); | ||
}); | ||
cy.get('[data-cy=dropdown-select-administration]').click(); | ||
} | ||
|
||
const openAdmins = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest returning the openAdmins
array from this function. Also, does this function need to be async? If so, I think we need to await it below. If not, can we remove the async
from it?
async function getOpenAdmins() { | |
cy.get('[data-cy=dropdown-select-administration]').click(); | |
cy.get('.p-dropdown-panel').within(() => { | |
cy.get('li').each((el) => { | |
if (el.text().includes('Synced Administration')) { | |
openAdmins.push(el.text()); | |
} | |
}); | |
}); | |
cy.get('[data-cy=dropdown-select-administration]').click(); | |
} | |
const openAdmins = []; | |
async function getOpenAdmins() { | |
const openAdmins = []; | |
cy.get('[data-cy=dropdown-select-administration]').click(); | |
cy.get('.p-dropdown-panel').within(() => { | |
cy.get('li').each((el) => { | |
if (el.text().includes('Synced Administration')) { | |
openAdmins.push(el.text()); | |
} | |
}); | |
}); | |
cy.get('[data-cy=dropdown-select-administration]').click(); | |
return openAdmins | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. No, this function does not need to be async afterall.
4fa4d44
to
47d36fa
Compare
06a31be
to
d7f90df
Compare
Closing this PR since its testing related changes have been incorporated into this PR: #570 |
This PR sets up a Cypress testing environment to test all currently open administrations on the ROAR dashboard. After administrations have been synced from production, the dev environment spins up and will loop through each assigned administration, then loop through and play each game assigned to that admininstration. If all games complete and all tests pass, the release will proceed.