Skip to content

Commit

Permalink
Cypress E2E improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
saulipurhonen committed Apr 30, 2021
1 parent 7c4d413 commit a860235
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/errorPages.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ describe("catch error codes and display corresponding error page", function () {
)
cy.visit(baseUrl)
cy.get('[alt="CSC Login"]').click()
cy.contains(".MuiAlert-message", "500 Internal Server Error")
cy.contains(".MuiAlert-message", "500 Internal Server Error", { timeout: 10000 })
})
})
2 changes: 1 addition & 1 deletion cypress/integration/objectTitles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("draft and submitted objects' titles", function () {
cy.get("input[name='descriptor.studyTitle']").should("have.value", "Test title")
cy.get("input[name='descriptor.studyTitle']").type(" 2").blur()
cy.get("input[name='descriptor.studyTitle']").should("have.value", "Test title 2")
cy.get("button[type=button]").contains("Update").click()
cy.get("button[type=button]", { timeout: 10000 }).contains("Update").click()
cy.get("div[role=alert]").contains("Object updated")

// Check the submitted object has correctly updated displayTitle
Expand Down
5 changes: 5 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ import "./commands"

// Alternatively you can use CommonJS syntax:
// require('./commands')

// Turn off all uncaught exception handling
Cypress.on("uncaught:exception", () => {
return false
})

0 comments on commit a860235

Please sign in to comment.