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 d3acb65 commit 48116da
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,7 @@ describe('Select', () => {

context('when the menu is opened', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'}).focus();
cy.findByRole('button', {name: 'Label'}).type('{downArrow}');
cy.findByRole('button', {name: 'Label'}).focus().type('{downArrow}');
});

context('the menu', () => {
Expand All @@ -392,6 +391,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('exist')
.type('{downArrow}');
});

Expand Down Expand Up @@ -795,10 +795,8 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.realType('s', {delay: 500});
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.realType('d', {delay: 500});
.type('s', {delay: 500})
.type('d');
});

context('the menu', () => {
Expand Down Expand Up @@ -886,7 +884,8 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.realType('san m');
.type('san ', {delay: 100})
.type('m');
});

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

0 comments on commit 48116da

Please sign in to comment.