-
Notifications
You must be signed in to change notification settings - Fork 0
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
cart testing #2
cart testing #2
Conversation
cypress/e2e/cart.cy.js
Outdated
cy.getCookies() | ||
.should("have.length", 1) | ||
.then((cookies) => { | ||
expect(cookies[0]).to.have.property("name", "session-username"); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
w cy.getCookies() w parametrze możemy podać nazwę ciastka i sprawdzić czy istnieje. dzięki temu pozbędziemy się then() i kod będzie bardziej przejrzysty
cypress/e2e/cart.cy.js
Outdated
cy.get(".shopping_cart_link").click(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brakuje sprawdzenia cart badge (licznik dodanych produktów do koszyka)
cypress/e2e/cart.cy.js
Outdated
cy.get(".shopping_cart_link").click(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brakuje sprawdzenia cart badge (licznik dodanych produktów do koszyka)
cypress/e2e/cart.cy.js
Outdated
cy.get('[data-test="remove-sauce-labs-bike-light"]').click(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brakuje sprawdzenia cart badge (licznik dodanych produktów do koszyka)
it("Sample name f.e. Should open home page and check url", () => { | ||
cy.visit("/").url().should("eq", "https://www.saucedemo.com/"); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wyrzućmy ten plik od razu w tym PR
Testy koszyka