Skip to content

Commit

Permalink
change bouquet project, added more waiting time, click on field befor…
Browse files Browse the repository at this point in the history
…e typing
  • Loading branch information
norbertschuler committed Jun 11, 2022
1 parent 41d678f commit a2fc692
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cypress/integration/bouquetDonations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ describe("Bouquet Donations", () => {

it("Testing Restore bouquetDonation", () => {
// cy.bouquetDonation("proj_bAwk5Agpfj1xcG61tFXMqKbu", "Germany{enter}", "de", "ten_1e5WejOp")
cy.bouquetDonation("proj_6x3GTD5cMRv0OeQAiIlJZ0Au", "United States of America{enter}", "us", "ten_1e5WejOp")
// cy.bouquetDonation("proj_6x3GTD5cMRv0OeQAiIlJZ0Au", "United States of America{enter}", "us", "ten_1e5WejOp")
cy.bouquetDonation("proj_lZIhXOL00Pw4cRUMIlnDGPaQ", "United States of America{enter}", "us", "ten_NxJq55pm")
cy.cardPayment("4242424242424242", "424", "242")
});
})
14 changes: 7 additions & 7 deletions cypress/integration/formError.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("Form Error Tests", () => {
cy.get('[data-test-id="test-country"]').clear().type("Germany{enter}").get('body').click(0,0)
cy.get('[data-test-id="test-continueToPayment"]').click()
cy.get('.form-errors').should("have.text", "First Name is required")
cy.get('[data-test-id="test-firstName"]').type("Peter")
cy.get('[data-test-id="test-firstName"]').click().type("Peter")
cy.get('body').should("not.have.text", "First Name is required")
})

Expand All @@ -31,7 +31,7 @@ describe("Form Error Tests", () => {
cy.get('[data-test-id="test-country"]').clear().type("Germany{enter}").get('body').click(0,0)
cy.get('[data-test-id="test-continueToPayment"]').click()
cy.get('.form-errors').should("have.text", "Last Name is required")
cy.get('[data-test-id="test-lastName"]').type("Payer")
cy.get('[data-test-id="test-lastName"]').click().type("Payer")
cy.get('body').should("not.have.text", "Last Name is required")
})

Expand Down Expand Up @@ -69,7 +69,7 @@ describe("Form Error Tests", () => {
cy.get('[data-test-id="test-country"]').clear().type("Germany{enter}").get('body').click(0, 0)
cy.get('[data-test-id="test-continueToPayment"]').click()
cy.get('.form-errors').should("have.text", "Address is required")
cy.get('[data-test-id="test-address"]').type("Unbekannt 1")
cy.get('[data-test-id="test-address"]').clear().type("Unbekannt 1")
cy.get('body').should("not.have.text", "Address is required")
})

Expand All @@ -84,9 +84,9 @@ describe("Form Error Tests", () => {
cy.get('[data-test-id="test-city"]').clear()
cy.get('[data-test-id="test-zipCode"]').clear().type("82449")
cy.get('[data-test-id="test-country"]').clear().type("Germany{enter}").get('body').click(0, 0)
cy.get('[data-test-id="test-continueToPayment"]').click()
//cy.get('[data-test-id="test-continueToPayment"]').click()
cy.get('.form-errors').should("have.text", "City is required")
cy.get('[data-test-id="test-city"]').type("Uffing am Staffelsee")
cy.get('[data-test-id="test-city"]').click().type("Uffing am Staffelsee")
cy.get('body').should("not.have.text", "City is required")
})

Expand All @@ -105,9 +105,9 @@ describe("Form Error Tests", () => {
cy.get('[data-test-id="test-city"]').clear().type("Uffing am Staffelsee")
cy.get('[data-test-id="test-zipCode"]').clear()
cy.get('[data-test-id="test-country"]').clear().type(`${selectedCountry}{enter}`).get('body').click(0, 0)
cy.get('[data-test-id="test-continueToPayment"]').click()
//cy.get('[data-test-id="test-continueToPayment"]').click()
cy.get('.form-errors').should("have.text", "ZipCode is invalid")
cy.get('[data-test-id="test-zipCode"]').type(new RandExp(fiteredCountry[0].postal).gen())
cy.get('[data-test-id="test-zipCode"]').click().type(new RandExp(fiteredCountry[0].postal).gen())
cy.get('body').should("not.have.text", "ZipCode is invalid")
})
})
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Cypress.Commands.add('bankTransfer', () => {
cy.wait(5000)
// cy.get('.frequency-selection-option').eq(0).should("have.text", "Once").click()
cy.contactForm("Peter", "Payer", "[email protected]", "Unbekannt 1", "Uffing am Staffelsee", "Germany{enter}", "82449")
cy.wait(10000)
cy.wait(15000)
cy.get('[data-test-id="bankTransfer"]').click()
cy.get('[data-test-id="bankDonateContinue"]').click()
cy.wait(10000)
Expand Down

0 comments on commit a2fc692

Please sign in to comment.