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 18, 2024
1 parent 2291b94 commit 6fef877
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cypress/component/SelectPreview.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Select', () => {
});
});

context.only('when the down arrow key is pressed for a second time', () => {
context('when the down arrow key is pressed for a second time', () => {
beforeEach(() => {
cy.realType('{downarrow}');
});
Expand Down Expand Up @@ -233,7 +233,7 @@ describe('Select', () => {
});
});

context.only('when the enter key is pressed', () => {
context('when the enter key is pressed', () => {
beforeEach(() => {
cy.findByRole('button', {name: 'Label'})
.pipe(h.selectPreview.getMenu)
Expand All @@ -242,18 +242,15 @@ describe('Select', () => {

context('the select button', () => {
it(`should read "Mail"`, () => {
cy.findByRole('button', {name: 'Label'}).should('exist');
cy.findByRole('button', {name: 'Label'}).should('have.text', 'Mail');
});

it(`should have a value of "mail"`, () => {
cy.findByRole('button', {name: 'Label'}).should('exist');
cy.findByRole('button', {name: 'Label'}).should('have.value', 'mail');
});

it(`should re-acquire focus`, () => {
cy.findByRole('button', {name: 'Label'}).should('exist');
cy.findByRole('button', {name: 'Label'}).should('be.focused');
cy.findByRole('button', {name: 'Label'}).should('have.focus');
});
});

Expand Down

0 comments on commit 6fef877

Please sign in to comment.