Skip to content
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

Merged
merged 2 commits into from
Jul 20, 2022
Merged

cart testing #2

merged 2 commits into from
Jul 20, 2022

Conversation

Michal-Zajdel
Copy link
Owner

Testy koszyka

Comment on lines 9 to 14
cy.getCookies()
.should("have.length", 1)
.then((cookies) => {
expect(cookies[0]).to.have.property("name", "session-username");
});
});
Copy link

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

Comment on lines 22 to 23
cy.get(".shopping_cart_link").click();
});
Copy link

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)

Comment on lines 28 to 29
cy.get(".shopping_cart_link").click();
});
Copy link

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)

Comment on lines 35 to 36
cy.get('[data-test="remove-sauce-labs-bike-light"]').click();
});
Copy link

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)

Comment on lines +1 to +5
it("Sample name f.e. Should open home page and check url", () => {
cy.visit("/").url().should("eq", "https://www.saucedemo.com/");
});
});
Copy link

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

@Michal-Zajdel Michal-Zajdel merged commit 47d8822 into main Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants