Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cypress-io/cypress
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.0.2
Choose a base ref
...
head repository: cypress-io/cypress
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.0.3
Choose a head ref
  • 11 commits
  • 55 files changed
  • 11 contributors

Commits on Jun 3, 2022

  1. fix: Increase contrast on spec header items (#22045)

    Co-authored-by: Mark Noonan <mark@cypress.io>
    mike-plummer and marktnoonan authored Jun 3, 2022
    3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ce647c2 View commit details
  2. 3
    Copy the full SHA
    81f1b42 View commit details
  3. 3
    Copy the full SHA
    a8ed29e View commit details

Commits on Jun 6, 2022

  1. 3
    Copy the full SHA
    e2243ee View commit details
  2. chore: remove old runIsolated in the runner, as well as clean up old …

    …runner related dependencies (#21638)
    AtofStryker authored Jun 6, 2022
    3
    Copy the full SHA
    e18819d View commit details
  3. docs(guides): update release-process (#22098)

    * docs(guides): update release-process
    
    * update script
    flotwig authored Jun 6, 2022
    3
    Copy the full SHA
    2cbf17b View commit details
  4. fix: For E2E scaffolded blank specs, scaffold a spec that passes inst…

    …ead of fails (#22070)
    Rachel authored Jun 6, 2022
    3
    Copy the full SHA
    64ea96b View commit details
  5. 3
    Copy the full SHA
    f987981 View commit details
  6. 3
    Copy the full SHA
    333e25d View commit details
  7. fix: watch only specs matching specPattern (#22067)

    * fix: watch only specs matching specPattern
    
    * Fix test for _makeSpecWatcher
    
    * Fixes to accommodate chokidar weirdness, better tests
    
    * Add extra safe to ignore node_modules
    
    Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
    Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
    3 people authored Jun 6, 2022
    3
    Copy the full SHA
    91ba9c7 View commit details
  8. release 10.0.3 [skip ci]

    flotwig committed Jun 6, 2022
    Copy the full SHA
    e35b3b0 View commit details
Showing with 364 additions and 2,950 deletions.
  1. +5 −20 guides/release-process.md
  2. +1 −1 package.json
  3. +2 −2 packages/app/cypress/e2e/cypress-in-cypress-component.cy.ts
  4. +20 −2 packages/app/cypress/e2e/cypress-in-cypress-e2e.cy.ts
  5. +1 −1 packages/app/cypress/e2e/cypress-origin-communicator.cy.ts
  6. +20 −20 packages/app/cypress/e2e/runs.cy.ts
  7. +7 −7 packages/app/cypress/e2e/settings.cy.ts
  8. +20 −6 packages/app/cypress/e2e/sidebar_navigation.cy.ts
  9. +3 −3 packages/app/cypress/e2e/specs.cy.ts
  10. +1 −1 packages/app/cypress/e2e/subscriptions/createCloudOrgModal-subscription.cy.ts
  11. +1 −1 packages/app/cypress/e2e/top-nav.cy.ts
  12. +7 −2 packages/app/src/navigation/SidebarNavigation.cy.tsx
  13. +3 −2 packages/app/src/navigation/SidebarNavigation.vue
  14. +2 −2 packages/app/src/runner/SpecRunnerHeaderOpenMode.vue
  15. +2 −2 packages/app/src/specs/InlineSpecListHeader.vue
  16. +4 −4 packages/data-context/src/codegen/templates/empty-e2e/empty.ejs
  17. +41 −5 packages/data-context/src/sources/ProjectDataSource.ts
  18. +19 −25 packages/data-context/src/sources/VersionsDataSource.ts
  19. +4 −4 packages/data-context/test/unit/codegen/code-generator.spec.ts
  20. +144 −1 packages/data-context/test/unit/sources/ProjectDataSource.spec.ts
  21. +37 −1 packages/data-context/test/unit/sources/VersionsDataSource.spec.ts
  22. +10 −1 packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx
  23. +1 −1 packages/frontend-shared/src/gql-components/topnav/TopNavList.vue
  24. +1 −1 packages/frontend-shared/src/locales/en-US.json
  25. +2 −1 packages/reporter/src/header/header.scss
  26. +0 −15 packages/runner/cypress.config.js
  27. +0 −11 packages/runner/cypress/.eslintrc.json
  28. +0 −8 packages/runner/cypress/e2e/inline-spec-list/bar.cy.js
  29. +0 −8 packages/runner/cypress/e2e/inline-spec-list/foo.cy.js
  30. +0 −189 packages/runner/cypress/e2e/retries.mochaEvents.cy.js
  31. +0 −175 packages/runner/cypress/e2e/runner.mochaEvents.cy.js
  32. +0 −211 packages/runner/cypress/e2e/studio.mochaEvents.cy.js
  33. +0 −638 packages/runner/cypress/e2e/studio.record.cy.js
  34. +0 −191 packages/runner/cypress/e2e/studio.ui.cy.js
  35. +0 −13 packages/runner/cypress/fixtures/studio/basic_spec.js
  36. +0 −13 packages/runner/cypress/fixtures/studio/error_hooks_spec.js
  37. +0 −11 packages/runner/cypress/fixtures/studio/error_test_spec.js
  38. +0 −22 packages/runner/cypress/fixtures/studio/hooks_spec.js
  39. +0 −31 packages/runner/cypress/fixtures/studio/only_suite_multiple_spec.js
  40. +0 −21 packages/runner/cypress/fixtures/studio/only_suite_spec.js
  41. +0 −21 packages/runner/cypress/fixtures/studio/only_test_multiple_spec.js
  42. +0 −21 packages/runner/cypress/fixtures/studio/only_test_spec.js
  43. +0 −13 packages/runner/cypress/plugins/index.js
  44. +0 −13 packages/runner/cypress/plugins/snapshot/index.d.ts
  45. +0 −443 packages/runner/cypress/plugins/snapshot/snapshotCommand.js
  46. +0 −57 packages/runner/cypress/plugins/snapshot/snapshotPlugin.js
  47. +0 −146 packages/runner/cypress/plugins/snapshot/snapshotUtils.js
  48. +0 −6 packages/runner/cypress/support/e2e.js
  49. +0 −521 packages/runner/cypress/support/helpers.js
  50. +2 −16 packages/runner/package.json
  51. +3 −1 scripts/binary/util/upload.js
  52. +1 −0 system-tests/projects/spec-watcher/cypress.config.js
  53. 0 .../runner/cypress/fixtures/empty_spec.js → system-tests/projects/spec-watcher/cypress/e2e/foo.cy.js
  54. 0 system-tests/projects/spec-watcher/cypress/support/e2e.js
  55. +0 −19 yarn.lock
25 changes: 5 additions & 20 deletions guides/release-process.md
Original file line number Diff line number Diff line change
@@ -67,7 +67,9 @@ In the following instructions, "X.Y.Z" is used to denote the [next version of Cy
4. Once the `develop` branch is passing for all test projects with the new changes and the `linux-x64` binary is present at `https://cdn.cypress.io/beta/binary/X.Y.Z/linux-x64/<sha>/cypress.zip`, and the `linux-x64` cypress npm package is present at `https://cdn.cypress.io/beta/binary/X.Y.Z/linux-x64/<sha>/cypress.tgz`, publishing can proceed.
5. [Set up](https://cypress-io.atlassian.net/wiki/spaces/INFRA/pages/1534853121/AWS+SSO+Cypress) an AWS SSO profile with the [Team-CypressApp-Prod](https://cypress-io.atlassian.net/wiki/spaces/INFRA/pages/1534853121/AWS+SSO+Cypress#Team-CypressApp-Prod) role. The release scripts assumes the name of your profile is `production`. If you have setup your credentials under a different profile, be sure to set the `AWS_PROFILE` environment variable. Log into AWS SSO with `aws sso login --profile <name_of_profile>`.
5. [Set up](https://cypress-io.atlassian.net/wiki/spaces/INFRA/pages/1534853121/AWS+SSO+Cypress) an AWS SSO profile with the [Team-CypressApp-Prod](https://cypress-io.atlassian.net/wiki/spaces/INFRA/pages/1534853121/AWS+SSO+Cypress#Team-CypressApp-Prod) role. The release scripts assumes the name of your profile is `prod`.
* Log into AWS SSO with `aws sso login --profile <name_of_profile>`.
* If you have setup your credentials under a different profile, be sure to set the `AWS_PROFILE` environment variable to that profile name for the remaining steps. For example, if you are using `production` instead of `prod`, do `export AWS_PROFILE=production`.
6. Use the `prepare-release-artifacts` script (Mac/Linux only) to prepare the latest commit to a stable release. When you run this script, the following happens:
* the binaries for `<commit sha>` are moved from `beta` to the `desktop` folder for `<new target version>` in S3
@@ -165,32 +167,15 @@ In the following instructions, "X.Y.Z" is used to denote the [next version of Cy
20. Publish a new docker image in [`cypress-docker-images`](https://github.com/cypress-io/cypress-docker-images) under `included` for the new cypress version. Note: we use the base image with the Node version matching the bundled Node version. Instructions for updating `cypress-docker-images` can be found [here](https://github.com/cypress-io/cypress-docker-images/blob/master/CONTRIBUTING.md#add-new-included-image).
21. Update example projects to the new version. For most projects, you can go to the Renovate dependency issue and check the box next to `Update dependency cypress to X.Y.Z`. It will automatically create a PR. Once it passes, you can merge it. Try updating at least the following projects:
21. Check all `cypress-test-*` and `cypress-example-*` repositories, and if there is a branch named `x.y.z` for testing the features or fixes from the newly published version `x.y.z`, update that branch to refer to the newly published NPM version in `package.json`. Then, get the changes approved and merged into that project's `master`. For projects without a `x.y.z` branch, you can go to the Renovate dependency issue and check the box next to `Update dependency cypress to X.Y.Z`. It will automatically create a PR. Once it passes, you can merge it. Try updating at least the following projects:
- [cypress-example-todomvc](https://github.com/cypress-io/cypress-example-todomvc/issues/99)
- [cypress-example-todomvc-redux](https://github.com/cypress-io/cypress-example-todomvc-redux/issues/1)
- [cypress-example-realworld](https://github.com/cypress-io/cypress-example-realworld/issues/2)
- [cypress-example-recipes](https://github.com/cypress-io/cypress-example-recipes/issues/225)
- [angular-pizza-creator](https://github.com/cypress-io/angular-pizza-creator/issues/5)
- [cypress-fiddle](https://github.com/cypress-io/cypress-fiddle/issues/5)
- [cypress-documentation](https://github.com/cypress-io/cypress-documentation/issues/1313)
- [cypress-example-docker-compose](https://github.com/cypress-io/cypress-example-docker-compose) - Doesn't have a Renovate issue, but will auto-create and auto-merge non-major Cypress updates as long as the tests pass.
22. Check if any test or example repositories have a branch for testing the features or fixes from the newly published version `x.y.z`. The branch should also be named `x.y.z`. Check all `cypress-test-*` and `cypress-example-*` repositories, and if there is a branch named `x.y.z`, merge it into `master`.
**Test Repos**
- [cypress-test-tiny](https://github.com/cypress-io/cypress-test-tiny)
**Example Repos**
- [cypress-example-todomvc](https://github.com/cypress-io/cypress-example-todomvc)
- [cypress-example-todomvc-redux](https://github.com/cypress-io/cypress-example-todomvc-redux)
- [cypress-example-realworld](https://github.com/cypress-io/cypress-example-realworld)
- [cypress-example-recipes](https://github.com/cypress-io/cypress-example-recipes)
- [cypress-example-docker-compose](https://github.com/cypress-io/cypress-example-docker-compose)
- [cypress-documentation](https://github.com/cypress-io/cypress-documentation)
Take a break, you deserve it! :sunglasses:
Take a break, you deserve it! 👉😎👉
[release-automations]: https://github.com/cypress-io/release-automations
[cypress-example-kitchensink]: https://github.com/cypress-io/cypress-example-kitchensink
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress",
"version": "10.0.2",
"version": "10.0.3",
"description": "Cypress.io end to end testing tool",
"private": true,
"scripts": {
4 changes: 2 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress-component.cy.ts
Original file line number Diff line number Diff line change
@@ -182,10 +182,10 @@ describe('Cypress In Cypress CT', { viewportWidth: 1500, defaultCommandTimeout:
cy.get('.passed > .num').should('contain', 1)
cy.get('.failed > .num').should('contain', '--')

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="app-header-bar"]').findByText('Runs').should('be.visible')

cy.get('[href="#/specs"]').click()
cy.findByTestId('sidebar-link-specs-page').click()
cy.get('[data-cy="app-header-bar"]').findByText('Specs').should('be.visible')

cy.contains('TestComponent.spec').click()
22 changes: 20 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress-e2e.cy.ts
Original file line number Diff line number Diff line change
@@ -233,10 +233,10 @@ describe('Cypress In Cypress E2E', { viewportWidth: 1500, defaultCommandTimeout:
cy.get('.passed > .num').should('contain', 1)
cy.get('.failed > .num').should('contain', '--')

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="app-header-bar"]').findByText('Runs').should('be.visible')

cy.get('[href="#/specs"]').click()
cy.findByTestId('sidebar-link-specs-page').click()
cy.get('[data-cy="app-header-bar"]').findByText('Specs').should('be.visible')

cy.contains('dom-content.spec').click()
@@ -273,4 +273,22 @@ describe('Dom Content', () => {
cy.get('.passed > .num').should('contain', 1)
cy.get('.failed > .num').should('contain', '--')
})

describe('accessibility', () => {
it('has no axe violations in specs list panel', () => {
cy.visitApp()
cy.contains('withFailure.spec').click()
cy.get('button[aria-controls="reporter-inline-specs-list"]').click()
cy.injectAxe()
cy.checkA11y('[data-cy="specs-list-panel"]')
})

it('has no axe violations in reporter panel', () => {
cy.visitApp()
cy.contains('withFailure.spec').click()
cy.get('button[aria-controls="reporter-inline-specs-list"]').click()
cy.injectAxe()
cy.checkA11y('[data-cy="reporter-panel"]')
})
})
})
2 changes: 1 addition & 1 deletion packages/app/cypress/e2e/cypress-origin-communicator.cy.ts
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ describe('Cypress In Cypress Origin Communicator', () => {
// make sure duplicate logs are not present
cy.get('.command-name-origin').find('.command-name-log').should('have.length', 2)

cy.get('a[href="#/specs"]').click()
cy.findByTestId('sidebar-link-specs-page').click()
cy.location('hash').should('include', '/specs')

cy.contains('simple_origin.cy').click()
40 changes: 20 additions & 20 deletions packages/app/cypress/e2e/runs.cy.ts
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ function scaffoldTestingTypeAndVisitRunsPage (testingType: 'e2e' | 'component')

cy.visitApp()

return cy.get('[href="#/runs"]').click()
return cy.findByTestId('sidebar-link-runs-page').click()
}

describe('App: Runs', { viewportWidth: 1200 }, () => {
@@ -47,7 +47,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})

cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="runs-loader"]')
cy.get('[data-cy="runs"]')
})
@@ -62,13 +62,13 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {

it('when logged out, shows call to action', () => {
cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.contains(defaultMessages.runs.connect.buttonUser).should('exist')
})

it('clicking the login button will open the login modal', () => {
cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.contains('Log In').click()
cy.findByRole('dialog', { name: 'Log in to Cypress' }).within(() => {
cy.get('button').contains('Log In')
@@ -79,7 +79,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.loginUser()
cy.visitApp()

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.contains('a', 'OVERLIMIT').click()

cy.withCtx((ctx) => {
@@ -105,7 +105,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
return obj.result
})

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()

cy.findByText(defaultMessages.runs.connect.buttonProject).click()
cy.get('[aria-modal="true"]').should('exist')
@@ -145,7 +145,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
return obj.result
})

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()

cy.findByText(defaultMessages.runs.connect.buttonProject).click()
cy.get('[aria-modal="true"]').should('exist')
@@ -175,7 +175,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
return obj.result
})

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.findByText(defaultMessages.runs.connect.buttonProject).click()
cy.get('[aria-modal="true"]').should('exist')

@@ -217,7 +217,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
expect(config.projectId).to.not.equal('newProjectId')
})

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.findByText(defaultMessages.runs.connect.buttonProject).click()
cy.get('button').contains(defaultMessages.runs.connect.modal.selectProject.createProject).click()
cy.findByText(defaultMessages.runs.connectSuccessAlert.title).should('be.visible')
@@ -263,7 +263,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {

cy.visitApp()

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
})

it('if project Id is specified in config file that does not exist, shows call to action', () => {
@@ -389,7 +389,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {

cy.visitApp()

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
})

it('if project Id is specified in config file that is not accessible, shows call to action', () => {
@@ -415,7 +415,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
})

cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.findByText(defaultMessages.runs.connect.buttonProject).should('exist')
})

@@ -471,14 +471,14 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
it('displays a list of recorded runs if a run has been recorded', () => {
cy.loginUser()
cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="runs"]')
})

it('displays each run with correct information', () => {
cy.loginUser()
cy.visitApp()
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()

cy.get('[href="http://dummy.cypress.io/runs/0"]').first().within(() => {
cy.findByText('fix: make gql work CANCELLED')
@@ -515,7 +515,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.loginUser()
cy.visitApp()

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy^="runCard-"]').first().click()

cy.withCtx((ctx) => {
@@ -540,7 +540,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
return obj.result
})

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.contains('h2', 'Cannot connect to the Cypress Dashboard')
cy.percySnapshot()

@@ -571,7 +571,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.loginUser()
cy.visitApp()
cy.wait(1000)
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="runs"]')

cy.goOffline()
@@ -585,7 +585,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.loginUser()
cy.visitApp()
cy.wait(1000)
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.get('[data-cy="runs"]')

cy.goOffline()
@@ -696,10 +696,10 @@ describe('App: Runs', { viewportWidth: 1200 }, () => {
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', 2).should('be.visible')

// If we navigate away & back, we should see the same runs
cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.remoteGraphQLIntercept((obj) => obj.result)

cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()

cy.get('[data-cy="run-card-icon-PASSED"]').should('have.length', 3).should('be.visible')
cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', 2).should('be.visible')
14 changes: 7 additions & 7 deletions packages/app/cypress/e2e/settings.cy.ts
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ describe('App: Settings', () => {
cy.waitForSpecToFinish()
// Wait for the test to pass, so the test is completed
cy.get('.passed > .num').should('contain', 1)
cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.contains('Dashboard Settings').click()
// Assert the data is not there before it arrives
cy.contains('Record Key').should('not.exist')
@@ -114,18 +114,18 @@ describe('App: Settings', () => {
o.sinon.spy(ctx.actions.auth, 'logout')
})

cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.contains('Dashboard Settings').click()
cy.contains('Record Key').should('exist')
cy.get('[href="#/runs"]').click()
cy.findByTestId('sidebar-link-runs-page').click()
cy.findByTestId('user-avatar-title').click()
cy.findByRole('button', { name: 'Log Out' }).click()

cy.withRetryableCtx((ctx, o) => {
expect(ctx.actions.auth.logout).to.have.been.calledOnce
})

cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.contains('Dashboard Settings').click()
cy.contains('Record Key').should('not.exist')
})
@@ -345,7 +345,7 @@ describe('App: Settings', () => {
// navigate away and come back
// preferred editor selected from dropdown should have been persisted
cy.visitApp()
cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.wait(200)
cy.get('[data-cy="Device Settings"]').click()

@@ -366,7 +366,7 @@ describe('App: Settings', () => {

// navigate away and come back
// preferred editor entered from input should have been persisted
cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.wait(100)
cy.get('[data-cy="Device Settings"]').click()

@@ -394,7 +394,7 @@ describe('App: Settings', () => {
// navigate away and come back
// preferred editor selected from dropdown should have been persisted
cy.visitApp()
cy.get('[href="#/settings"]').click()
cy.findByTestId('sidebar-link-settings-page').click()
cy.wait(200)
cy.get('[data-cy="Device Settings"]').click()

26 changes: 20 additions & 6 deletions packages/app/cypress/e2e/sidebar_navigation.cy.ts
Original file line number Diff line number Diff line change
@@ -137,17 +137,17 @@ describe('Sidebar Navigation', () => {
cy.percySnapshot()
cy.findByTestId('sidebar-header').trigger('mouseout')

cy.get('[href="#/runs"]').trigger('mouseenter')
cy.findByTestId('sidebar-link-runs-page').trigger('mouseenter')
cy.contains('.v-popper--some-open--tooltip', 'Runs')
cy.get('[href="#/runs"]').trigger('mouseout')
cy.findByTestId('sidebar-link-runs-page').trigger('mouseout')

cy.get('[href="#/specs"]').trigger('mouseenter')
cy.findByTestId('sidebar-link-specs-page').trigger('mouseenter')
cy.contains('.v-popper--some-open--tooltip', 'Specs')
cy.get('[href="#/specs"]').trigger('mouseout')
cy.findByTestId('sidebar-link-specs-page').trigger('mouseout')

cy.get('[href="#/settings"]').trigger('mouseenter')
cy.findByTestId('sidebar-link-settings-page').trigger('mouseenter')
cy.contains('.v-popper--some-open--tooltip', 'Settings')
cy.get('[href="#/settings"]').trigger('mouseout')
cy.findByTestId('sidebar-link-settings-page').trigger('mouseout')
})

it('opens the left nav bar when clicking the expand button (if unexpanded)', () => {
@@ -235,6 +235,20 @@ describe('Sidebar Navigation', () => {
cy.get('.router-link-active').findByText('Specs').should('be.visible')
})

it('Specs sidebar nav link is not active when a test is running', () => {
cy.location('hash').should('equal', '#/specs')
cy.contains('.router-link-exact-active', 'Specs')

cy.findAllByTestId('spec-item').first().click()
cy.location('hash').should('contain', '#/specs/runner')
cy.contains('.router-link-exact-active', 'Specs').should('not.exist')
cy.percySnapshot()

cy.findByTestId('sidebar-link-specs-page').click()
cy.location('hash').should('equal', '#/specs')
cy.contains('.router-link-exact-active', 'Specs')
})

it('has a menu item labeled "Settings" which takes you to the Settings page', () => {
cy.findByTestId('app-header-bar').findByText('Settings').should('not.exist')
cy.findByText('Settings').should('be.visible')
Loading