Skip to content

Commit 9f20a31

Browse files
chore: improve order history flow e2e test (#19980)
Co-authored-by: Hak Woo Kim <[email protected]>
1 parent cc1606a commit 9f20a31

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

projects/storefrontapp-e2e-cypress/cypress/helpers/homepage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function checkBanner() {
1010

1111
export function clickHamburger() {
1212
cy.onMobile(() => {
13-
cy.get('cx-hamburger-menu button').click();
13+
cy.get('cx-hamburger-menu button', { timeout: 15000 }).click();
1414
});
1515
}
1616

projects/storefrontapp-e2e-cypress/cypress/helpers/order-history.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,16 @@ export const orderHistoryTest = {
166166
it('should sort the orders table by given code', () => {
167167
cy.intercept('GET', /sort=byOrderNumber/).as('query_order_asc');
168168
cy.visit('/my-account/orders');
169-
cy.get('.top cx-sorting .ng-select').ngSelect('Order Number');
170-
cy.wait('@query_order_asc').its('response.statusCode').should('eq', 200);
169+
170+
cy.get('.top cx-sorting .ng-select', { timeout: 15000 }).click();
171+
cy.get('.ng-dropdown-panel .ng-option', { timeout: 15000 })
172+
.contains('Order Number')
173+
.click();
174+
175+
cy.wait('@query_order_asc', { timeout: 15000 })
176+
.its('response.statusCode')
177+
.should('eq', 200);
178+
cy.wait(2000);
171179
cy.get('.cx-order-history-code > .cx-order-history-value').then(
172180
($orders) => {
173181
expect(parseInt($orders[0].textContent, 10)).to.be.lessThan(

0 commit comments

Comments
 (0)