Skip to content

Commit

Permalink
Merge pull request #2329 from concord-consortium/fix-flaky-cypress-test
Browse files Browse the repository at this point in the history
Cypress updates
  • Loading branch information
scytacki authored Jul 6, 2024
2 parents 5135999 + 7baa705 commit 69c7860
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 13 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ jobs:
# If we run out cypress test runs then we temporarily expand the timeout to 4hrs until cypress cloud is available
# again
# timeout-minutes: 240
container: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
container:
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
# This is needed so the commit info can be recorded by cypress
options: --user 1001
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
cypress:
runs-on: ubuntu-latest
container: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
container:
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
# This is needed so the commit info can be recorded by cypress
options: --user 1001
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/manual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ on:
jobs:
all-tests:
runs-on: ubuntu-latest
container: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
container:
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
# This is needed so the commit info can be recorded by cypress
options: --user 1001
if: ${{ github.event.inputs.test == 'all' }}
strategy:
# when one test fails, DO NOT cancel the other
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/regression-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
jobs:
all-tests:
runs-on: ubuntu-latest
container: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
container:
image: cypress/browsers:node-20.11.0-chrome-121.0.6167.184-1-ff-123.0-edge-121.0.2277.128-1
# This is needed so the commit info can be recorded by cypress
options: --user 1001
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ describe('SortWorkView Tests', () => {


it("should open Sort Work tab and test sorting by group", () => {
// Clear data before the test so it can be retried and will start with a clean slate
cy.clearQAData('all');

const students = ["student:1", "student:2", "student:3", "student:4"];
const studentProblemDocs = [
`Student 1: ${title}`,
Expand Down
5 changes: 4 additions & 1 deletion cypress/support/elements/common/cHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ class ClueHeader{
getGroupMembers(){
return cy.get('[data-test=group-members]');
}

leaveGroup(){
this.getGroupName().click();
dialog.getDialogTitle().should('contain', 'Leave Group');
dialog.getDialogOKButton().click();

// Wait a little bit to make sure this group change makes it to the database
cy.wait(500);
}

cancelLeaveGroup(){
Expand Down
3 changes: 0 additions & 3 deletions dependencies-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ Notes on dependencies, particularly reasons for not updating to their latest ver
|@types/react-dom |17.0.17 |18.0.6 |React 18 |
|@types/react-tabs |2.3.4 |5.0.5 |Versions 3 and 4 were never published(?); Version 5 requires React 18 |
|@types/slate-react |0.22.9 |0.50.1 |Requires slate-editor library update to latest slate |
|cypress |9.7.0 |10.6.0 |Cypress 10 requires non-trivial migration. |
|cypress-commands |2.0.1 |3.0.0 |Cypress 10 |
|cypress-terminal-report |3.5.2 |4.1.2 |Cypress 10 |

## Runtime Dependencies

Expand Down
11 changes: 7 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"cypress": "^13.5.0",
"cypress-commands": "2.0.1",
"cypress-commands": "3.0.0",
"cypress-file-upload": "^5.0.8",
"cypress-terminal-report": "^4.1.2",
"enquirer": "^2.3.6",
Expand Down

0 comments on commit 69c7860

Please sign in to comment.