Skip to content

Commit

Permalink
Merge branch 'develop' into issue-5452
Browse files Browse the repository at this point in the history
  • Loading branch information
Crustum7 authored Aug 31, 2023
2 parents 1ab491e + 0f9a150 commit 953631d
Show file tree
Hide file tree
Showing 22 changed files with 169 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

08-29-23
08-31-23
12 changes: 6 additions & 6 deletions .github/workflows/snyk_sca_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Snyk Software Composition Analysis Scan
# This git workflow leverages Snyk actions to perform a Software Composition
# This git workflow leverages Snyk actions to perform a Software Composition
# Analysis scan on our Opensource libraries upon Pull Requests to the
# "develop" branch. We use this as a control to prevent vulnerable packages
# from being introduced into the codebase.
# "develop" branch. We use this as a control to prevent vulnerable packages
# from being introduced into the codebase.
# Enhancements were made to this action to build the yarn packages to reduce
# Snyk scan errors that were complaining about the yarn.locks etc. Also
# Snyk scan errors that were complaining about the yarn.locks etc. Also
# implemented PAT token for actions to resolve an issue with the action not
# running and reporting back to the PR status checks
on:
pull_request_target:
branches:
pull_request:
branches:
- develop
jobs:
Snyk_SCA_Scan:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/snyk_static_analysis_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Snyk Static Analysis Scan
# This git workflow leverages Snyk actions to perform a Static Application
# This git workflow leverages Snyk actions to perform a Static Application
# Testing scan (SAST) on our first-party code upon Pull Requests to the
# "develop" branch. We use this as a control to prevent vulnerabilities
# from being introduced into the codebase.
# "develop" branch. We use this as a control to prevent vulnerabilities
# from being introduced into the codebase.
on:
pull_request_target:
branches:
pull_request:
branches:
- develop
jobs:
Snyk_SAST_Scan :
Expand Down
12 changes: 10 additions & 2 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.1.0

_Released 09/12/2023 (PENDING)_
_Released 08/31/2023_

**Features:**

- Introduce a status icon representing the `latest` test run in the Sidebar for the Runs Page. Addresses [#27206](https://github.com/cypress-io/cypress/issues/27206).
- Introduces a status icon representing the `latest` test run in the Sidebar for the Runs Page. Addresses [#27206](https://github.com/cypress-io/cypress/issues/27206).

**Bugfixes:**

- Fixed a regression introduced in Cypress [13.0.0](#13-0-0) where the [Module API](https://docs.cypress.io/guides/guides/module-api), [`after:run`](https://docs.cypress.io/api/plugins/after-run-api), and [`after:spec`](https://docs.cypress.io/api/plugins/after-spec-api) results did not include the `stats.skipped` field for each run result. Fixes [#27694](https://github.com/cypress-io/cypress/issues/27694). Addressed in [#27695](https://github.com/cypress-io/cypress/pull/27695).
- Individual CDP errors that occur while capturing data for test replay will no longer prevent the entire run from being available. Addressed in [#27709](https://github.com/cypress-io/cypress/pull/27709).
- Fixed an issue where the release date on the `v13` landing page was a day behind. Fixed in [#27711](https://github.com/cypress-io/cypress/pull/27711).
- Fixed an issue where fatal protocol errors would leak between specs causing all subsequent specs to fail to upload protocol information. Fixed in [#27720](https://github.com/cypress-io/cypress/pull/27720)
- Updated `plist` from `3.0.6` to `3.1.0` to address [CVE-2022-37616](https://github.com/advisories/GHSA-9pgh-qqpf-7wqj) and [CVE-2022-39353](https://github.com/advisories/GHSA-crh6-fp67-6883). Fixed in [#27710](https://github.com/cypress-io/cypress/pull/27710).

## 13.0.0

Expand Down
1 change: 1 addition & 0 deletions cli/types/cypress-npm-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ declare namespace CypressCommandLine {
failures: number
passes: number
pending: number
skipped: number
startedAt: dateTimeISO
suites: number
tests: number
Expand Down
7 changes: 7 additions & 0 deletions npm/webpack-batteries-included-preprocessor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@cypress/webpack-batteries-included-preprocessor-v3.0.2](https://github.com/cypress-io/cypress/compare/@cypress/webpack-batteries-included-preprocessor-v3.0.1...@cypress/webpack-batteries-included-preprocessor-v3.0.2) (2023-08-31)


### Bug Fixes

* change how tsconfig is aliased in webpack-batteries-included-preprocessor ([#27706](https://github.com/cypress-io/cypress/issues/27706)) ([6081751](https://github.com/cypress-io/cypress/commit/6081751c411a45bb9eaf7ba200d4921acdcc2422))

# [@cypress/webpack-batteries-included-preprocessor-v3.0.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-batteries-included-preprocessor-v3.0.0...@cypress/webpack-batteries-included-preprocessor-v3.0.1) (2023-08-29)


Expand Down
4 changes: 2 additions & 2 deletions npm/webpack-batteries-included-preprocessor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const addTypeScriptConfig = (file, options) => {

const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
// node will try to load a projects tsconfig.json instead of the node
// package using require('tsconfig'), so we alias it as 'tsconfig-package'
const configFile = require('tsconfig-package').findSync(path.dirname(file.filePath))
// package using require('tsconfig'), so we alias it as 'tsconfig-aliased-for-wbip'
const configFile = require('tsconfig-aliased-for-wbip').findSync(path.dirname(file.filePath))

webpackOptions.module.rules.push({
test: /\.tsx?$/,
Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-batteries-included-preprocessor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"stream-http": "^3.2.0",
"timers-browserify": "^2.0.12",
"ts-loader": "9.4.4",
"tsconfig-package": "npm:tsconfig@^7.0.0",
"tsconfig-aliased-for-wbip": "npm:tsconfig@^7.0.0",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"tty-browserify": "^0.0.1",
"url": "^0.11.1",
Expand Down
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": "13.0.0",
"version": "13.1.0",
"description": "Cypress is a next generation front end testing tool built for the modern web",
"private": true,
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions packages/driver/cypress/e2e/commands/sessions/sessions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ describe('cy.session', { retries: 0 }, () => {
const clearCurrentSessionData = cy.spy(Cypress.session, 'clearCurrentSessionData')

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand All @@ -127,7 +127,7 @@ describe('cy.session', { retries: 0 }, () => {
const backendSpy = cy.spy(Cypress, 'backend').log(false)

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand All @@ -144,7 +144,7 @@ describe('cy.session', { retries: 0 }, () => {
cy.spy(Cypress, 'action').log(false)

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))
})
Expand Down Expand Up @@ -839,7 +839,7 @@ describe('cy.session', { retries: 0 }, () => {
cy.spy(Cypress, 'action').log(false)

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand All @@ -853,7 +853,7 @@ describe('cy.session', { retries: 0 }, () => {
const clearCurrentSessionData = cy.spy(Cypress.session, 'clearCurrentSessionData')

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand All @@ -864,7 +864,7 @@ describe('cy.session', { retries: 0 }, () => {
const backendSpy = cy.spy(Cypress, 'backend').log(false)

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand All @@ -882,7 +882,7 @@ describe('cy.session', { retries: 0 }, () => {
cy.spy(Cypress, 'action').log(false)

await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))

Expand Down
2 changes: 1 addition & 1 deletion packages/driver/cypress/e2e/commands/window.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ describe('src/cy/commands/window', () => {

cy.viewport(500, 400).then(async () => {
await Cypress.action('runner:test:before:run:async', {
runnable: 'r1',
id: 'r1',
currentRetry: 0,
}, Cypress.state('runnable'))
.then(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/driver/cypress/e2e/e2e/dom_hitbox.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('rect highlight', { browser: '!webkit' }, () => {
})

const ensureCorrectTargetPosition = (sel) => {
return cy.wrap(null, { timeout: 400 }).should(() => {
return cy.wrap(null, { timeout: 4000 }).should(() => {
const target = cy.$$('div[data-highlight-hitbox]')[0].getBoundingClientRect()

const dims = {
Expand All @@ -101,7 +101,7 @@ const ensureCorrectTargetPosition = (sel) => {
}

const ensureCorrectHighlightPositions = (sel) => {
return cy.wrap(null, { timeout: 400 }).should(() => {
return cy.wrap(null, { timeout: 4000 }).should(() => {
const els = {
content: cy.$$('div[data-layer=Content]'),
padding: cy.$$('div[data-layer=Padding]'),
Expand Down
2 changes: 1 addition & 1 deletion packages/launcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"execa": "4.0.0",
"fs-extra": "9.1.0",
"lodash": "^4.17.21",
"plist": "3.0.6",
"plist": "3.1.0",
"semver": "7.3.5",
"which": "2.0.2",
"win-version-info": "5.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('<MajorVersionWelcome />', { viewportWidth: 1280, viewportHeight: 1400
})

it('renders correct time for releases and overflows correctly', () => {
cy.clock(Date.UTC(2023, 7, 30))
cy.clock(Date.UTC(2023, 7, 29))
cy.mount(<MajorVersionWelcome />)
cy.contains('13.0.0 Released just now')
cy.contains('12.0.0 Released 9 months ago')
Expand Down
2 changes: 1 addition & 1 deletion packages/launchpad/src/migration/MajorVersionWelcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const versionReleaseDates = computed(() => {
'10': useTimeAgo(Date.UTC(2022, 5, 1)).value,
'11': useTimeAgo(Date.UTC(2022, 10, 8)).value,
'12': useTimeAgo(Date.UTC(2022, 11, 6)).value,
'13': useTimeAgo(Date.UTC(2023, 7, 30)).value,
'13': useTimeAgo(Date.UTC(2023, 7, 29)).value,
}
})

Expand Down
10 changes: 8 additions & 2 deletions packages/server/lib/cloud/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class ProtocolManager implements ProtocolManagerShape {
await listener(message)
} catch (error) {
if (CAPTURE_ERRORS) {
this._errors.push({ captureMethod: 'cdpClient.on', fatal: true, error, args: [event, message] })
this._errors.push({ captureMethod: 'cdpClient.on', fatal: false, error, args: [event, message] })
} else {
debug('error in cdpClient.on %O', { error, event, message })
throw error
Expand All @@ -134,11 +134,17 @@ export class ProtocolManager implements ProtocolManagerShape {
return
}

// Reset the errors here so that we are tracking on them per-spec
this._errors = []

try {
this._beforeSpec(spec)
} catch (error) {
// Clear out protocol since we will not have a valid state when spec has failed
this._protocol = undefined

if (CAPTURE_ERRORS) {
this._errors.push({ captureMethod: 'beforeSpec', error, args: [spec], runnableId: this._runnableId })
this._errors.push({ captureMethod: 'beforeSpec', fatal: true, error, args: [spec], runnableId: this._runnableId })
} else {
throw error
}
Expand Down
1 change: 1 addition & 0 deletions packages/server/lib/modes/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const createPublicRun = (run: RunResult): CypressCommandLine.RunResult => ({
failures: run.stats.failures,
passes: run.stats.passes,
pending: run.stats.pending,
skipped: run.stats.skipped,
startedAt: run.stats.wallClockStartedAt,
suites: run.stats.suites,
tests: run.stats.tests,
Expand Down
8 changes: 8 additions & 0 deletions packages/server/test/unit/cloud/protocol_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,18 @@ describe('lib/cloud/protocol', () => {
it('should be able to initialize a new spec', () => {
sinon.stub(protocol, 'beforeSpec')

;(protocolManager as any)._errors = [
{
captureMethod: 'cdpClient.on',
},
]

protocolManager.beforeSpec({
instanceId: 'instanceId',
})

expect((protocolManager as any)._errors).to.be.empty

expect(protocol.beforeSpec).to.be.calledWith({
workingDirectory: path.join(os.tmpdir(), 'cypress', 'protocol'),
archivePath: path.join(os.tmpdir(), 'cypress', 'protocol', 'instanceId.tar'),
Expand Down
Loading

0 comments on commit 953631d

Please sign in to comment.