Skip to content

Commit

Permalink
Merge branch 'feat/protocol' into tgriesser/feat/protocol-delivery
Browse files Browse the repository at this point in the history
* feat/protocol: (45 commits)
  chore: adding support for url:changed (#26519)
  chore: adding viewport:changed to protocol (#26508)
  chore: Reduce dependencies and binary size, add circle ci detector (#26522)
  chore: 12.10.0 release (#26517)
  test: fix flaky tests (#26505)
  chore: Check project dependencies for CT compatibility (#26497)
  chore: update vm2 to 3.9.16 (#26489)
  chore: enable builds on feat/protocol branch (#26506)
  chore: [skip ci] update to labels looked at by stalebot (#26496)
  chore: connecting to electron browser (#26471)
  chore: [skip ci] turning on stale bot (#26488)
  chore: fix issue with logs without wallClockUpdatedAt (#26473)
  Update triage_add_to_project.yml
  chore: Update Chrome (stable) to 112.0.5615.49 and Chrome (beta) to 113.0.5672.24 (#26434)
  feat: display framework definition errors (#26183)
  fix: correctly resolve dependencies for CT onboarding when using Yarn Plug n Play (#26452)
  fix: Subscribe to framework detection changes in wizard (#26437)
  fix: make clicks on type('{enter}') composed (#26395)
  chore: update add-to-project workflow (#26439)
  chore: Pass telemetry resources from the node process to the browser (#26468)
  ...
  • Loading branch information
tgriesser committed Apr 19, 2023
2 parents 5191a6e + c7193d0 commit 8da5784
Show file tree
Hide file tree
Showing 161 changed files with 21,685 additions and 602 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
exit 0
fi
if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then
if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* || "$CIRCLE_BRANCH" == "feat/protocol" ]]; then
echo "Always run CI for develop and for release candidate branches."
exit 0
fi
Expand Down
17 changes: 9 additions & 8 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'emily/before-spec-promise'
- 'feat/protocol'

# 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 @@ -41,7 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'emily/before-spec-promise', << pipeline.git.branch >> ]
- equal: [ 'feat/protocol', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -52,7 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'fix/preflight', << pipeline.git.branch >> ]
- equal: [ 'feat/protocol', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -71,9 +71,8 @@ windowsWorkflowFilters: &windows-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'lmiller/fixing-vite-windows', << pipeline.git.branch >> ]
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'fix/preflight', << pipeline.git.branch >> ]
- equal: [ 'feat/protocol', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -139,7 +138,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "emily/before-spec-promise" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" && "$CIRCLE_BRANCH" != "feat/protocol" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down Expand Up @@ -496,6 +495,7 @@ commands:
if [[ -v MAIN_RECORD_KEY ]]; then
# internal PR
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
yarn cypress:run --record --parallel --group 5x-driver-<<parameters.browser>> --browser <<parameters.browser>>
else
# external PR
Expand Down Expand Up @@ -568,6 +568,7 @@ commands:
PERCY_PARALLEL_NONCE=$CIRCLE_WORKFLOW_WORKSPACE_ID \
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --record --parallel --group <<parameters.package>>-<<parameters.type>>
else
# external PR
Expand Down Expand Up @@ -1308,7 +1309,7 @@ jobs:
<<: *defaultsParameters
steps:
- restore_cached_workspace
- run:
- run:
name: 'Determine if Release Workflow should be triggered'
command: |
if [[ "$CIRCLE_BRANCH" != "develop" ]]; then
Expand Down Expand Up @@ -1456,7 +1457,7 @@ jobs:
# run type checking for each individual package
- run: yarn lerna run types
- verify-mocha-results:
expectedResultCount: 18
expectedResultCount: 19
- store_test_results:
path: /tmp/cypress
# CLI tests generate HTML files with sample CLI command output
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stale_issues_and_pr_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
debug-only:
description: 'debug-only'
required: false
default: true
default: false
days-before-stale:
description: 'days-before-stale'
required: false
Expand All @@ -31,8 +31,8 @@ env:
DEFAULT_DEBUG_ONLY: true
DEFAULT_DAYS_BEFORE_STALE: 180
DEFAULT_DAYS_BEFORE_CLOSE: 14
DEFAULT_EXEMPT_ISSUE_LABELS: 'type: feature,type: enhancement,routed-to-e2e,routed-to-ct,routed-to-tools,routed-to-cloud,Popular Issue'
DEFAULT_EXEMPT_PR_LABELS: 'type: feature,type: enhancement,Popular Issue'
DEFAULT_EXEMPT_ISSUE_LABELS: 'type: feature,type: enhancement,routed-to-e2e,routed-to-ct,routed-to-tools,routed-to-cloud,Popular Issue,prevent-stale'
DEFAULT_EXEMPT_PR_LABELS: 'type: feature,type: enhancement,Popular Issue,prevent-stale'
jobs:
stale:
runs-on: ubuntu-latest
Expand All @@ -50,5 +50,5 @@ jobs:
exempt-issue-labels: ${{ github.event.inputs.exempt-issue-labels || env.DEFAULT_EXEMPT_ISSUE_LABELS }}
exempt-pr-labels: ${{ github.event.inputs.exempt-pr-labels || env.DEFAULT_EXEMPT_PR_LABELS }}
exempt-all-milestones: true
operations-per-run: 1000 #using during debug mode to capture all the tickets impacted
operations-per-run: 200 #keeping this a bit higher because it processes newest tickets to oldest
debug-only: ${{ github.event.inputs.debug-only || env.DEFAULT_DEBUG_ONLY }}
2 changes: 1 addition & 1 deletion .github/workflows/triage_add_to_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
echo 'IS_COLLABORATOR='$(jq -r '.data.repository.collaborators.totalCount' collaborators.json) >> $GITHUB_ENV
- uses: actions/[email protected]
# only add issues/prs from outside contributors to the project
if: ${{ env.IS_COLLABORATOR == 0 }}
if: ${{ env.IS_COLLABORATOR == 0 || github.event.repository.name == 'cypress-support-internal' || github.event.pull_request.user.login == 'github-actions[bot]' || github.event.issue.user.login == 'github-actions[bot]' }}
with:
project-url: https://github.com/orgs/${{github.repository_owner}}/projects/${{env.PROJECT_NUMBER}}
github-token: ${{ secrets.ADD_TO_TRIAGE_BOARD_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
CYPRESS_BOT_APP_ID: ${{ secrets.RAM_APP }}
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Thanks for taking the time to contribute! :smile:

## Code of Conduct

All contributors are expecting to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md).
All contributors are expected to abide by our [Code of Conduct](./CODE_OF_CONDUCT.md).

## Opening Issues

Expand Down Expand Up @@ -112,7 +112,7 @@ video | Problems with video recordings | [open](https://github.com/cypress-io/cy


## Writing Documentation

Cypress documentation lives in a separate repository with its own dependencies and build tools.
See [Documentation Contributing Guidelines](https://github.com/cypress-io/cypress-documentation/blob/master/CONTRIBUTING.md).

Expand Down Expand Up @@ -155,7 +155,7 @@ Here is a list of the core packages in this repository with a short description,
| [proxy](./packages/proxy) | `@packages/proxy` | Code for Cypress' network proxy layer. |
| [reporter](./packages/reporter) | `@packages/reporter` | The reporter shows the running results of the tests (The Command Log UI). |
| [resolve-dist](./packages/resolve-dist) | `@packages/resolve-dist` | Centralizes the resolution of paths to compiled/static assets from server-side code.. |
| [rewriter](./packages/rewriter) | `@packages/rewriter` | The logic to rewrite JS and HTML that flows through the Cypress proxy.
| [rewriter](./packages/rewriter) | `@packages/rewriter` | The logic to rewrite JS and HTML that flows through the Cypress proxy.
| [root](./packages/root) | `@packages/root` | Dummy package pointing at the root of the repository. |
| [runner](./packages/runner) | `@packages/runner` | (deprecated) The runner is the minimal "chrome" around the user's application under test. |
| [scaffold-config](./packages/scaffold-config) | `@packages/scaffold-config` | The logic related to scaffolding new projects using launchpad. |
Expand Down Expand Up @@ -318,13 +318,13 @@ Each package is responsible for building itself and testing itself and can do so
When executing top or package level scripts, [Vite](https://vitejs.dev/) may be used to build/host parts of the application. This section is to serve as a general reference for these environment variables that may be leverage throughout the repository.
###### `CYPRESS_INTERNAL_VITE_DEV`
Set to `1` if wanting to leverage [vite's](https://vitejs.dev/guide/#command-line-interface) `vite dev` over `vite build` to avoid a full [production build](https://vitejs.dev/guide/build.html).
###### `CYPRESS_INTERNAL_VITE_INSPECT`
###### `CYPRESS_INTERNAL_VITE_INSPECT`
Used internally to leverage [vite-plugin-inspect](https://github.com/antfu/vite-plugin-inspect) to view intermediary vite plugin state. The `CYPRESS_INTERNAL_VITE_DEV` is required for this to be applied correctly. Set to `1` to enable.
###### `CYPRESS_INTERNAL_VITE_OPEN_MODE_TESTING`
###### `CYPRESS_INTERNAL_VITE_OPEN_MODE_TESTING`
Leveraged only for internal cy-in-cy type tests to access the Cypress instance from the parent frame. Please see the [E2E Open Mode Testing](./guides/e2e-open-testing.md) Guide. Set to `true` when doing
###### `CYPRESS_INTERNAL_VITE_APP_PORT`
###### `CYPRESS_INTERNAL_VITE_APP_PORT`
Leveraged only when `CYPRESS_INTERNAL_VITE_DEV` is set to spawn the vite dev server for the app on the specified port. The default port is `3333`.
###### `CYPRESS_INTERNAL_VITE_LAUNCHPAD_PORT`
###### `CYPRESS_INTERNAL_VITE_LAUNCHPAD_PORT`
Leveraged only when `CYPRESS_INTERNAL_VITE_DEV` is set to spawn the vite dev server for the launchpad on the specified port. The default port is `3001`.
#### Debug Logs

Expand Down Expand Up @@ -443,7 +443,7 @@ We do not continuously deploy the Cypress binary, so `develop` contains all of t
- After the PR is approved, the original contributor can merge the PR (if the original contributor has access).
- When you merge a PR into `develop`, select [**Squash and merge**](https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits). This will squash all commits into a single commit.

*The only exceptions to squashing are:*
*The only exceptions to squashing are:*

1. When converting files to another language and there is a clear commit history needed to maintain from the file conversion.
2. When merging a `release/*` branch to `develop`. Individual PRs were already squashed when they were merged to the release branch, and we want that history intact on develop.
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": "112.0.5615.49",
"chrome:stable": "111.0.5563.146",
"chrome:beta": "113.0.5672.24",
"chrome:stable": "112.0.5615.49",
"chrome:minimum": "64.0.3282.0"
}
29 changes: 22 additions & 7 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,35 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 12.9.1
## 12.10.1

_Released 04/11/2023 (PENDING)_
_Released 04/25/2023 (PENDING)_

## 12.10.0

_Released 04/17/2023_

**Features:**

- The Component Testing setup wizard will now show a warning message if an issue is encountered with an installed [third party framework definition](https://on.cypress.io/component-integrations). Addresses [#25838](https://github.com/cypress-io/cypress/issues/25838).

**Bugfixes:**

- Capture the [Azure](https://azure.microsoft.com/) CI provider's environment variable [`SYSTEM_PULLREQUEST_PULLREQUESTNUMBER`](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#system-variables-devops-services) to display the linked PR number in the Cloud. Addressed in [#26215](https://github.com/cypress-io/cypress/pull/26215).
- Fixed an issue in the onboarding wizard where project framework & bundler would not be auto-detected when opening directly into component testing mode using the `--component` CLI flag. Fixes [#22777](https://github.com/cypress-io/cypress/issues/22777).
- Fixed an issue in the onboarding wizard where project framework & bundler would not be auto-detected when opening directly into component testing mode using the `--component` CLI flag. Fixes [#22777](https://github.com/cypress-io/cypress/issues/22777) and [#26388](https://github.com/cypress-io/cypress/issues/26388).
- Updated to use the `SEMAPHORE_GIT_WORKING_BRANCH` [Semphore](https://docs.semaphoreci.com) CI environment variable to correctly associate a Cloud run to the current branch. Previously this was incorrectly associating a run to the target branch. Fixes [#26309](https://github.com/cypress-io/cypress/issues/26309).
- Fix an edge case in Component Testing where a custom `baseUrl` in `tsconfig.json` for Next.js 13.2.0+ is not respected. This was partially fixed in [#26005](https://github.com/cypress-io/cypress/pull/26005), but an edge case was missed. Fixes [#25951](https://github.com/cypress-io/cypress/issues/25951).
- Correctly detect and resolve dependencies when configuring Component Testing in projects using Yarn's [Plug'n'Play feature](https://yarnpkg.com/features/pnp). Fixes [#25960](https://github.com/cypress-io/cypress/issues/25960).
- Fixed an issue where `click` events fired on `.type('{enter}')` did not propagate through shadow roots. Fixes [#26392](https://github.com/cypress-io/cypress/issues/26392).

**Misc:**

- Removed unintentional debug logs. Addressed in [#26411](https://github.com/cypress-io/cypress/pull/26411).
- Improved styling on the [Runs Page](https://docs.cypress.io/guides/core-concepts/cypress-app#Runs). Addresses [#26180](https://github.com/cypress-io/cypress/issues/26180).

**Dependency Updates:**

- Upgraded [`commander`](https://www.npmjs.com/package/commander) from `^5.1.0` to `^6.2.1`. Addressed in [#26226](https://github.com/cypress-io/cypress/pull/26226).
- Upgraded [`minimist`](https://www.npmjs.com/package/minimist) from `1.2.6` to `1.2.8` to address this [CVE-2021-44906](https://github.com/advisories/GHSA-xvch-5gv4-984h) NVD security vulnerability. Addressed in [#26254](https://github.com/cypress-io/cypress/pull/26254).
- Added [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) to support storing test run information which will be sent when recording to the Cloud

**Misc:**
- Removed unintentional debug logs. Address in [#26411](https://github.com/cypress-io/cypress/pull/26411)
Expand All @@ -35,10 +54,6 @@ _Released 03/28/2023_
**Misc:**

- Made some minor styling updates to the Debug page. Addresses [#26041](https://github.com/cypress-io/cypress/issues/26041).

**Dependency Updates:**

- Added [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) to support storing test run information which will be sent when recording to the Cloud

## 12.8.1

Expand Down
24 changes: 5 additions & 19 deletions cli/__snapshots__/cli_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ exports['cli help command shows help 1'] = `
Commands:
help Shows CLI help and exits
version prints Cypress version
version [options] prints Cypress version
open [options] Opens Cypress in the interactive GUI.
run [options] Runs Cypress tests from the CLI without the GUI
open-ct [options] Opens Cypress component testing interactive mode.
Expand Down Expand Up @@ -258,7 +258,7 @@ exports['cli help command shows help for -h 1'] = `
Commands:
help Shows CLI help and exits
version prints Cypress version
version [options] prints Cypress version
open [options] Opens Cypress in the interactive GUI.
run [options] Runs Cypress tests from the CLI without the GUI
open-ct [options] Opens Cypress component testing interactive mode.
Expand Down Expand Up @@ -298,7 +298,7 @@ exports['cli help command shows help for --help 1'] = `
Commands:
help Shows CLI help and exits
version prints Cypress version
version [options] prints Cypress version
open [options] Opens Cypress in the interactive GUI.
run [options] Runs Cypress tests from the CLI without the GUI
open-ct [options] Opens Cypress component testing interactive mode.
Expand Down Expand Up @@ -339,7 +339,7 @@ exports['cli unknown command shows usage and exits 1'] = `
Commands:
help Shows CLI help and exits
version prints Cypress version
version [options] prints Cypress version
open [options] Opens Cypress in the interactive GUI.
run [options] Runs Cypress tests from the CLI without the GUI
open-ct [options] Opens Cypress component testing interactive mode.
Expand Down Expand Up @@ -408,20 +408,6 @@ Electron version: not found
Bundled Node version: not found
`

exports['cli --version no binary version 1'] = `
Cypress package version: 1.2.3
Cypress binary version: not installed
Electron version: not found
Bundled Node version: not found
`

exports['cli -v no binary version 1'] = `
Cypress package version: 1.2.3
Cypress binary version: not installed
Electron version: not found
Bundled Node version: not found
`

exports['cli cypress run warns with space-separated --spec 1'] = `
⚠ Warning: It looks like you're passing --spec a space-separated list of arguments:
Expand Down Expand Up @@ -466,7 +452,7 @@ exports['cli CYPRESS_INTERNAL_ENV allows and warns when staging environment 1']
Commands:
help Shows CLI help and exits
version prints Cypress version
version [options] prints Cypress version
open [options] Opens Cypress in the interactive GUI.
run [options] Runs Cypress tests from the CLI without the GUI
open-ct [options] Opens Cypress component testing interactive mode.
Expand Down
Loading

0 comments on commit 8da5784

Please sign in to comment.