Skip to content

Commit ef507c6

Browse files
Blue FCarbonCollinsemilyrohrboughAtofStrykerrenovate[bot]
authored
chore: Merge develop into release/13.0.0 (#25668)
* fix: match alternate edge version string format (#25457) * fix: match alternate edge version string format * chore: add changelog entry * Apply suggestions from code review * Update cli/CHANGELOG.md * Update cli/CHANGELOG.md * chore: update changelog to release on Tuesday for 12.5 * [run ci] --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Bill Glesias <bglesias@gmail.com> * chore: Use upstream cypress-testing-library again (#25548) * chore: Use upstream cypress-testing-library again * Update cypress-example-kitchensink commit hash * Revert "Update cypress-example-kitchensink commit hash" This reverts commit 8de5d1f. --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * fix(deps): update dependency underscore.string to v3.3.6 🌟 (#25574) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Bill Glesias <bglesias@gmail.com> * feat: Debug page [IATR] (#25488) Co-authored-by: Zachary Williams <ZachJW34@gmail.com> Co-authored-by: Ankit <ankit@cypress.io> Co-authored-by: Stokes Player <stokes.player@gmail.com> Co-authored-by: elevatebart <bart@cypress.io> Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com> Co-authored-by: Stokes Player <stokes@cypress.io> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Mark Noonan <mark@cypress.io> Co-authored-by: Mike Plummer <mikep@cypress.io> Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com> Co-authored-by: Adam Stone-Lord <adams@cypress.io> Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com> Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> * chore: fix changlelog section parsing and reference right ENV (#25633) * test: skip flaky migration test (#25378) * chore: Update README to add Cloud badges (#25645) * perf: remove reporter logs for collapsed tests in run mode (#25632) Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * chore: 12.5.0 release (#25648) * dependency: update dependency simple-git to v3.16.0 [security] (#25603) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Zachary Williams <zachjw34@gmail.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * chore: renovate semantic types and percy ci updates (#25651) --------- Co-authored-by: Steven Collins <steven@carboncollins.uk> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Stokes Player <stokes@cypress.io> Co-authored-by: Zachary Williams <ZachJW34@gmail.com> Co-authored-by: Ankit <ankit@cypress.io> Co-authored-by: Stokes Player <stokes.player@gmail.com> Co-authored-by: elevatebart <bart@cypress.io> Co-authored-by: Rocky <25568640+rockindahizzy@users.noreply.github.com> Co-authored-by: Mark Noonan <mark@cypress.io> Co-authored-by: Mike Plummer <mikep@cypress.io> Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com> Co-authored-by: Adam Stone-Lord <adams@cypress.io> Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com> Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Matt Schile <mschile@cypress.io>
1 parent 1f9ae86 commit ef507c6

File tree

197 files changed

+15277
-666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+15277
-666
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ yarn add cypress --dev
6363

6464
## Contributing
6565

66-
- [![CircleCI](https://circleci.com/gh/cypress-io/cypress/tree/develop.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress/tree/develop) - `develop` branch
66+
[![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)
67+
[![CircleCI](https://circleci.com/gh/cypress-io/cypress/tree/develop.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress/tree/develop) - `develop` branch
6768

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

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

8081
## Badges
8182

82-
Let the world know your project is using Cypress.io to test with this cool badge
83+
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).
84+
85+
[![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)
86+
87+
[![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)
88+
89+
Or let the world know your project is using Cypress with the badge below.
8390

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

cli/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
2+
## 12.5.1
3+
4+
_Released 02/10/2023 (PENDING)_
5+
6+
**Dependency Updates:**
7+
8+
- 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).
9+
10+
## 12.5.0
11+
12+
_Released 01/31/2023_
13+
14+
**Features:**
15+
16+
- 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).
17+
18+
**Performance:**
19+
20+
- Improved memory consumption in `run` mode by removing reporter logs for successful tests. Fixes [#25230](https://github.com/cypress-io/cypress/issues/25230).
21+
22+
**Bugfixes:**
23+
24+
- 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).
25+
26+
**Dependency Updates:**
27+
28+
- 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).
29+
230
## 12.4.1
331

432
_Released 01/27/2023_

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cypress",
3-
"version": "12.4.1",
3+
"version": "12.5.0",
44
"description": "Cypress is a next generation front end testing tool built for the modern web",
55
"private": true,
66
"scripts": {

packages/app/cypress/e2e/cypress-in-cypress-run-mode.cy.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
import { CY_IN_CY_SIMULATE_RUN_MODE } from '@packages/types/src/constants'
2+
13
describe('Cypress In Cypress - run mode', { viewportWidth: 1200 }, () => {
24
it('e2e run mode spec runner header is correct', () => {
35
cy.scaffoldProject('cypress-in-cypress')
46
cy.findBrowsers()
57
cy.openProject('cypress-in-cypress')
68
cy.startAppServer()
7-
cy.visitApp()
8-
9-
simulateRunModeInUI()
9+
cy.visitApp(`/specs/runner?file=cypress/e2e/dom-content.spec.js&${CY_IN_CY_SIMULATE_RUN_MODE}`)
1010

11-
cy.contains('dom-content.spec').click()
1211
cy.waitForSpecToFinish()
1312

1413
cy.findByTestId('aut-url').should('be.visible')
@@ -33,17 +32,14 @@ describe('Cypress In Cypress - run mode', { viewportWidth: 1200 }, () => {
3332
// cy.percySnapshot() // TODO: restore when Percy CSS is fixed. See https://github.com/cypress-io/cypress/issues/23435
3433
})
3534

36-
// TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23306
37-
it('component testing run mode spec runner header is correct', { retries: 15 }, () => {
35+
it('component testing run mode spec runner header is correct', () => {
3836
cy.scaffoldProject('cypress-in-cypress')
3937
cy.findBrowsers()
4038
cy.openProject('cypress-in-cypress')
4139
cy.startAppServer('component')
42-
cy.visitApp()
43-
simulateRunModeInUI()
44-
cy.contains('TestComponent.spec').click()
45-
cy.waitForSpecToFinish()
40+
cy.visitApp(`/specs/runner?file=src/TestComponent.spec.jsx&${CY_IN_CY_SIMULATE_RUN_MODE}`)
4641

42+
cy.waitForSpecToFinish()
4743
cy.findByTestId('aut-url').should('not.exist')
4844
cy.findByTestId('playground-activator').should('not.exist')
4945

@@ -81,9 +77,7 @@ describe('Cypress In Cypress - run mode', { viewportWidth: 1200 }, () => {
8177
})
8278
})
8379

84-
cy.visitApp()
85-
simulateRunModeInUI()
86-
cy.contains('dom-content.spec').click()
80+
cy.visitApp(`/specs/runner?file=cypress/e2e/dom-content.spec.js&${CY_IN_CY_SIMULATE_RUN_MODE}`)
8781

8882
cy.contains('http://localhost:4455/cypress/e2e/dom-content.html').should('be.visible')
8983
cy.findByLabelText('Stats').should('not.exist')
@@ -92,13 +86,3 @@ describe('Cypress In Cypress - run mode', { viewportWidth: 1200 }, () => {
9286
cy.findByTestId('sidebar').should('not.exist')
9387
})
9488
})
95-
96-
function simulateRunModeInUI () {
97-
// this simulates run mode enough for this test
98-
cy.window().then((win) => {
99-
win.__CYPRESS_MODE__ = 'run'
100-
cy.get('body').then(($el) => {
101-
$el.find('[data-cy="sidebar"]')?.remove()
102-
})
103-
})
104-
}
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
import RelevantRunsDataSource_RunsByCommitShas from '../fixtures/gql-RelevantRunsDataSource_RunsByCommitShas.json'
2+
3+
Cypress.on('window:before:load', (win) => {
4+
win.__CYPRESS_GQL_NO_SOCKET__ = 'true'
5+
})
6+
7+
// These mocks all the responses so we can get deterministic
8+
// results to test the debug page.
9+
// The JSON fixtures were generated by using a real app and capturing
10+
// the responses.
11+
describe('App - Debug Page', () => {
12+
beforeEach(() => {
13+
cy.scaffoldProject('cypress-in-cypress')
14+
cy.openProject('cypress-in-cypress')
15+
cy.startAppServer('component')
16+
17+
cy.loginUser()
18+
cy.withCtx((ctx) => {
19+
ctx.git?.__setGitHashesForTesting(['commit1', 'commit2'])
20+
})
21+
22+
cy.remoteGraphQLIntercept((obj, _testState, options) => {
23+
if (obj.operationName === 'RelevantRunsDataSource_RunsByCommitShas') {
24+
obj.result.data = options.RelevantRunsDataSource_RunsByCommitShas.data
25+
}
26+
27+
return obj.result
28+
}, { RelevantRunsDataSource_RunsByCommitShas })
29+
})
30+
31+
it('all tests passed', () => {
32+
// This mocks all the responses so we can get deterministic
33+
// results to test the debug page.
34+
cy.intercept('POST', '/__cypress/graphql/query-Debug', {
35+
fixture: 'debug-Passing/gql-Debug.json',
36+
})
37+
38+
cy.intercept('POST', '/__cypress/graphql/query-CloudViewerAndProject_RequiredData', {
39+
fixture: 'debug-Passing/gql-CloudViewerAndProject_RequiredData.json',
40+
})
41+
42+
cy.intercept('POST', '/__cypress/graphql/query-MainAppQuery', {
43+
fixture: 'debug-Passing/gql-MainAppQuery.json',
44+
})
45+
46+
cy.intercept('POST', '/__cypress/graphql/query-SideBarNavigationContainer', {
47+
fixture: 'debug-Passing/gql-SideBarNavigationContainer',
48+
})
49+
50+
cy.intercept('POST', '/__cypress/graphql/query-HeaderBar_HeaderBarQuery', {
51+
fixture: 'debug-Passing/gql-HeaderBar_HeaderBarQuery',
52+
})
53+
54+
cy.intercept('POST', '/__cypress/graphql/query-SpecsPageContainer', {
55+
fixture: 'debug-Passing/gql-SpecsPageContainer',
56+
})
57+
58+
cy.visitApp()
59+
60+
cy.findByTestId('sidebar-link-debug-page').click()
61+
cy.findByTestId('debug-container').should('be.visible')
62+
63+
cy.findByTestId('header-top').contains('update projectId')
64+
cy.findByTestId('debug-header-dashboard-link')
65+
.contains('View in Cypress Cloud')
66+
.should('have.attr', 'href', 'https://cloud.cypress.io/projects/7p5uce/runs/2')
67+
68+
cy.findByTestId('debug-runNumber-PASSED').contains('#2')
69+
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')
70+
71+
cy.findByTestId('metadata').within(() => {
72+
cy.get('[title="passed"]').contains('2')
73+
cy.get('[title="failed"]').contains('0')
74+
cy.get('[title="skipped"]').contains('0')
75+
cy.get('[title="pending"]').contains('2')
76+
cy.findByTestId('debug-header-branch').contains('main')
77+
cy.findByTestId('debug-header-commitHash').contains('e9d176f')
78+
cy.findByTestId('debug-header-author').contains('Lachlan Miller')
79+
cy.findByTestId('debug-header-createdAt').contains('01:18')
80+
})
81+
82+
cy.findByTestId('debug-passed').contains('Well Done!')
83+
cy.findByTestId('debug-passed').contains('All your tests passed.')
84+
cy.findByLabelText('Relevant run passed').should('be.visible').contains('0')
85+
cy.findByTestId('run-failures').should('not.exist')
86+
})
87+
88+
it('shows information about a failed spec', () => {
89+
cy.intercept('POST', '/__cypress/graphql/query-Debug', {
90+
fixture: 'debug-Failing/gql-Debug.json',
91+
})
92+
93+
cy.intercept('POST', '/__cypress/graphql/query-CloudViewerAndProject_RequiredData', {
94+
fixture: 'debug-Failing/gql-CloudViewerAndProject_RequiredData.json',
95+
})
96+
97+
cy.intercept('POST', '/__cypress/graphql/query-MainAppQuery', {
98+
fixture: 'debug-Failing/gql-MainAppQuery.json',
99+
})
100+
101+
cy.intercept('POST', '/__cypress/graphql/query-SideBarNavigationContainer', {
102+
fixture: 'debug-Failing/gql-SideBarNavigationContainer',
103+
})
104+
105+
cy.intercept('POST', '/__cypress/graphql/query-HeaderBar_HeaderBarQuery', {
106+
fixture: 'debug-Failing/gql-HeaderBar_HeaderBarQuery',
107+
})
108+
109+
cy.intercept('POST', '/__cypress/graphql/query-SpecsPageContainer', {
110+
fixture: 'debug-Failing/gql-SpecsPageContainer',
111+
})
112+
113+
cy.visitApp()
114+
115+
cy.findByTestId('sidebar-link-debug-page').click()
116+
cy.findByTestId('debug-container').should('be.visible')
117+
118+
cy.findByTestId('header-top').contains('chore: testing cypress')
119+
cy.findByTestId('debug-header-dashboard-link')
120+
.contains('View in Cypress Cloud')
121+
.should('have.attr', 'href', 'https://cloud.cypress.io/projects/vgqrwp/runs/136')
122+
123+
cy.findByLabelText('Relevant run had 1 test failure').should('be.visible').contains('1')
124+
125+
cy.findByTestId('debug-runNumber-FAILED').contains('#136')
126+
cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead')
127+
128+
cy.findByTestId('metadata').within(() => {
129+
cy.get('[title="passed"]').contains('1')
130+
cy.get('[title="failed"]').contains('1')
131+
cy.get('[title="skipped"]').contains('0')
132+
cy.get('[title="pending"]').contains('0')
133+
cy.findByTestId('debug-header-branch').contains('main')
134+
cy.findByTestId('debug-header-commitHash').contains('commit1')
135+
cy.findByTestId('debug-header-author').contains('Lachlan Miller')
136+
cy.findByTestId('debug-header-createdAt').contains('00:19')
137+
})
138+
139+
cy.findByTestId('spec-contents').within(() => {
140+
cy.contains('src/components/InfoPanel/InfoPanel.cy.ts')
141+
cy.findByTestId('metaData-Results-spec-duration').contains('00:04')
142+
cy.findByTestId('metaData-Results-operating-system').contains('Linux Ubuntu')
143+
cy.findByTestId('metaData-Results-browser').contains('Electron 106')
144+
cy.findByTestId('metaData-Results-testing-type').contains('Component')
145+
})
146+
147+
cy.findByTestId('test-row').contains('InfoPanel')
148+
cy.findByTestId('test-row').contains('renders')
149+
cy.findByTestId('run-failures').should('exist').should('have.attr', 'href', '#/specs/runner?file=src/components/InfoPanel/InfoPanel.cy.ts&mode=debug')
150+
})
151+
})

0 commit comments

Comments
 (0)