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 48ce0e0 commit 1eaf803
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ describe('Select', () => {

context('when the down arrow key is pressed', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'}).type('{downArrow}');
cy.findByRole('button', {name: 'Label'}).realPress('{downarrow}');
});

context('the select button', () => {
Expand Down Expand Up @@ -219,7 +219,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.type('{downArrow}');
.realPress('{downarrow}');
});

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

context('the menu', () => {
Expand Down Expand Up @@ -283,7 +283,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.type('{downArrow}');
.realPress('{downarrow}');
});

context('the menu', () => {
Expand Down Expand Up @@ -380,7 +380,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'}).realPress('{downarrow}');
});

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

context('the menu', () => {
Expand All @@ -423,7 +423,7 @@ describe('Select', () => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
.should('not.exist');
cy.findByRole('button', {name: 'Label'}).focus().type('{downArrow}');
cy.findByRole('button', {name: 'Label'}).focus().realPress('{downarrow}');
});

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

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

context('the menu', () => {
Expand Down Expand Up @@ -482,7 +482,9 @@ describe('Select', () => {

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

context('the "Carrier Pigeon" option', () => {
Expand All @@ -497,7 +499,7 @@ describe('Select', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label (Disabled Options)'})
.pipe(h.selectPreview.getMenu)
.type('{downArrow}');
.realPress('{downarrow}');
});

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

0 comments on commit 1eaf803

Please sign in to comment.