Skip to content

Commit

Permalink
Merge branch 'develop' into tgriesser/spike/spike
Browse files Browse the repository at this point in the history
* develop: (28 commits)
  chore: update changelog validation example (#25742)
  fix: Improve error handling around calls to `this.next` in middleware (#25702)
  chore: debug page tooltip distance and artifact border (#25727)
  fix: update newProject ref when switching between organizations in SelectCloudProjectModal (#25730)
  misc: Add max widths to debug page message states (#25725)
  chore: export types (#25714)
  chore: release @cypress/webpack-preprocessor-v5.16.3
  chore: release @cypress/vue-v5.0.4
  chore: release @cypress/grep-v3.1.4
  chore: Fix flaky test (#25726)
  dependency(deps): update dependency debug to ^4.3.4 🌟 (#25699)
  feat: openInIDE for failed debug spec (#25691)
  test: fix flaky CT test by relying on query (#25706)
  test: fix flaky migration test (#25672)
  misc: style change for responsiveness (#25687)
  misc: set min widths for icons (#25684)
  chore(deps): update dependency markdown-it to v11.0.1 🌟 (#25698)
  chore: Fix flaky origin .wait() test (#25693)
  chore: unskip tests (#25676)
  chore: release @cypress/webpack-preprocessor-v5.16.2
  ...
  • Loading branch information
tgriesser committed Feb 8, 2023
2 parents 3b0db83 + 76adebe commit bdce6fe
Show file tree
Hide file tree
Showing 80 changed files with 1,584 additions and 257 deletions.
8 changes: 4 additions & 4 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ mainBuildFilters: &mainBuildFilters
only:
- develop
- /^release\/\d+\.\d+\.\d+$/
- 'emily/next-version'
- 'mikep/22825-next-middleware'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -37,7 +37,7 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'mschile/chrome_memory_fix', << pipeline.git.branch >> ]
- equal: [ 'mikep/22825-next-middleware', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -46,7 +46,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'mschile/chrome_memory_fix', << pipeline.git.branch >> ]
- equal: [ 'mikep/22825-next-middleware', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -130,7 +130,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "emily/next-version" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mikep/22825-next-middleware" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ yarn add cypress --dev

## Contributing

- [![CircleCI](https://circleci.com/gh/cypress-io/cypress/tree/develop.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress/tree/develop) - `develop` branch
[![cypress](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/ypt4pf/develop&style=flat&logo=cypress)](https://cloud.cypress.io/projects/ypt4pf/runs)
[![CircleCI](https://circleci.com/gh/cypress-io/cypress/tree/develop.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress/tree/develop) - `develop` branch

Please see our [Contributing Guideline](./CONTRIBUTING.md) which explains repo organization, linting, testing, and other steps.

Expand All @@ -79,7 +80,13 @@ This project is licensed under the terms of the [MIT license](/LICENSE).

## Badges

Let the world know your project is using Cypress.io to test with this cool badge
Configure a badge for your project's README to show your test status or test count in the [Cypress Cloud](https://www.cypress.io/cloud).

[![cypress](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/ypt4pf/develop&style=flat&logo=cypress)](https://cloud.cypress.io/projects/ypt4pf/runs)

[![cypress](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/count/ypt4pf/develop&style=flat&logo=cypress)](https://cloud.cypress.io/projects/ypt4pf/runs)

Or let the world know your project is using Cypress with the badge below.

[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)

Expand Down
50 changes: 44 additions & 6 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,59 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 12.6.0

_Released 02/14/2023 (PENDING)_

**Bugfixes:**

- Fixed an issue with the Cloud project selection modal not showing the correct prompts. Fixes [#25520](https://github.com/cypress-io/cypress/issues/25520).
- Fixed an issue in middleware where error-handling code could itself generate an error and fail to report the original issue. Fixes [#22825](https://github.com/cypress-io/cypress/issues/22825).

**Features:**

- Added the "Open in IDE" feature for failed tests reported from the Debug page. Addressed in [#25691](https://github.com/cypress-io/cypress/pull/25691).

**Misc:**

- Improved the layout of the Debug Page on smaller viewports when there is a pending run. Addresses [#25664](https://github.com/cypress-io/cypress/issues/25664).
- Improved the layout of the Debug Page when displaying informational messages. Addresses [#25669](https://github.com/cypress-io/cypress/issues/25669).
- Icons in Debug page will no longer shrink at small viewports. Addresses [#25665](https://github.com/cypress-io/cypress/issues/25665).
- Increased the spacing between elements and their associated tooltip and added borders around artifact links on the Debug Page. Addresses [#25666](https://github.com/cypress-io/cypress/issues/25666).

**Dependency Updates:**

- Upgrade [`debug`][(https://www.npmjs.com/package/debug) to `4.3.4`. Addressed in [#25699](https://github.com/cypress-io/cypress/pull/25699).

## 12.5.1

_Released 02/10/2023_

**Bugfixes:**

- Fixed a regression introduced in Cypress [12.5.0](https://docs.cypress.io/guides/references/changelog#12-5-0) where the `runnable` was not included in the [`test:after:run`](https://docs.cypress.io/api/events/catalog-of-events) event. Fixes [#25663](https://github.com/cypress-io/cypress/issues/25663).

**Dependency Updates:**

- Upgraded [`simple-git`](https://github.com/steveukx/git-js) from `3.15.0` to `3.16.0` to address this [security vulnerability](https://github.com/advisories/GHSA-9p95-fxvg-qgq2) where Remote Code Execution (RCE) via the clone(), pull(), push() and listRemote() methods due to improper input sanitization was possible. Addressed in [#25603](https://github.com/cypress-io/cypress/pull/25603).

## 12.5.0

_Released 01/31/2023 (PENDING)_
_Released 01/31/2023_

**Features:**

- Easily debug failed CI test runs right from your local Cypress app with the new Debug page, powered by Cypress Cloud. For more details, see the [Debug documentation](https://on.cypress.io/debug-page). Addressed in [#25488](https://github.com/cypress-io/cypress/pull/25488).
- Easily debug failed CI test runs recorded to the Cypress Cloud from your local Cypress app with the new Debug page. Please leave any feedback [here](https://github.com/cypress-io/cypress/discussions/25649). Your feedback will help us make decisions to improve the Debug experience. For more details, see [our blog post](https://on.cypress.io/debug-page-release). Addressed in [#25488](https://github.com/cypress-io/cypress/pull/25488).

**Performance:**

- Improved memory consumption in `run` mode by removing reporter logs for successful tests. Fixes [#25230](https://github.com/cypress-io/cypress/issues/25230).

**Bugfixes:**

- Fixed an issue where alternative Microsoft Edge Beta, Canary, and Dev binary versions were not being discovered by Cypress.
Fixes [#25455](https://github.com/cypress-io/cypress/issues/25455).
- Fixed an issue where alternative Microsoft Edge Beta, Canary, and Dev binary versions were not being discovered by Cypress. Fixes [#25455](https://github.com/cypress-io/cypress/issues/25455).

**Dependency Updates:**

- Upgraded [`underscore.string`](https://github.com/esamattis/underscore.string/blob/HEAD/CHANGELOG.markdown) from `3.3.5` to `3.3.6` to reference rebuilt assets after security patch to fix regular expression DDOS exploit.
Fixed in [#25574](https://github.com/cypress-io/cypress/pull/25574).
- Upgraded [`underscore.string`](https://github.com/esamattis/underscore.string/blob/HEAD/CHANGELOG.markdown) from `3.3.5` to `3.3.6` to reference rebuilt assets after security patch to fix regular expression DDOS exploit. Addressed in [#25574](https://github.com/cypress-io/cypress/pull/25574).

## 12.4.1

Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"commander": "^5.1.0",
"common-tags": "^1.8.0",
"dayjs": "^1.10.4",
"debug": "^4.3.2",
"debug": "^4.3.4",
"enquirer": "^2.3.6",
"eventemitter2": "6.4.7",
"execa": "4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5976,14 +5976,14 @@ declare namespace Cypress {
* Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
* @see https://on.cypress.io/catalog-of-events#App-Events
*/
(action: 'log:added', fn: (log: any, interactive: boolean) => void): Cypress
(action: 'log:added', fn: (attributes: ObjectLike, log: any) => void): Cypress
/**
* Fires whenever a command's attributes changes.
* This event is debounced to prevent it from firing too quickly and too often.
* Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
* @see https://on.cypress.io/catalog-of-events#App-Events
*/
(action: 'log:changed', fn: (log: any, interactive: boolean) => void): Cypress
(action: 'log:changed', fn: (attributes: ObjectLike, log: any) => void): Cypress
/**
* Fires before the test and all **before** and **beforeEach** hooks run.
* @see https://on.cypress.io/catalog-of-events#App-Events
Expand Down
11 changes: 9 additions & 2 deletions cli/types/tests/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ Cypress.on('command:retry', (command) => {
command // $ExpectType CommandQueue
})

Cypress.on('log:added', (log, interactive: boolean) => {
Cypress.on('log:added', (attributes, log) => {
attributes // $ExpectType ObjectLike
log // $ExpectTyped any
})

Cypress.on('log:changed', (log, interactive: boolean) => {
Cypress.on('log:changed', (attributes, log) => {
attributes // $ExpectType ObjectLike
log // $ExpectTyped any
})

Expand All @@ -74,6 +76,11 @@ Cypress.on('test:before:run', (attributes , test) => {
test // $ExpectType Test
})

Cypress.on('test:before:run:async', (attributes , test) => {
attributes // $ExpectType ObjectLike
test // $ExpectType Test
})

Cypress.on('test:after:run', (attributes , test) => {
attributes // $ExpectType ObjectLike
test // $ExpectType Test
Expand Down
2 changes: 2 additions & 0 deletions npm/grep/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [@cypress/grep-v3.1.4](https://github.com/cypress-io/cypress/compare/@cypress/grep-v3.1.3...@cypress/grep-v3.1.4) (2023-02-06)

# [@cypress/grep-v3.1.3](https://github.com/cypress-io/cypress/compare/@cypress/grep-v3.1.2...@cypress/grep-v3.1.3) (2022-12-14)


Expand Down
2 changes: 1 addition & 1 deletion npm/grep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "eslint . --ext .js,.ts"
},
"dependencies": {
"debug": "^4.3.2",
"debug": "^4.3.4",
"find-test-names": "^1.19.0",
"globby": "^11.0.4"
},
Expand Down
6 changes: 6 additions & 0 deletions npm/react18/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@cypress/react'
import type {
MountOptions,
MountReturn,
InternalMountOptions,
UnmountArgs,
} from '@cypress/react'
Expand Down Expand Up @@ -83,3 +84,8 @@ export function unmount (options: UnmountArgs = { log: true }) {
export {
getContainerEl,
}

export type {
MountOptions,
MountReturn,
}
2 changes: 2 additions & 0 deletions npm/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# [@cypress/vue-v5.0.4](https://github.com/cypress-io/cypress/compare/@cypress/vue-v5.0.3...@cypress/vue-v5.0.4) (2023-02-06)

# [@cypress/vue-v5.0.3](https://github.com/cypress-io/cypress/compare/@cypress/vue-v5.0.2...@cypress/vue-v5.0.3) (2022-12-02)


Expand Down
2 changes: 1 addition & 1 deletion npm/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@vue/test-utils": "2.0.2",
"axios": "0.21.2",
"cypress": "0.0.0-development",
"debug": "^4.3.2",
"debug": "^4.3.4",
"globby": "^11.0.1",
"tailwindcss": "1.1.4",
"typescript": "^4.7.4",
Expand Down
9 changes: 9 additions & 0 deletions npm/webpack-preprocessor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [@cypress/webpack-preprocessor-v5.16.3](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.16.2...@cypress/webpack-preprocessor-v5.16.3) (2023-02-06)

# [@cypress/webpack-preprocessor-v5.16.2](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.16.1...@cypress/webpack-preprocessor-v5.16.2) (2023-02-02)


### Bug Fixes

* allow version 9 of the babel-loader peer dependency ([#25569](https://github.com/cypress-io/cypress/issues/25569)) ([5afe19f](https://github.com/cypress-io/cypress/commit/5afe19f8d17b5da53d66a0513424403006167adf))

# [@cypress/webpack-preprocessor-v5.16.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-preprocessor-v5.16.0...@cypress/webpack-preprocessor-v5.16.1) (2022-12-29)


Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-preprocessor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/parser": "^7.13.0",
"@babel/traverse": "^7.17.9",
"bluebird": "3.7.1",
"debug": "^4.3.2",
"debug": "^4.3.4",
"fs-extra": "^10.1.0",
"loader-utils": "^2.0.0",
"lodash": "^4.17.20",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cypress",
"version": "12.4.1",
"version": "12.5.1",
"description": "Cypress is a next generation front end testing tool built for the modern web",
"private": true,
"scripts": {
Expand Down Expand Up @@ -93,7 +93,7 @@
"@types/bluebird": "3.5.29",
"@types/chai-enzyme": "0.6.7",
"@types/classnames": "2.2.9",
"@types/debug": "4.1.5",
"@types/debug": "4.1.7",
"@types/detect-port": "^1.3.1",
"@types/enzyme-adapter-react-16": "1.0.5",
"@types/execa": "0.9.0",
Expand Down Expand Up @@ -137,7 +137,7 @@
"common-tags": "1.8.0",
"conventional-recommended-bump": "6.1.0",
"cross-env": "7.0.3",
"debug": "^4.3.2",
"debug": "^4.3.4",
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.3.0",
Expand Down
45 changes: 33 additions & 12 deletions packages/app/cypress/e2e/debug.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { OpenFileInIdeQuery } from '../../src/generated/graphql-test'
import RelevantRunsDataSource_RunsByCommitShas from '../fixtures/gql-RelevantRunsDataSource_RunsByCommitShas.json'

Cypress.on('window:before:load', (win) => {
Expand Down Expand Up @@ -31,27 +32,27 @@ describe('App - Debug Page', () => {
it('all tests passed', () => {
// This mocks all the responses so we can get deterministic
// results to test the debug page.
cy.intercept('POST', '/__cypress/graphql/query-Debug', {
cy.intercept('query-Debug', {
fixture: 'debug-Passing/gql-Debug.json',
})

cy.intercept('POST', '/__cypress/graphql/query-CloudViewerAndProject_RequiredData', {
cy.intercept('query-CloudViewerAndProject_RequiredData', {
fixture: 'debug-Passing/gql-CloudViewerAndProject_RequiredData.json',
})

cy.intercept('POST', '/__cypress/graphql/query-MainAppQuery', {
cy.intercept('query-MainAppQuery', {
fixture: 'debug-Passing/gql-MainAppQuery.json',
})

cy.intercept('POST', '/__cypress/graphql/query-SideBarNavigationContainer', {
cy.intercept('query-SideBarNavigationContainer', {
fixture: 'debug-Passing/gql-SideBarNavigationContainer',
})

cy.intercept('POST', '/__cypress/graphql/query-HeaderBar_HeaderBarQuery', {
cy.intercept('query-HeaderBar_HeaderBarQuery', {
fixture: 'debug-Passing/gql-HeaderBar_HeaderBarQuery',
})

cy.intercept('POST', '/__cypress/graphql/query-SpecsPageContainer', {
cy.intercept('query-SpecsPageContainer', {
fixture: 'debug-Passing/gql-SpecsPageContainer',
})

Expand Down Expand Up @@ -86,30 +87,44 @@ describe('App - Debug Page', () => {
})

it('shows information about a failed spec', () => {
cy.intercept('POST', '/__cypress/graphql/query-Debug', {
cy.intercept('query-Debug', {
fixture: 'debug-Failing/gql-Debug.json',
})

cy.intercept('POST', '/__cypress/graphql/query-CloudViewerAndProject_RequiredData', {
cy.intercept('query-CloudViewerAndProject_RequiredData', {
fixture: 'debug-Failing/gql-CloudViewerAndProject_RequiredData.json',
})

cy.intercept('POST', '/__cypress/graphql/query-MainAppQuery', {
cy.intercept('query-MainAppQuery', {
fixture: 'debug-Failing/gql-MainAppQuery.json',
})

cy.intercept('POST', '/__cypress/graphql/query-SideBarNavigationContainer', {
cy.intercept('query-SideBarNavigationContainer', {
fixture: 'debug-Failing/gql-SideBarNavigationContainer',
})

cy.intercept('POST', '/__cypress/graphql/query-HeaderBar_HeaderBarQuery', {
cy.intercept('query-HeaderBar_HeaderBarQuery', {
fixture: 'debug-Failing/gql-HeaderBar_HeaderBarQuery',
})

cy.intercept('POST', '/__cypress/graphql/query-SpecsPageContainer', {
cy.intercept('query-SpecsPageContainer', {
fixture: 'debug-Failing/gql-SpecsPageContainer',
})

cy.intercept('query-OpenFileInIDE', (req) => {
req.on('response', (res) => {
const gqlData = res.body.data as OpenFileInIdeQuery

gqlData.localSettings.preferences.preferredEditorBinary = 'code'
})
})

cy.intercept('mutation-OpenFileInIDE_Mutation').as('openFileInIDE')

cy.withCtx((ctx, { sinon }) => {
sinon.stub(ctx.actions.file, 'openFile')
})

cy.visitApp()

cy.findByTestId('sidebar-link-debug-page').click()
Expand Down Expand Up @@ -147,5 +162,11 @@ describe('App - Debug Page', () => {
cy.findByTestId('test-row').contains('InfoPanel')
cy.findByTestId('test-row').contains('renders')
cy.findByTestId('run-failures').should('exist').should('have.attr', 'href', '#/specs/runner?file=src/components/InfoPanel/InfoPanel.cy.ts&mode=debug')

cy.findByLabelText('Open in IDE').click()
cy.wait('@openFileInIDE')
cy.withCtx((ctx) => {
expect(ctx.actions.file.openFile).to.have.been.calledWith('src/components/InfoPanel/InfoPanel.cy.ts', 1, 1)
})
})
})
2 changes: 1 addition & 1 deletion packages/app/src/debug/DebugArtifactLink.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('<DebugArtifacts />', () => {
it('mounts correctly, provides expected tooltip content, and emits correct event', () => {
artifactMapping.forEach((artifact) => {
cy.mount(() => (
<DebugArtifactLink icon={artifact.icon} popperText={artifact.text} url={artifact.url}/>
<DebugArtifactLink class="m-24px inline-flex" icon={artifact.icon} popperText={artifact.text} url={artifact.url}/>
))

cy.findByTestId(`artifact-for-${artifact.icon}`).should('have.length', 1)
Expand Down
Loading

0 comments on commit bdce6fe

Please sign in to comment.