Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 committed Jun 6, 2022
2 parents 1a8491e + e35b3b0 commit a6fa9d0
Show file tree
Hide file tree
Showing 55 changed files with 364 additions and 2,950 deletions.
25 changes: 5 additions & 20 deletions guides/release-process.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress-component.cy.ts
Expand Up @@ -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()
Expand Down
22 changes: 20 additions & 2 deletions packages/app/cypress/e2e/cypress-in-cypress-e2e.cy.ts
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Up @@ -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()
Expand Down
40 changes: 20 additions & 20 deletions packages/app/cypress/e2e/runs.cy.ts
Expand Up @@ -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 }, () => {
Expand Down Expand Up @@ -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"]')
})
Expand All @@ -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')
Expand All @@ -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) => {
Expand All @@ -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')
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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')

Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand All @@ -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')
})

Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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) => {
Expand All @@ -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()

Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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')
Expand Down
14 changes: 7 additions & 7 deletions packages/app/cypress/e2e/settings.cy.ts
Expand Up @@ -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')
Expand All @@ -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')
})
Expand Down Expand Up @@ -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()

Expand All @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
26 changes: 20 additions & 6 deletions packages/app/cypress/e2e/sidebar_navigation.cy.ts
Expand Up @@ -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)', () => {
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit a6fa9d0

Please sign in to comment.