-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: (CXSPA-8193) -Dropdown refocus on esc key press (#19453)
- Loading branch information
Showing
5 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,21 @@ describe('Focus managment for a11y', () => { | |
cy.contains('Select Store').should('have.focus'); | ||
}); | ||
}); | ||
|
||
context('Dropdown tigger, refocus after esc key press', () => { | ||
it('Should refocus Sorting ng-select', () => { | ||
cy.visit(`Brands/all/c/brands`); | ||
cy.get('cx-sorting ng-select').first().as('sorting'); | ||
cy.get('@sorting').click().type('{esc}'); | ||
cy.get('@sorting').get('input').should('have.focus'); | ||
}); | ||
|
||
it('Should refocus MyAccount navigation-ui', () => { | ||
cy.login('[email protected]', 'pw4all'); | ||
cy.visit(`/`); | ||
cy.get('button').contains('My Account').as('myAccount'); | ||
cy.get('@myAccount').click().type('{esc}'); | ||
cy.get('@myAccount').should('have.focus'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters