Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/cypress-io/cypress into …
Browse files Browse the repository at this point in the history
…feature/experimental-retries
  • Loading branch information
AtofStryker committed Sep 28, 2023
2 parents c5abc90 + 654e501 commit 376c00f
Show file tree
Hide file tree
Showing 104 changed files with 6,359 additions and 1,259 deletions.
425 changes: 415 additions & 10 deletions .circleci/workflows.yml

Large diffs are not rendered by default.

111 changes: 0 additions & 111 deletions .github/workflows/report_weekly_app_kpis.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/trigger_circleci.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Update Browser Versions
on:
workflow_dispatch:

schedule:
- cron: '0 8 * * *' # every day at 8am UTC (3/4am EST/EDT)
jobs:
Expand Down Expand Up @@ -104,6 +106,7 @@ jobs:
})
# Update available and a PR doesn't already exist
- name: Create Pull Request
id: create-pr
if: ${{ steps.check-need-for-pr.outputs.needs_pr == 'true' }}
uses: actions/github-script@v6
with:
Expand All @@ -117,4 +120,5 @@ jobs:
branchName: '${{ steps.check-branch.outputs.branch_name }}',
description: '${{ steps.get-versions.outputs.description }}',
body: 'This PR was auto-generated to update the version(s) of Chrome for driver tests',
addToProjectBoard: true,
})
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
"processId": "${command:PickProcess}",
"continueOnAttach": true
},
{
"type": "node",
"request": "attach",
"name": "Attach to port 5566",
"port": 5566,
"continueOnAttach": true,
},
{
"type": "node",
"request": "attach",
"name": "Attach to Docker",
"port": 5566,
"continueOnAttach": true,
"remoteRoot": "/opt/cypress",
},
{
"type": "node",
"request": "attach",
Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ You must have the following installed on your system to contribute locally:
- [`Node.js`](https://nodejs.org/en/) (See the root [.node-version](.node-version) file for the required version. You can find a list of tools on [node-version-usage](https://github.com/shadowspawn/node-version-usage) to switch the version of [`Node.js`](https://nodejs.org/en/) based on [.node-version](.node-version).)
- [`yarn`](https://yarnpkg.com/en/docs/install)
- [`python`](https://www.python.org/downloads/) (since we use `node-gyp`. See their [repo](https://github.com/nodejs/node-gyp) for Python version requirements.)
- Note for Debian-based systems: `python` is pre-installed.<br>`sudo apt install g++ make cmake` meets the additional requirements to run `node-gyp` in the context of building Cypress from source.

### Getting Started

Expand Down Expand Up @@ -363,6 +364,8 @@ Additionally, we test the code by running it against various other example proje

If you're curious how we manage all of these tests in CI check out our [CircleCI config](.circleci/config.yml).

Some of our test jobs in CircleCI require access to environment variables that are sensitive and are restricted to Cypress maintainers only. If you are not a Cypress maintainer, when your CI job runs, only a subset of jobs will run at first. A Cypress maintainer will need to approve the `contributor-pr` job in your workflow in order for your CI pipeline to complete.

#### Docker

Sometimes tests pass locally, but fail in CI. Our CI environment is dockerized. In order to run the image used in CI locally:
Expand Down Expand Up @@ -396,6 +399,20 @@ $ yarn add https://cdn.cypress.io/beta/npm/.../cypress.tgz

Note that unzipping the Linux binary inside a Docker container onto a mapped volume drive is *slow*. But once this is done you can modify the application resource folder in the local folder `/tmp/test-folder/node_modules/cypress/cypress-cache/3.3.0/Cypress/resources/app` to debug issues.

#### Docker as a performance constrained environment

Sometimes performance issues are easier to reproduce in performance constrained environments. A docker container can be a good way to simulate this locally and allow for quick iteration.

In a fresh cypress repository run the following command:

```shell
docker compose run --service-port dev
```

This will spin up a docker container based off cypress/browsers:latest and start up the bash terminal. From here you can yarn install and develop as normal, although slower. It's recommend that you run this in a fresh repo because node modules may differ between an install on your local device and from within a linux docker image.

Ports 5566 and 5567 are available to attach debuggers to, please note that docker compose run only maps ports if the `--service-port` command is used.

### Packages

Generally when making contributions, you are typically making them to a small number of packages. Most of your local development work will be inside a single package at a time.
Expand All @@ -414,7 +431,7 @@ The repository has one protected branch:

We want to publish our [standalone npm packages](./npm) continuously as new features are added. Therefore, after any pull request that changes independent `@cypress/` packages in the [`npm`](./npm) directory will automatically publish when a PR is merged directly into `develop` and the entire build passes. We used [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) to automate the release of these packages to npm.

We do not continuously deploy the Cypress binary, so `develop` contains all of the new features and fixes that are staged to go out in the next update of the main Cypress app. If you make changes to an npm package that can't be published until the binary is also updated, you should make a pull request against specifying this is not be merged until the scheduled Cypress app release date.
We do not continuously deploy the Cypress binary, so `develop` contains all of the new features and fixes that are staged to go out in the next update of the main Cypress app. If you make changes to an npm package that can't be published until the binary is also updated, the pull request should clearly state that it should not be merged until the next scheduled Cypress app release date.

### Pull Requests

Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "115.0.5790.13",
"chrome:stable": "114.0.5735.106",
"chrome:beta": "118.0.5993.11",
"chrome:stable": "117.0.5938.88",
"chrome:minimum": "64.0.3282.0"
}
34 changes: 29 additions & 5 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.3.1

_Released 10/03/2023 (PENDING)_

**Bugfixes:**

- Fixed an issue where requests were correlated in the wrong order in the proxy. This could cause an issue where the wrong request is used for `cy.intercept` or assets (e.g. stylesheets or images) may not properly be available in Test Replay. Addressed in [#27892](https://github.com/cypress-io/cypress/pull/27892).

## 13.3.0

_Released 09/27/2023_

**Features:**

- Introduces new layout for Runs page providing additional run information. Addresses [#27203](https://github.com/cypress-io/cypress/issues/27203).

**Bugfixes:**

- Fixed an issue where actionability checks trigger a flood of font requests. Removing the font requests has the potential to improve performance and removes clutter from Test Replay. Addressed in [#27860](https://github.com/cypress-io/cypress/pull/27860).
- Fixed network stubbing not permitting status code 999. Fixes [#27567](https://github.com/cypress-io/cypress/issues/27567). Addressed in [#27853](https://github.com/cypress-io/cypress/pull/27853).

## 13.2.0

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

**Features:**

- Adds support for Nx users who want to run Angular Component Testing in parallel. Addresses [#27723](https://github.com/cypress-io/cypress/pull/27723).
- Adds support for Nx users who want to run Angular Component Testing in parallel. Addressed in [#27723](https://github.com/cypress-io/cypress/pull/27723).

**Bugfixes:**

- Fixed an issue where `enter`, `keyup`, and `space` events where not triggering `click` events properly in some versions of Firefox. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715).
- Edge cases where `cy.intercept()` would not properly intercept and asset response bodies would not properly be captured for Test Replay have been addressed. Addressed in [#27771](https://github.com/cypress-io/cypress/pull/27771).
- Fixed an issue where `enter`, `keyup`, and `space` events were not triggering `click` events properly in some versions of Firefox. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715).
- Fixed a regression in `13.0.0` where tests using Basic Authorization can potentially hang indefinitely on chromium browsers. Addressed in [#27781](https://github.com/cypress-io/cypress/pull/27781).
- Fixed a regression in `13.0.0` where component tests using an intercept that matches all requests can potentially hang indefinitely. Addressed in [#27788](https://github.com/cypress-io/cypress/pull/27788).

**Dependency Updates:**

- Upgraded Electron from `21.0.0` to `25.8.0`, which updates bundled Chromium from `106.0.5249.51` to `114.0.5735.289`. Addresses [#27595](https://github.com/cypress-io/cypress/issues/27595). Additionally, the Node version the binary has been upgraded from from `16.16.0` to `18.15.0`. This does **NOT** have an impact on the node version you are using with Cypress and is merely an internal update to the repository & shipped binary. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715). Addresses [#27595](https://github.com/cypress-io/cypress/issues/27595).
- Upgraded Electron from `21.0.0` to `25.8.0`, which updates bundled Chromium from `106.0.5249.51` to `114.0.5735.289`. Additionally, the Node version binary has been upgraded from `16.16.0` to `18.15.0`. This does **NOT** have an impact on the node version you are using with Cypress and is merely an internal update to the repository & shipped binary. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715). Addresses [#27595](https://github.com/cypress-io/cypress/issues/27595).

## 13.1.0

Expand All @@ -26,7 +50,7 @@ _Released 08/31/2023_
**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).
- 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).
Expand Down
51 changes: 51 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: '3'

services:
dev:
image: cypress/browsers:latest
ports:
# Share debugging ports
- 5566:5566
- 5567:5567
environment:
# Use Hist file from shared volume
HISTFILE: /root/hist/.bash_history
# Setup inspect to use the more permissive address when debugging so
# that we can connect to it from ouside the docker container
CYPRESS_DOCKER_DEV_INSPECT_OVERRIDE: '0.0.0.0:5566'
# This disables CI mode which causes cypress to build differently
CI: ''
command: /bin/bash
working_dir: /opt/cypress
volumes:
# Copy Cypress source to docker container
- .:/opt/cypress
- bash-history:/root/hist
watch:
image: cypress/browsers:latest
environment:
# This disables CI mode which causes cypress to build differently
CI: ''
command: yarn watch
working_dir: /opt/cypress
volumes:
# Copy Cypress source to docker container
- .:/opt/cypress
ci:
# This should mirror the image used in workflows.yml
image: cypress/browsers-internal:node18.15.0-chrome114-ff115
ports:
- 5566:5566
- 5567:5567
command: /bin/bash
environment:
HISTFILE: /root/hist/.bash_history
CYPRESS_DOCKER_DEV_INSPECT_OVERRIDE: '0.0.0.0:5566'
working_dir: /opt/cypress
volumes:
- .:/opt/cypress
- bash-history:/root/hist

# persist terminal history between runs in a virtual volume
volumes:
bash-history:
Loading

0 comments on commit 376c00f

Please sign in to comment.