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

Test All Open Administrations on Release #517

Closed
wants to merge 11 commits into from

Conversation

ksmontville
Copy link
Collaborator

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.

Copy link

github-actions bot commented Apr 19, 2024

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

Copy link

cypress bot commented Apr 19, 2024

3 flaky tests on run #1617 ↗︎

0 45 0 0 Flakiness 3

Details:

Tests for PR 517 "Test All Open Administrations on Release" from commit "d7f90df...
Project: roar-dashboard-e2e Commit: d7f90dfd71
Status: Passed Duration: 36:14 💡
Started: May 13, 2024 6:28 PM Ended: May 13, 2024 7:04 PM
Flakiness  playOptionalGames.cy.js • 1 flaky test

View Output

Test Artifacts
Play Optional Games > Plays ROAR - Word Test Replay Screenshots
Flakiness  playFluency-ARF.cy.js • 1 flaky test

View Output

Test Artifacts
Test playthrough of Fluency as a participant > Fluency Playthrough Test Test Replay Screenshots
Flakiness  es-tests/playFluency-ARF-ES.cy.js • 1 flaky test

View Output

Test Artifacts
Test playthrough of Fluency ARF ES as a participant > Fluency Playthrough Test Test Replay Screenshots

Review all test suite changes for PR #517 ↗︎

@@ -105,6 +105,7 @@ Cypress.Commands.add('selectAdministration', (testAdministration) => {
.contains(testAdministration)
.should('exist')
.click();
cy.log('Selectected administration:', testAdministration);
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks!

Copy link
Contributor

@richford richford left a 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'
Copy link
Contributor

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?

Copy link
Collaborator Author

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/commands.js Outdated Show resolved Hide resolved
Comment on lines 74 to 86
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 = [];
Copy link
Contributor

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?

Suggested change
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
}

Copy link
Collaborator Author

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.

@ksmontville ksmontville force-pushed the test-open-administrations branch 2 times, most recently from 4fa4d44 to 47d36fa Compare May 9, 2024 20:33
@ksmontville
Copy link
Collaborator Author

Closing this PR since its testing related changes have been incorporated into this PR: #570

@richford richford deleted the test-open-administrations branch May 21, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants