Skip to content

Commit

Permalink
Merge branch 'develop' into issue-3387
Browse files Browse the repository at this point in the history
  • Loading branch information
Crustum7 committed Dec 6, 2023
2 parents 3900900 + 687dc63 commit b972a61
Show file tree
Hide file tree
Showing 82 changed files with 2,556 additions and 590 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.

11-2-23
11-20-23
54 changes: 52 additions & 2 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,13 @@ commands:
which google-chrome-<<parameters.channel>> || (printf "\n\033[0;31mChrome was not successfully downloaded - bailing\033[0m\n\n" && exit 1)
echo "Location of Google Chrome Installation: `which google-chrome-<<parameters.channel>>`"
echo "Google Chrome Version: `google-chrome-<<parameters.channel>> --version`"
# This code builds better-sqlite3 on CentOS 7. This is necessary because CentOS 7 has the oldest glibc version
# that we support. The script checks for the existence of the Centos7-builder image tar file, and skips if it already
# exists. If you want to rebuild the image, set the REBUILD_CENTOS_BUILDER_IMAGE environment variable to any value.
# Since this is running Docker remote, we need to copy the project into the container, and copy the built plugin out
# of the container because the host running docker does not have access to the project directory so volume mounts are
# not possible. The built plugin is copied to the project directory so it can be injected into the final binary.
# not possible. The built plugin is copied to the project directory so it can be injected into the final binary.
build-better-sqlite3:
description: Build better-sqlite3 for CentOS 7
steps:
Expand Down Expand Up @@ -2045,6 +2045,38 @@ jobs:
command: yarn lerna run build --scope @cypress/angular
- store-npm-logs

npm-puppeteer-unit-tests:
<<: *defaults
steps:
- restore_cached_workspace
- run:
name: Build
command: yarn lerna run build --scope @cypress/puppeteer
- run:
name: Run tests
command: yarn test
working_directory: npm/puppeteer
- store_test_results:
path: npm/puppeteer/test_results
- store_artifacts:
path: npm/puppeteer/test_results
- store-npm-logs

npm-puppeteer-cypress-tests:
<<: *defaults
resource_class: small
steps:
- restore_cached_workspace
- restore_cached_system_tests_deps
- run:
command: yarn cypress:run
working_directory: npm/puppeteer
- store_test_results:
path: /tmp/cypress
- store_artifacts:
path: /tmp/artifacts
- store-npm-logs

npm-react:
<<: *defaults
steps:
Expand Down Expand Up @@ -2751,6 +2783,12 @@ linux-x64-workflow: &linux-x64-workflow
- npm-vue:
requires:
- build
- npm-puppeteer-unit-tests:
requires:
- build
- npm-puppeteer-cypress-tests:
requires:
- build
- npm-react:
requires:
- build
Expand Down Expand Up @@ -2825,6 +2863,8 @@ linux-x64-workflow: &linux-x64-workflow
- run-launchpad-component-tests-chrome
- run-launchpad-integration-tests-chrome
- run-reporter-component-tests-chrome
- npm-puppeteer-unit-tests
- npm-puppeteer-cypress-tests
- run-webpack-dev-server-integration-tests
- run-vite-dev-server-integration-tests
- v8-integration-tests
Expand Down Expand Up @@ -2872,6 +2912,8 @@ linux-x64-workflow: &linux-x64-workflow
- run-launchpad-component-tests-chrome
- run-launchpad-integration-tests-chrome
- run-reporter-component-tests-chrome
- npm-puppeteer-unit-tests
- npm-puppeteer-cypress-tests
- run-webpack-dev-server-integration-tests
- run-vite-dev-server-integration-tests
- v8-integration-tests
Expand Down Expand Up @@ -3137,6 +3179,12 @@ linux-x64-contributor-workflow: &linux-x64-contributor-workflow
- npm-vue:
requires:
- build
- npm-puppeteer-unit-tests:
requires:
- build
- npm-puppeteer-cypress-tests:
requires:
- build
- npm-react:
requires:
- build
Expand Down Expand Up @@ -3169,6 +3217,8 @@ linux-x64-contributor-workflow: &linux-x64-contributor-workflow
- npm-angular
- npm-eslint-plugin-dev
- npm-create-cypress-tests
- npm-puppeteer-unit-tests
- npm-puppeteer-cypress-tests
- npm-react
- npm-mount-utils
- npm-vue
Expand Down
37 changes: 34 additions & 3 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,54 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.6.0
## 13.7.0

_Released 11/21/2023 (PENDING)_
_Released 12/6/2023 (PENDING)_

**Features:**

- When artifacts are uploaded to the Cypress Cloud, the duration of each upload will be displayed in the console. Addresses [#28237](https://github.com/cypress-io/cypress/issues/28237).
- Introduces shorthand version of using cy.request() with fixture data. Addresses [#3387](https://github.com/cypress-io/cypress/issues/3387).

## 13.6.1

_Released 12/5/2023_

**Bugfixes:**

- Fixed an issue where pages or downloads opened in a new tab were missing basic auth headers. Fixes [#28350](https://github.com/cypress-io/cypress/issues/28350).
- Fixed an issue where request logging would default the `message` to the `args` of the currently running command even though those `args` would not apply to the request log and are not displayed. If the `args` are sufficiently large (e.g. when running the `cy.task` from the [code-coverage](https://github.com/cypress-io/code-coverage/) plugin) there could be performance/memory implications. Addressed in [#28411](https://github.com/cypress-io/cypress/pull/28411).
- Fixed an issue where commands would fail with the error `must only be invoked from the spec file or support file` if the project's `baseUrl` included basic auth credentials. Fixes [#27457](https://github.com/cypress-io/cypress/issues/27457) and [#28336](https://github.com/cypress-io/cypress/issues/28336).
- Fixed an issue where some URLs would timeout in pre-request correlation. Addressed in [#28427](https://github.com/cypress-io/cypress/pull/28427).
- Cypress will now correctly log errors and debug logs on Linux machines. Fixes [#5051](https://github.com/cypress-io/cypress/issues/5051) and [#24713](https://github.com/cypress-io/cypress/issues/24713).

**Misc:**

- Artifact upload duration is now reported to Cypress Cloud. Fixes [#28238](https://github.com/cypress-io/cypress/issues/28238). Addressed in [#28418](https://github.com/cypress-io/cypress/pull/28418).

## 13.6.0

_Released 11/21/2023_

**Features:**

- Added an activity indicator to CLI output when artifacts (screenshots, videos, or Test Replay) are being uploaded to the cloud. Addresses [#28239](https://github.com/cypress-io/cypress/issues/28239). Addressed in [#28277](https://github.com/cypress-io/cypress/pull/28277).
- When artifacts are uploaded to the Cypress Cloud, the duration of each upload will be displayed in the terminal. Addresses [#28237](https://github.com/cypress-io/cypress/issues/28237).

**Bugfixes:**

- We now allow absolute paths when setting `component.indexHtmlFile` in the Cypress config. Fixes [#27750](https://github.com/cypress-io/cypress/issues/27750).
- Fixed an issue where dynamic intercept aliases now show with alias name instead of "no alias" in driver. Addresses [#24653](https://github.com/cypress-io/cypress/issues/24653)
- Fixed an issue where [aliasing individual requests](https://docs.cypress.io/api/commands/intercept#Aliasing-individual-requests) with `cy.intercept()` led to an error when retrieving all of the aliases with `cy.get(@alias.all)` . Addresses [#25448](https://github.com/cypress-io/cypress/issues/25448)
- The URL of the application under test and command error "Learn more" links now open externally instead of in the Cypress-launched browser. Fixes [#24572](https://github.com/cypress-io/cypress/issues/24572).
- Fixed issue where some URLs would timeout in pre-request correlation. Addressed in [#28354](https://github.com/cypress-io/cypress/pull/28354).

**Misc:**

- Browser tabs and windows other than the Cypress tab are now closed between tests in Chromium-based browsers. Addressed in [#28204](https://github.com/cypress-io/cypress/pull/28204).
- Cypress now ensures the main browser tab is active before running each command in Chromium-based browsers. Addressed in [#28334](https://github.com/cypress-io/cypress/pull/28334).

**Dependency Updates:**

- Upgraded [`chrome-remote-interface`](https://www.npmjs.com/package/chrome-remote-interface) from `0.31.3` to `0.33.0` to increase the max payload from 100MB to 256MB. Addressed in [#27998](https://github.com/cypress-io/cypress/pull/27998).

## 13.5.1

_Released 11/14/2023_
Expand Down
17 changes: 2 additions & 15 deletions cli/lib/exec/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const cp = require('child_process')
const path = require('path')
const Promise = require('bluebird')
const debug = require('debug')('cypress:cli')
const debugElectron = require('debug')('cypress:electron')

const util = require('../util')
const state = require('../tasks/state')
Expand Down Expand Up @@ -122,10 +121,9 @@ module.exports = {
return new Promise((resolve, reject) => {
_.defaults(overrides, {
onStderrData: false,
electronLogging: false,
})

const { onStderrData, electronLogging } = overrides
const { onStderrData } = overrides
const envOverrides = util.getEnvOverrides(options)
const electronArgs = []
const node11WindowsFix = isPlatform('win32')
Expand Down Expand Up @@ -160,10 +158,6 @@ module.exports = {
stdioOptions = _.extend({}, stdioOptions, { windowsHide: false })
}

if (electronLogging) {
stdioOptions.env.ELECTRON_ENABLE_LOGGING = true
}

if (util.isPossibleLinuxWithIncorrectDisplay()) {
// make sure we use the latest DISPLAY variable if any
debug('passing DISPLAY', process.env.DISPLAY)
Expand Down Expand Up @@ -241,7 +235,7 @@ module.exports = {

// if we have a callback and this explicitly returns
// false then bail
if (onStderrData && onStderrData(str) === false) {
if (onStderrData && onStderrData(str)) {
return
}

Expand Down Expand Up @@ -294,13 +288,6 @@ module.exports = {
if (util.isBrokenGtkDisplay(str)) {
brokenGtkDisplay = true
}

// we should attempt to always slurp up
// the stderr logs unless we've explicitly
// enabled the electron debug logging
if (!debugElectron.enabled) {
return false
}
},
})
}
Expand Down
6 changes: 1 addition & 5 deletions cli/lib/tasks/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,8 @@ const runSmokeTest = (binaryDir, options) => {
debug('smoke test command:', smokeTestCommand)
debug('smoke test timeout %d ms', options.smokeTestTimeout)

const env = _.extend({}, process.env, {
ELECTRON_ENABLE_LOGGING: true,
})

const stdioOptions = _.extend({}, {
env,
env: process.env,
timeout: options.smokeTestTimeout,
})

Expand Down
29 changes: 0 additions & 29 deletions cli/test/lib/tasks/verify_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,35 +278,6 @@ context('lib/tasks/verify', () => {
})
})

it('sets ELECTRON_ENABLE_LOGGING without mutating process.env', () => {
createfs({
alreadyVerified: false,
executable: mockfs.file({ mode: 0o777 }),
packageVersion,
})

expect(process.env.ELECTRON_ENABLE_LOGGING).to.be.undefined

util.exec.resolves()
sinon.stub(util, 'stdoutLineMatches').returns(true)

return verify
.start()
.then(() => {
expect(process.env.ELECTRON_ENABLE_LOGGING).to.be.undefined

const stdioOptions = util.exec.firstCall.args[2]

expect(stdioOptions).to.include({
timeout: verify.VERIFY_TEST_RUNNER_TIMEOUT_MS,
})

expect(stdioOptions.env).to.include({
ELECTRON_ENABLE_LOGGING: true,
})
})
})

describe('with force: true', () => {
beforeEach(() => {
createfs({
Expand Down
4 changes: 4 additions & 0 deletions npm/puppeteer/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/dist
**/*.d.ts
**/package-lock.json
**/tsconfig.json
7 changes: 7 additions & 0 deletions npm/puppeteer/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"watch-ignore": [
"node_modules"
],
"require": "ts-node/register",
"exit": true
}
13 changes: 13 additions & 0 deletions npm/puppeteer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# [@cypress/puppeteer-v0.1.1](https://github.com/cypress-io/cypress/compare/@cypress/puppeteer-v0.1.0...@cypress/puppeteer-v0.1.1) (2023-11-29)


### Bug Fixes

* Resolve types and dist issues with @cypress/puppeteer ([#28424](https://github.com/cypress-io/cypress/issues/28424)) ([72225db](https://github.com/cypress-io/cypress/commit/72225db03327744844dcfbcc72b40e85de6a2761))

# [@cypress/puppeteer-v0.1.0](https://github.com/cypress-io/cypress/compare/@cypress/puppeteer-v0.0.1...@cypress/puppeteer-v0.1.0) (2023-11-28)


### Features

* Initial release ([#28370](https://github.com/cypress-io/cypress/issues/28370)) ([b34d145](https://github.com/cypress-io/cypress/commit/b34d14571689a9b36efc707a3a48f27edcb98113))
Loading

0 comments on commit b972a61

Please sign in to comment.