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 21, 2024
1 parent 897d50e commit 2ceb8cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,17 @@ describe('Select', () => {
});
});

it('the menu should have focus', () => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('have.focus');
});

context('when the down arrow key is pressed for a second time', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('be.visible')
.realType('{downarrow}');
});

Expand All @@ -229,6 +236,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('be.visible')
.realType('{downarrow}');
});

Expand Down Expand Up @@ -387,6 +395,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('be.visible')
.realType('{downarrow}');
});

Expand Down Expand Up @@ -490,6 +499,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label (Disabled Options)'})
.pipe(h.selectPreview.getMenu)
.should('be.visible')
.realType('{downarrow}');
});

Expand Down

0 comments on commit 2ceb8cf

Please sign in to comment.