I have a product page with the product quantity control element and the price. On the website, when I click the increase qty button +, the price changes accordingly.
But when I do it with Cypress, I can click the increase button, the product qty changes but the price stays the same. Like if the event was never triggered.
Is there is something like toHaveBeenCalledWith or any listeners I should add to the flow?
Piece of my code:
describe("checkout", describeCheckout);
function describeCheckout() {
beforeEach(() => {
populateCart();
cy.loginUi();
cy.visitPath("/checkout");
cy.wait(3000);
});
// This part works
it("should click increase button on item", increaseItemQty);
}
function increaseItemQty() {
cy.get("increase-qty").click()
}
