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 26, 2024
1 parent 09e7312 commit 806afa5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ describe('Select', () => {
'when the menu is closed WITHOUT selecting the newly focused option ("Phone")',
() => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'}).realPress('{esc}');
cy.focused().realType('{esc}');
});

context('when the menu is re-opened AFTER it has fully closed', () => {
Expand All @@ -417,8 +417,8 @@ describe('Select', () => {
// re-open while it's in the middle of closing)
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('not.exist')
.realPress('{downarrow}');
.should('not.exist');
cy.findByRole('button', {name: 'Label'}).focus().realType('{downarrow}');
});

context('the menu', () => {
Expand All @@ -433,7 +433,7 @@ describe('Select', () => {

context('when the menu is re-opened BEFORE it has fully closed', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'}).should('exist').type('{downArrow}');
cy.focused().realType('{downarrow}');
});

context('the menu', () => {
Expand Down

0 comments on commit 806afa5

Please sign in to comment.