Skip to content

Commit

Permalink
fix: Updated Select Preview spec
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-bagwell committed Nov 25, 2024
1 parent 2e565f4 commit ef91453
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,23 +301,21 @@ describe('Select', () => {
});
});

it('should not be flaky when arrow key is pressed', () => {
context('when the up arrow key is pressed', () => {
beforeEach(() => {
context('when the up arrow key is pressed', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('exist')
.realPress('{uparrow}');
});

context('the menu', () => {
it('should set assistive focus to the "E-mail" option', () => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('exist')
.realPress('{uparrow}');
});

context('the menu', () => {
it('should set assistive focus to the "E-mail" option', () => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('exist')
.pipe(getAssistiveFocus)
.should('have.text', 'E-mail');
});
.pipe(getAssistiveFocus)
.should('have.text', 'E-mail');
});
});
});
Expand Down

0 comments on commit ef91453

Please sign in to comment.