Skip to content

Commit c73a194

Browse files
committed
feat: fix e2e for muti dimensional checkout
1 parent d4e9083 commit c73a194

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: projects/storefrontapp-e2e-cypress/cypress/helpers/checkout-multi-dimensional.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,21 @@ export function testCheckoutMultiDAsGuestAndVerifyCart() {
153153
cy.get('.cx-checkout-title').should('contain', 'Shipping Address');
154154
cy.get('cx-mini-cart .count').contains('1');
155155

156+
const cartPage = checkout.waitForPage('/cart', 'getCartPage');
157+
158+
cy.get('cx-mini-cart').click();
159+
cy.wait(`@${cartPage}`).its('response.statusCode').should('eq', 200);
160+
cy.get('cx-mini-cart .count').contains('1');
161+
162+
cy.get('button.btn-primary').click();
163+
cy.get('cx-mini-cart .count').contains('1');
164+
cy.wait(500);
165+
166+
const homePage = checkout.waitForPage('homepage', 'getHomePage');
167+
cy.get('cx-page-slot.SiteLogo').click();
168+
cy.wait(`@${homePage}`).its('response.statusCode').should('eq', 200);
169+
cy.get('cx-mini-cart .count').contains('1');
170+
156171
checkout.signOut();
157172

158173
const loginPage = checkout.waitForPage('/login', 'getLoginPage');
@@ -175,7 +190,6 @@ export function testCheckoutMultiDAsGuestAndVerifyCart() {
175190

176191
cy.get('cx-mini-cart .count').contains('1');
177192

178-
const cartPage = checkout.waitForPage('/cart', 'getCartPage');
179193
cy.get('cx-mini-cart').click();
180194
cy.wait(`@${cartPage}`).its('response.statusCode').should('eq', 200);
181195

0 commit comments

Comments
 (0)