Skip to content

Commit

Permalink
fix: Focus management e2e fix (#18671)
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr Bartkowiak <[email protected]>
  • Loading branch information
Pio-Bar and Piotr Bartkowiak authored Mar 26, 2024
1 parent 23eb119 commit 0f8f26b
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ describe('Focus managment for a11y', () => {
cy.contains(/proceed to checkout/i).click();
checkout.fillAddressForm();
cy.intercept('GET', '*deliveryMode*').as('getDeliveryMethods');
cy.get('input[type=radio][formcontrolname=deliveryModeId]')
.as('selectedOption')
.eq(1)
.focus()
.type('{enter}');
cy.get('#deliveryMode-premium-gross').trigger('change', {
screenX: 0,
});
cy.wait('@getDeliveryMethods');
cy.get('@selectedOption').should('have.focus');
cy.get('#deliveryMode-premium-gross').should('have.focus');
});
});
});
Expand Down

0 comments on commit 0f8f26b

Please sign in to comment.