From 0fd56ba8cc415a3fde3f45f8b57bff8fd5693bb1 Mon Sep 17 00:00:00 2001 From: Matthew Schile Date: Fri, 10 Jan 2025 14:22:51 -0700 Subject: [PATCH] add test --- packages/app/cypress/e2e/specs_list_e2e.cy.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/app/cypress/e2e/specs_list_e2e.cy.ts b/packages/app/cypress/e2e/specs_list_e2e.cy.ts index 03cfd8fbe936..51fbd1734f0f 100644 --- a/packages/app/cypress/e2e/specs_list_e2e.cy.ts +++ b/packages/app/cypress/e2e/specs_list_e2e.cy.ts @@ -127,6 +127,26 @@ describe('App: Spec List (E2E)', () => { cy.findByTestId('runnable-header').should('be.visible') }) + it('updates the spec filename when a new spec is selected', () => { + // load the first spec + cy.findAllByTestId('spec-item-link').contains('accounts_list.spec.js').click() + + // ensure the tests are loaded + cy.contains('[aria-controls=reporter-inline-specs-list]', 'Specs') + cy.findByText('Your tests are loading...').should('not.be.visible') + + // open the inline spec list + cy.get('body').type('f') + + // verify the first spec filename + cy.findByTestId('runnable-header').contains('accounts_list.spec.js') + + // select the second spec from the inline spec list + cy.findAllByTestId('spec-file-item').contains('accounts_new.spec.js').click() + // verify the spec filename was updated + cy.findByTestId('runnable-header').contains('accounts_new.spec.js') + }) + it('cannot open the Spec File Row link in a new tab with "cmd + click"', (done) => { let numTargets let newNumTargets