Skip to content

Commit

Permalink
Cypress test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saulipurhonen committed Aug 10, 2021
1 parent c9d2cc3 commit 57f5a32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cypress/integration/editForm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe("Populate form and render form elements by object data", function () {
cy.get("[data-testid='sampleData.dataDescription']").should("have.value", testData.sampleTypeDescription)

// Clear object in state
cy.get("button[type=button]", { timeout: 10000 }).contains("New form").should("exist")
cy.get("button[type=button]").contains("New form").click()

// Test updated title
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/objectTitles.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe("draft and submitted objects' titles", function () {

// Edit submitted object
cy.get("button[type=button]").contains("Edit").click()
cy.get("@studyTitle").should("have.value", "Test title")
cy.get("@studyTitle").type(" 2").blur()
cy.get("@studyTitle", { timeout: 10000 }).should("have.value", "Test title").type(" 2")
cy.get("@studyTitle").blur()
cy.get("@studyTitle").should("have.value", "Test title 2")
cy.get("button[type=button]").contains("Update", { timeout: 10000 }).click()
cy.get("div[role=alert]").contains("Object updated")
Expand Down

0 comments on commit 57f5a32

Please sign in to comment.