diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 9b6f1250fb50..7cb1b8d30414 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -09-3-23 +10-25-23.1 diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index d1ae408689c4..f7da4a895674 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -32,7 +32,7 @@ mainBuildFilters: &mainBuildFilters - 'update-v8-snapshot-cache-on-develop' - 'feature/test-burn-in' - 'publish-binary' - - 'chore/update_electron25_and_node18' + - 'ryanm/fix/better-sqlite3' # 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 @@ -44,6 +44,13 @@ macWorkflowFilters: &darwin-workflow-filters # 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: [ 'feature/test-burn-in', << pipeline.git.branch >> ] + - equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ] + - equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ] + - equal: [ 'ryanm/fix/better-sqlite3', << pipeline.git.branch >> ] + - matches: + pattern: /^release\/\d+\.\d+\.\d+$/ + value: << pipeline.git.branch >> + linuxArm64WorkflowFilters: &linux-arm64-workflow-filters when: or: @@ -53,6 +60,10 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ 'feature/test-burn-in', << pipeline.git.branch >> ] - equal: [ 'publish-binary', << pipeline.git.branch >> ] - equal: [ 'chore/update_electron25_and_node18', << pipeline.git.branch >> ] + - equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ] + - equal: [ 'chore/bump_loaders_and_optimize_webpack', << pipeline.git.branch >> ] + - equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ] + - equal: [ 'ryanm/fix/better-sqlite3', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -62,6 +73,9 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters linuxWorkflowExcludeFilters: &linux-x64-workflow-exclude-filters unless: or: + - matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> - false # windows is slow and expensive in CI, so it normally only runs on main branches @@ -73,6 +87,9 @@ windowsWorkflowFilters: &windows-workflow-filters # 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: [ 'feature/test-burn-in', << pipeline.git.branch >> ] + - equal: [ 'chore/update_webpack_deps_to_latest_webpack4_compat', << pipeline.git.branch >> ] + - equal: [ 'lerna-optimize-tasks', << pipeline.git.branch >> ] + - equal: [ 'ryanm/fix/better-sqlite3', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -156,6 +173,16 @@ commands: circleci-agent step halt fi + maybe_skip_binary_jobs: + steps: + - run: + name: Skip binary job if external PR + command: | + if [[ -z "$CIRCLE_TOKEN" ]]; then + echo "There is no CIRCLE_TOKEN set for this job. Cannot trigger binary build. Skipping job." + circleci-agent step halt + fi + restore_workspace_binaries: steps: - attach_workspace: @@ -209,10 +236,9 @@ commands: description: Save entire folder as artifact for other jobs to run without reinstalling steps: - run: - name: Build all codegen + name: Sync Cloud Validations command: | source ./scripts/ensure-node.sh - yarn gulp buildProd yarn gulp syncCloudValidations - run: name: Build packages @@ -328,6 +354,9 @@ commands: only-cache-for-root-user: type: boolean default: false + build-better-sqlite3: + type: boolean + default: false steps: - install_cache_helpers_dependencies - run: @@ -336,9 +365,18 @@ commands: - run: name: Generate platform key command: node ./scripts/get-platform-key.js > platform_key - - restore_cache: - name: Restore cache state, to check for known modules cache existence - key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} + - when: + condition: <> + steps: + - restore_cache: + name: Restore cache state, to check for known modules cache existence + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-{{ checksum "centos7-builder.Dockerfile" }} + - unless: + condition: <> + steps: + - restore_cache: + name: Restore cache state, to check for known modules cache existence + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} - run: name: Bail if cache exists command: | @@ -360,6 +398,10 @@ commands: PERCY_POSTINSTALL_BROWSER=true \ yarn --prefer-offline --frozen-lockfile --cache-folder ~/.yarn no_output_timeout: 20m + - when: + condition: <> + steps: + - build-better-sqlite3 - prepare-modules-cache: dont-move: <> # we don't move, so we don't hit any issues unpacking symlinks - when: @@ -382,11 +424,22 @@ commands: paths: - /tmp/node_modules_cache - run: touch node_modules_installed - - save_cache: - name: Saving node-modules cache state key - key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} - paths: - - node_modules_installed + - when: + condition: <> + steps: + - save_cache: + name: Saving node-modules cache state key + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }}-{{ checksum "centos7-builder.Dockerfile" }} + paths: + - node_modules_installed + - unless: + condition: <> + steps: + - save_cache: + name: Saving node-modules cache state key + key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-state-of-node-modules-cache-{{ checksum "circle_cache_key" }} + paths: + - node_modules_installed - save_cache: name: Save weekly yarn cache key: v{{ checksum ".circleci/cache-version.txt" }}-{{ checksum "platform_key" }}-deps-root-weekly-{{ checksum "cache_date" }} @@ -471,6 +524,63 @@ commands: which google-chrome-<> || (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-<>`" echo "Google Chrome Version: `google-chrome-<> --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. + build-better-sqlite3: + description: Build better-sqlite3 for CentOS 7 + steps: + - setup_remote_docker + - restore_cache: + keys: + - cypress-centos7-builder-{{ checksum "centos7-builder.Dockerfile" }} + - restore_cache: + keys: + - better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ checksum "node_modules/electron/package.json" }}-{{ checksum "centos7-builder.Dockerfile" }} + - run: + name: Build or load centos7-builder image + command: | + if [[ ! -f better_sqlite3.node ]]; then + set -x + apt update && apt install -y docker.io + if [[ ! -f centos7-builder.tar || -n $REBUILD_CENTOS_BUILDER_IMAGE ]]; then + echo "*" > .dockerignore + docker build -t centos7-builder -f centos7-builder.Dockerfile . + docker save centos7-builder > centos7-builder.tar + rm .dockerignore + else + docker load < centos7-builder.tar + fi + fi + - save_cache: + key: cypress-centos7-builder-{{ checksum "centos7-builder.Dockerfile" }} + paths: + - centos7-builder.tar + - run: + name: Build better-sqlite3 for CentOS 7 + command: | + if [[ ! -f better_sqlite3.node ]]; then + docker run -d --name centos7-builder centos7-builder /bin/bash -c "sleep 1000000000" + docker cp ~/cypress/node_modules/better-sqlite3 centos7-builder:/better-sqlite3 + docker exec -it centos7-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 25.0.0 --include-regex 'better_sqlite3.node$'" + docker cp centos7-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + docker rm -f centos7-builder + cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node + else + cp ~/cypress/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node + fi + - save_cache: + key: better-sqlite3-{{ checksum "node_modules/better-sqlite3/package.json" }}-{{ checksum "node_modules/electron/package.json" }}-{{ checksum "centos7-builder.Dockerfile" }} + paths: + - better_sqlite3.node + - run: + name: Clean up top level better-sqlite3 file + command: | + rm ~/cypress/better_sqlite3.node run-driver-integration-tests: parameters: @@ -1044,25 +1154,6 @@ commands: name: "Waiting on Circle CI jobs: <>" command: node ./scripts/wait-on-circle-jobs.js --job-names="<>" - build-binary: - steps: - - run: - name: Build the Cypress binary - no_output_timeout: "45m" - command: | - source ./scripts/ensure-node.sh - node --version - if [[ `node ./scripts/get-platform-key.js` == 'linux-arm64' ]]; then - # these are missing on Circle and there is no way to pre-install them on Arm - sudo apt-get update - sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb - DISABLE_SNAPSHOT_REQUIRE=1 yarn binary-build --version $(node ./scripts/get-next-version.js) --createTar - else - yarn binary-build --version $(node ./scripts/get-next-version.js) --createTar - fi - - store_artifacts: - path: cypress-dist.tgz - check-if-binary-exists: steps: - run: @@ -1180,11 +1271,7 @@ commands: name: Build NPM package command: | source ./scripts/ensure-node.sh - yarn build --scope cypress - - run: - name: Copy Re-exported NPM Packages - command: node ./scripts/post-build.js - working_directory: cli + yarn lerna run build-cli - run: command: ls -la types working_directory: cli/build @@ -1259,6 +1346,9 @@ jobs: resource_class: type: string default: medium + build-better-sqlite3: + type: boolean + default: false resource_class: << parameters.resource_class >> steps: - checkout @@ -1273,6 +1363,7 @@ jobs: - ProgramData/nvm # windows - caching-dependency-installer: only-cache-for-root-user: <> + build-better-sqlite3: <> - store-npm-logs ## restores node_modules from previous step & builds if first step skipped @@ -1517,8 +1608,6 @@ jobs: equal: [ *windows-executor, << parameters.executor >> ] steps: - run: yarn test-scripts - # make sure packages with TypeScript can be transpiled to JS - - run: yarn lerna run build-prod --stream --concurrency 4 # run unit tests from each individual package - run: yarn test # run type checking for each individual package @@ -1644,6 +1733,7 @@ jobs: docker_layer_caching: true resource_class: medium steps: + - maybe_skip_binary_jobs - run-binary-system-tests system-tests-chrome: @@ -1901,7 +1991,7 @@ jobs: - restore_cached_workspace - run: name: Build - command: yarn workspace @cypress/webpack-preprocessor build + command: yarn lerna run build --scope @cypress/webpack-preprocessor - run: name: Run tests command: yarn workspace @cypress/webpack-preprocessor test @@ -1959,7 +2049,7 @@ jobs: - restore_cached_workspace - run: name: Build - command: yarn workspace @cypress/angular build + command: yarn lerna run build --scope @cypress/angular - store-npm-logs npm-react: @@ -1968,7 +2058,7 @@ jobs: - restore_cached_workspace - run: name: Build - command: yarn workspace @cypress/react build + command: yarn lerna run build --scope @cypress/react - run: name: Run tests command: yarn test @@ -1985,7 +2075,7 @@ jobs: - restore_cached_workspace - run: name: Build - command: yarn workspace @cypress/vite-plugin-cypress-esm build + command: yarn lerna run build --scope @cypress/vite-plugin-cypress-esm - run: name: Run tests command: yarn test @@ -2002,7 +2092,7 @@ jobs: - restore_cached_workspace - run: name: Build - command: yarn workspace @cypress/mount-utils build + command: yarn lerna run build --scope @cypress/mount-utils - store-npm-logs npm-grep: @@ -2024,7 +2114,7 @@ jobs: resource_class: small steps: - restore_cached_workspace - - run: yarn workspace create-cypress-tests build + - run: yarn lerna run build --scope create-cypress-tests npm-eslint-plugin-dev: <<: *defaults @@ -2041,8 +2131,7 @@ jobs: - run: name: Build + Install command: | - yarn workspace @cypress/schematic build - working_directory: npm/cypress-schematic + yarn lerna run build --scope @cypress/schematic - run: name: Run unit tests command: | @@ -2087,10 +2176,10 @@ jobs: default: xlarge resource_class: << parameters.resource_class >> steps: + - maybe_skip_binary_jobs - restore_cached_workspace - check-if-binary-exists - setup_should_persist_artifacts - - build-binary - trigger-publish-binary-pipeline get-published-artifacts: @@ -2102,6 +2191,7 @@ jobs: default: large resource_class: << parameters.resource_class >> steps: + - maybe_skip_binary_jobs - restore_cached_workspace - run: name: Check pipeline info @@ -2243,6 +2333,7 @@ jobs: docker: - image: cypress/base-internal:18.15.0 steps: + - maybe_skip_binary_jobs - restore_workspace_binaries - run: mkdir test-binary - run: @@ -2279,6 +2370,7 @@ jobs: <<: *defaults resource_class: small steps: + - maybe_skip_binary_jobs - restore_workspace_binaries - run: mkdir <> - run: @@ -2318,6 +2410,7 @@ jobs: <<: *defaults resource_class: small steps: + - maybe_skip_binary_jobs - restore_workspace_binaries - run: mkdir <> - run: @@ -2380,10 +2473,12 @@ jobs: test-binary-against-recipes: <<: *defaults + parallelism: 4 steps: - test-binary-against-repo: repo: cypress-example-recipes - command: npm run test:ci + # Split the specs up across 4 different machines to run in parallel + command: npm run test:ci -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL browser: electron # This is a special job. It allows you to test the current @@ -2410,6 +2505,7 @@ jobs: test-binary-against-kitchensink: <<: *defaults steps: + - maybe_skip_binary_jobs - test-binary-against-repo: repo: cypress-example-kitchensink browser: electron @@ -2472,6 +2568,7 @@ jobs: test-binary-as-specific-user: <<: *defaults steps: + - maybe_skip_binary_jobs - restore_workspace_binaries # the user should be "node" - run: whoami @@ -2518,7 +2615,8 @@ jobs: linux-x64-workflow: &linux-x64-workflow jobs: - - node_modules_install + - node_modules_install: + build-better-sqlite3: true - build: context: test-runner:env-canary requires: @@ -2825,15 +2923,19 @@ linux-x64-workflow: &linux-x64-workflow requires: - build - test-npm-module-on-minimum-node-version: + context: publish-binary requires: - get-published-artifacts - test-types-cypress-and-jest: + context: publish-binary requires: - get-published-artifacts - test-full-typescript-project: + context: publish-binary requires: - get-published-artifacts - test-binary-against-kitchensink: + context: publish-binary requires: - get-published-artifacts - test-npm-module-and-verify-binary: @@ -2877,13 +2979,393 @@ linux-x64-workflow: &linux-x64-workflow - test-binary-as-specific-user: name: "test binary as a non-root user" executor: non-root-docker-user + context: publish-binary requires: - get-published-artifacts - test-binary-as-specific-user: name: "test binary as a root user" + context: publish-binary requires: - get-published-artifacts - binary-system-tests: + context: publish-binary + requires: + - get-published-artifacts + - system-tests-node-modules-install + +linux-x64-contributor-workflow: &linux-x64-contributor-workflow + jobs: + - node_modules_install + - build: + requires: + - node_modules_install + + # In subsequent jobs, we use some contexts that are restricted to members of the Cypress organization. + # This job will allow for a Cypress member to approve and run the rest of the restricted jobs in the pipeline after the contributor code has been reviewed. + - contributor-pr: + type: approval + requires: + - build + + - check-ts: + requires: + - build + - lint: + name: linux-lint + requires: + - build + - percy-finalize: + context: [test-runner:poll-circle-workflow, test-runner:percy] + required_env_var: PERCY_TOKEN # skips job if not defined (external PR) + requires: + - contributor-pr + - lint-types: + requires: + - build + # unit, integration and e2e tests + - cli-visual-tests: + context: test-runner:percy + requires: + - contributor-pr + - unit-tests: + requires: + - build + - verify-release-readiness: + context: test-runner:npm-release + requires: + - contributor-pr + - server-unit-tests: + requires: + - build + - server-integration-tests: + requires: + - build + - server-performance-tests: + requires: + - build + - system-tests-node-modules-install: + context: test-runner:performance-tracking + requires: + - contributor-pr + - system-tests-chrome: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-electron: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-firefox: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-webkit: + context: test-runner:performance-tracking + requires: + - system-tests-node-modules-install + - system-tests-non-root: + context: test-runner:performance-tracking + executor: non-root-docker-user + requires: + - system-tests-node-modules-install + - driver-integration-tests-chrome: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-chrome-beta: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-firefox: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-electron: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-tests-webkit: + context: test-runner:cypress-record-key + requires: + - contributor-pr + - driver-integration-memory-tests: + requires: + - build + - run-frontend-shared-component-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:launchpad-tests, test-runner:percy] + percy: true + requires: + - contributor-pr + - run-launchpad-integration-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:launchpad-tests, test-runner:percy] + percy: true + requires: + - contributor-pr + - run-launchpad-component-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:launchpad-tests, test-runner:percy] + percy: true + requires: + - contributor-pr + - run-app-integration-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:launchpad-tests, test-runner:percy] + percy: true + requires: + - contributor-pr + - run-webpack-dev-server-integration-tests: + context: [test-runner:cypress-record-key, test-runner:percy] + requires: + - system-tests-node-modules-install + - run-vite-dev-server-integration-tests: + context: [test-runner:cypress-record-key, test-runner:percy] + requires: + - system-tests-node-modules-install + - run-app-component-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:launchpad-tests, test-runner:percy] + percy: true + requires: + - contributor-pr + - run-reporter-component-tests-chrome: + context: [test-runner:cypress-record-key, test-runner:percy] + percy: true + requires: + - contributor-pr + - reporter-integration-tests: + context: [test-runner:cypress-record-key, test-runner:percy] + requires: + - contributor-pr + - npm-webpack-dev-server: + requires: + - system-tests-node-modules-install + - npm-vite-dev-server: + requires: + - build + - npm-vite-plugin-cypress-esm: + requires: + - build + - npm-webpack-preprocessor: + requires: + - build + - npm-webpack-batteries-included-preprocessor: + requires: + - build + - npm-vue: + requires: + - build + - npm-react: + requires: + - build + - npm-angular: + requires: + - build + - npm-mount-utils: + requires: + - build + - npm-create-cypress-tests: + requires: + - build + - npm-eslint-plugin-dev: + requires: + - build + - npm-cypress-schematic: + requires: + - build + - v8-integration-tests: + requires: + - system-tests-node-modules-install + # This release definition must be updated with any new jobs + # Any attempts to automate this are welcome + # If CircleCI provided an "after all" hook, then this wouldn't be necessary + - trigger-binary-release-workflow: + context: test-runner:poll-circle-workflow + requires: + - build + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-create-cypress-tests + - npm-react + - npm-mount-utils + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-electron + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - server-performance-tests + - server-integration-tests + - server-unit-tests + - "test binary as a non-root user" + - "test binary as a root user" + - test-types-cypress-and-jest + - test-full-typescript-project + - test-binary-against-kitchensink + - test-npm-module-on-minimum-node-version + - binary-system-tests + - test-kitchensink + - unit-tests + - verify-release-readiness + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - v8-integration-tests + + - npm-release: + context: test-runner:npm-release + requires: + - build + - check-ts + - npm-angular + - npm-eslint-plugin-dev + - npm-create-cypress-tests + - npm-react + - npm-mount-utils + - npm-vue + - npm-webpack-batteries-included-preprocessor + - npm-webpack-preprocessor + - npm-vite-dev-server + - npm-vite-plugin-cypress-esm + - npm-webpack-dev-server + - npm-cypress-schematic + - lint-types + - linux-lint + - percy-finalize + - driver-integration-tests-firefox + - driver-integration-tests-chrome + - driver-integration-tests-chrome-beta + - driver-integration-tests-electron + - driver-integration-memory-tests + - system-tests-non-root + - system-tests-firefox + - system-tests-electron + - system-tests-chrome + - server-performance-tests + - server-integration-tests + - server-unit-tests + - test-kitchensink + - unit-tests + - verify-release-readiness + - cli-visual-tests + - reporter-integration-tests + - run-app-component-tests-chrome + - run-app-integration-tests-chrome + - run-frontend-shared-component-tests-chrome + - run-launchpad-component-tests-chrome + - run-launchpad-integration-tests-chrome + - run-reporter-component-tests-chrome + - run-webpack-dev-server-integration-tests + - run-vite-dev-server-integration-tests + - v8-integration-tests + + - create-and-trigger-packaging-artifacts: + context: [test-runner:upload, test-runner:build-binary, publish-binary] + requires: + - contributor-pr + - get-published-artifacts: + context: [publish-binary, test-runner:commit-status-checks] + requires: + - create-and-trigger-packaging-artifacts + # various testing scenarios, like building full binary + # and testing it on a real project + - test-against-staging: + context: test-runner:record-tests + <<: *mainBuildFilters + requires: + - build + - test-kitchensink: + requires: + - build + - test-kitchensink-against-staging: + context: test-runner:record-tests + <<: *mainBuildFilters + requires: + - build + - test-npm-module-on-minimum-node-version: + context: publish-binary + requires: + - get-published-artifacts + - test-types-cypress-and-jest: + context: publish-binary + requires: + - get-published-artifacts + - test-full-typescript-project: + context: publish-binary + requires: + - get-published-artifacts + - test-binary-against-kitchensink: + context: publish-binary + requires: + - get-published-artifacts + - test-npm-module-and-verify-binary: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-staging: + context: test-runner:record-tests + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-chrome: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-firefox: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes-chrome: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-recipes: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-kitchensink-firefox: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-todomvc-firefox: + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-against-cypress-realworld-app: + context: test-runner:cypress-record-key + <<: *mainBuildFilters + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a non-root user" + executor: non-root-docker-user + context: publish-binary + requires: + - get-published-artifacts + - test-binary-as-specific-user: + name: "test binary as a root user" + context: publish-binary + requires: + - get-published-artifacts + - binary-system-tests: + context: publish-binary requires: - get-published-artifacts - system-tests-node-modules-install @@ -2905,11 +3387,7 @@ linux-arm64-workflow: &linux-arm64-workflow - create-and-trigger-packaging-artifacts: name: linux-arm64-create-and-trigger-packaging-artifacts - context: - - test-runner:upload - - test-runner:commit-status-checks - - test-runner:build-binary - - publish-binary + context: [test-runner:upload, test-runner:commit-status-checks, test-runner:build-binary, publish-binary] executor: linux-arm64 resource_class: arm.medium requires: @@ -2923,9 +3401,7 @@ linux-arm64-workflow: &linux-arm64-workflow - get-published-artifacts: name: linux-arm64-get-published-artifacts - context: - - publish-binary - - test-runner:commit-status-checks + context: [publish-binary, test-runner:commit-status-checks] executor: linux-arm64 resource_class: arm.medium requires: @@ -3130,6 +3606,12 @@ workflows: linux-x64: <<: *linux-x64-workflow <<: *linux-x64-workflow-exclude-filters + linux-x64-contributor: + <<: *linux-x64-contributor-workflow + when: + matches: + pattern: /^pull\/[0-9]+/ + value: << pipeline.git.branch >> linux-arm64: <<: *linux-arm64-workflow <<: *linux-arm64-workflow-filters @@ -3141,4 +3623,4 @@ workflows: <<: *darwin-workflow-filters windows: <<: *windows-workflow - <<: *windows-workflow-filters + <<: *windows-workflow-filters \ No newline at end of file diff --git a/.github/workflows/report_weekly_app_kpis.yml b/.github/workflows/report_weekly_app_kpis.yml deleted file mode 100644 index d9a1a82be7d6..000000000000 --- a/.github/workflows/report_weekly_app_kpis.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: 'KPI Report Generation' -on: - # makes this workflow reusable - workflow_call: - secrets: - TRIAGE_BOARD_TOKEN: - required: true - - workflow_dispatch: - inputs: - start-date: - description: 'Beginning date of query (ex. 2023-06-01)' - required: false - end-date: - description: 'Ending date of query (ex. 2023-06-01)' - required: false - default-other-repos: - description: "Comma separated list of repos you want to query" - required: false - default: '["cypress-documentation", "circleci-orb", "github-action", "cypress-docker-images", "cypress-chrome-recorder-extension", "cypress-chrome-recorder", "cypress-recorder-extension", "cypress-example-kitchensink", "cypress-origin-providers", "release-automations", "cypress-test-tiny", "eslint-plugin-cypress", "netlify-plugin-cypress", "cypress-support-internal", "cypress-realworld-app", "code-coverage"]' - default-mono-repo: - description: "The Cypress mono repo" - required: false - default: '["cypress"]' - - schedule: - - cron: '0 18 * * 5' # this will run weekly on Friday at 2PM EST (the github workflow runners are on UTC) - -jobs: - run-kpi-reporting: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - repository: 'cypress-io/release-automations' - ref: 'master' - ssh-key: ${{ secrets.WORKFLOW_DEPLOY_KEY }} - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 'lts/*' - - name: Generate Non-mono Repo Open / Closed KPIs - id: non-mono-repo-open-closed-metrics - uses: actions/github-script@v6 - env: - DEFAULT_REPOS: ${{ github.event.inputs.default-other-repos || '["cypress-documentation", "circleci-orb", "github-action", "cypress-docker-images", "cypress-chrome-recorder-extension", "cypress-chrome-recorder", "cypress-recorder-extension", "cypress-example-kitchensink", "cypress-origin-providers", "release-automations", "cypress-test-tiny", "eslint-plugin-cypress", "netlify-plugin-cypress", "cypress-support-internal", "cypress-realworld-app", "code-coverage"]' }} - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/open-vs-closed-issues.js') - await script.getOpenAndClosedIssueMetrics(github, context, core, ${{ env.DEFAULT_REPOS }}); - - name: Generate Cypress Mono Repo Open / Closed KPIs - id: mono-repo-open-closed-metrics - uses: actions/github-script@v6 - env: - DEFAULT_MONO_REPO: ${{ github.event.inputs.default-mono-repo || '["cypress"]' }} - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/open-vs-closed-issues.js') - await script.getOpenAndClosedIssueMetrics(github, context, core, ${{ env.DEFAULT_MONO_REPO }}); - - name: Generate Triage Throughput KPIs - id: triage-metrics - uses: actions/github-script@v6 - env: - START_DATE: ${{ github.event.inputs.start-date }} - END_DATE: ${{ github.event.inputs.end-date }} - PROJECT_BOARD_NUMBER: 9 - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/triage_throughput_kpis.js') - await script.getTriageIssueMetrics(github, context, core, "${{ env.START_DATE }}", "${{ env.END_DATE }}", "${{ env.PROJECT_BOARD_NUMBER }}"); - - name: Generate Mitigation KPIs - id: mitigation-metrics - uses: actions/github-script@v6 - env: - START_DATE: ${{ github.event.inputs.start-date }} - END_DATE: ${{ github.event.inputs.end-date }} - PROJECT_BOARD_NUMBER: 9 - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/triage_mitigation_kpis.js') - await script.getIssueMitigationMetrics(github, context, core, "${{ env.START_DATE }}", "${{ env.END_DATE }}", "${{ env.PROJECT_BOARD_NUMBER }}"); - - name: Generate Feature Request KPIs - id: feature-metrics - uses: actions/github-script@v6 - env: - START_DATE: ${{ github.event.inputs.start-date }} - END_DATE: ${{ github.event.inputs.end-date }} - PROJECT_BOARD_NUMBER: 9 - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/triage_feature_requests_metrics.js') - await script.getFeatureRequestMetrics(github, context, core, "${{ env.START_DATE }}", "${{ env.END_DATE }}", "${{ env.PROJECT_BOARD_NUMBER }}"); - - name: Generate KPI Report - id: generate-report - uses: actions/github-script@v6 - env: - START_DATE: ${{ github.event.inputs.start-date }} - END_DATE: ${{ github.event.inputs.end-date }} - PROJECT_BOARD_NUMBER: 9 - with: - github-token: ${{ secrets.TRIAGE_BOARD_TOKEN }} - script: | - const script = require('./scripts/reports/generate_kpi_report.js') - await script.generateKPIReport(github, context, core, ${{ steps.non-mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.mono-repo-open-closed-metrics.outputs.results }}, ${{ steps.triage-metrics.outputs.results }}, ${{ steps.mitigation-metrics.outputs.results }}, ${{ steps.feature-metrics.outputs.results }} ); - \ No newline at end of file diff --git a/.github/workflows/trigger_circleci.yml b/.github/workflows/trigger_circleci.yml deleted file mode 100644 index 1386ec551beb..000000000000 --- a/.github/workflows/trigger_circleci.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Trigger CircleCi Pipeline" - -on: - pull_request_target: - types: - - opened - - ready_for_review - -jobs: - main: - name: Trigger CircleCi Pipeline when PR is ready for review - runs-on: ubuntu-latest - steps: - - if: ${{ github.event.pull_request.draft == false }} - shell: bash - env: - CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }} - BASE_ORG_AND_REPO: ${{ github.event.pull_request.head.full_name }} - PULL_ID: ${{ github.event.pull_request.number }} - run: | - if [[ "${CIRCLE_TOKEN}" == "" ]]; then - echo "The CIRCLE_TOKEN is unset. Cannot trigger pipeline..." - exit 1; - fi - - BRANCH="$GITHUB_HEAD_REF" - - if [[ "$BASE_ORG_AND_REPO" != "cypress-io/cypress" ]]; then - echo "Triggering CircleCi pipeline for outside contributor." - BRANCH="pull/$PULL_ID/head" - fi - - echo "Triggering CircleCi pipeline for $BRANCH" - - response=$(curl -X POST https://circleci.com/api/v2/project/github/cypress-io/cypress/pipeline \ - --header "Circle-Token:$CIRCLE_TOKEN" \ - --header "content-type:application/json" \ - --data "{\"branch\":\"$BRANCH\"}" \ - --silent - ) - - echo "$response" - - if [ "$(jq 'has("message")' <<< $response )" == "true" ]; then - echo "Error triggering pipeline..." - exit 1; - fi diff --git a/.github/workflows/update-browser-versions.yml b/.github/workflows/update-browser-versions.yml index b85b8eb89c4e..1f13316f7731 100644 --- a/.github/workflows/update-browser-versions.yml +++ b/.github/workflows/update-browser-versions.yml @@ -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: @@ -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: @@ -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, }) diff --git a/.vscode/launch.json b/.vscode/launch.json index ff2618c4bf7d..2142cdfd3ce2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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", diff --git a/.yarnclean b/.yarnclean new file mode 100644 index 000000000000..d30747797b10 --- /dev/null +++ b/.yarnclean @@ -0,0 +1,49 @@ +# test directories +__tests__ +test +tests +powered-test + +# asset directories +docs +doc +# yaml package has a `doc` folder that we need +!yaml/**/doc/* +website +images +assets +!mochawesome-report-generator/dist/assets + +# examples +example +!@packages/example +examples + +# code coverage directories +coverage +.nyc_output + +# build scripts +Makefile +Gulpfile.js +Gruntfile.js + +# configs +appveyor.yml +circle.yml +codeship-services.yml +codeship-steps.yml +wercker.yml +.tern-project +.gitattributes +.editorconfig +.*ignore +.eslintrc +.jshintrc +.flowconfig +.documentup.json +.yarn-metadata.json +.travis.yml + +# misc +*.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index cb65de563b27..2e9de1053570 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ ## Our Pledge -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards @@ -20,13 +20,13 @@ Examples of unacceptable behavior by participants include: * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +* Other conduct that could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 800dd5bd5904..843077d6855a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.
`sudo apt install g++ make cmake` meets the additional requirements to run `node-gyp` in the context of building Cypress from source. ### Getting Started @@ -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: @@ -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. @@ -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 diff --git a/README.md b/README.md index aeaf893644ae..9867193933f2 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,6 @@

Fast, easy and reliable testing for anything that runs in a browser.

-

- - Cypress Conf Link - -

Join us, we're hiring.

diff --git a/browser-versions.json b/browser-versions.json index eb4bb16309d3..916a03abb5dd 100644 --- a/browser-versions.json +++ b/browser-versions.json @@ -1,5 +1,5 @@ { - "chrome:beta": "115.0.5790.13", - "chrome:stable": "114.0.5735.106", + "chrome:beta": "118.0.5993.21", + "chrome:stable": "117.0.5938.132", "chrome:minimum": "64.0.3282.0" } diff --git a/centos7-builder.Dockerfile b/centos7-builder.Dockerfile new file mode 100644 index 000000000000..1a6aa87fadca --- /dev/null +++ b/centos7-builder.Dockerfile @@ -0,0 +1,9 @@ +FROM centos:7 +# Install dependencies for re-building better-sqlite and setting devtoolset-8 as the default compiler +RUN yum -y install centos-release-scl curl python3 make atk-devel atk java-atk-wrapper at-spi2-atk gtk3 libXt libdrm mesa-libgbm Xvfb && yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ +RUN echo >> /etc/profile.d/devtoolset-8.sh 'source scl_source enable devtoolset-8' +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash +RUN echo >> /etc/profile.d/nvm.sh 'source ~/.nvm/nvm.sh' +# Node 16 is the most recent version that supports CentOS 7. We only need it to +# re-build better-sqlite, so there should be minimal risk of security issues. +RUN source ~/.nvm/nvm.sh && nvm install 16.20.2 && npm install -g yarn diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index d4ad63cde915..dcc06e06c70d 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,19 +1,87 @@ +## 13.4.0 + +_Released 10/27/2023_ + +**Features:** + +- Introduced experimental configuration options for advanced retry logic: adds `experimentalStrategy` and `experimentalOptions` keys to the `retry` configuration key. See [Experimental Flake Detection Features](https://docs.cypress.io/guides/references/experiments/#Experimental-Flake-Detection-Features) in the documentation. Addressed in [#27930](https://github.com/cypress-io/cypress/pull/27930). + +**Bugfixes:** + +- Fixed a regression in [`13.3.2`](https://docs.cypress.io/guides/references/changelog/13.3.2) where Cypress would crash with 'Inspected target navigated or closed' or 'Session with given id not found'. Fixes [#28141](https://github.com/cypress-io/cypress/issues/28141) and [#28148](https://github.com/cypress-io/cypress/issues/28148). + +## 13.3.3 + +_Released 10/24/2023_ + +**Bugfixes:** + +- Fixed a performance regression in `13.3.1` with proxy correlation timeouts and requests issued from web and shared workers. Fixes [#28104](https://github.com/cypress-io/cypress/issues/28104). +- Fixed a performance problem with proxy correlation when requests get aborted and then get miscorrelated with follow up requests. Addressed in [#28094](https://github.com/cypress-io/cypress/pull/28094). +- Fixed a regression in [10.0.0](#10.0.0), where search would not find a spec if the file name contains "-" or "\_", but search prompt contains " " instead (e.g. search file "spec-file.cy.ts" with prompt "spec file"). Fixes [#25303](https://github.com/cypress-io/cypress/issues/25303). + +## 13.3.2 + +_Released 10/18/2023_ + +**Bugfixes:** + +- Fixed a performance regression in `13.3.1` with proxy correlation timeouts and requests issued from service workers. Fixes [#28054](https://github.com/cypress-io/cypress/issues/28054) and [#28056](https://github.com/cypress-io/cypress/issues/28056). +- Fixed an issue where proxy correlation would leak over from a previous spec causing performance problems, `cy.intercept` problems, and Test Replay asset capturing issues. Addressed in [#28060](https://github.com/cypress-io/cypress/pull/28060). +- Fixed an issue where redirects of requests that knowingly don't have CDP traffic should also be assumed to not have CDP traffic. Addressed in [#28060](https://github.com/cypress-io/cypress/pull/28060). +- Fixed an issue with Accept Encoding headers by forcing gzip when no accept encoding header is sent and using identity if gzip is not sent. Fixes [#28025](https://github.com/cypress-io/cypress/issues/28025). + +**Dependency Updates:** + +- Upgraded [`@babel/core`](https://www.npmjs.com/package/@babel/core) from `7.22.9` to `7.23.2` to address the [SNYK-JS-SEMVER-3247795](https://snyk.io/vuln/SNYK-JS-SEMVER-3247795) security vulnerability. Addressed in [#28063](https://github.com/cypress-io/cypress/pull/28063). +- Upgraded [`@babel/traverse`](https://www.npmjs.com/package/@babel/traverse) from `7.22.8` to `7.23.2` to address the [SNYK-JS-BABELTRAVERSE-5962462](https://snyk.io/vuln/SNYK-JS-BABELTRAVERSE-5962462) security vulnerability. Addressed in [#28063](https://github.com/cypress-io/cypress/pull/28063). +- Upgraded [`react-docgen`](https://www.npmjs.com/package/react-docgen) from `6.0.0-alpha.3` to `6.0.4` to address the [SNYK-JS-BABELTRAVERSE-5962462](https://snyk.io/vuln/SNYK-JS-BABELTRAVERSE-5962462) security vulnerability. Addressed in [#28063](https://github.com/cypress-io/cypress/pull/28063). + +## 13.3.1 + +_Released 10/11/2023_ + +**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). +- Fixed an issue where a crashed Chrome renderer can cause the Test Replay recorder to hang. Addressed in [#27909](https://github.com/cypress-io/cypress/pull/27909). +- Fixed an issue where multiple responses yielded from calls to `cy.wait()` would sometimes be out of order. Fixes [#27337](https://github.com/cypress-io/cypress/issues/27337). +- Fixed an issue where requests were timing out 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 [#27976](https://github.com/cypress-io/cypress/pull/27976). +- Fixed an issue where Test Replay couldn't record tests due to issues involving `GLIBC`. Fixed deprecation warnings during the rebuild of better-sqlite3. Fixes [#27891](https://github.com/cypress-io/cypress/issues/27891) and [#27902](https://github.com/cypress-io/cypress/issues/27902). +- Enables test replay for executed specs in runs that have a spec that causes a browser crash. Addressed in [#27786](https://github.com/cypress-io/cypress/pull/27786). + +## 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 @@ -26,7 +94,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). diff --git a/cli/__snapshots__/build_spec.js b/cli/__snapshots__/build_spec.js index 751f417d0e3a..2f0a3189ea96 100644 --- a/cli/__snapshots__/build_spec.js +++ b/cli/__snapshots__/build_spec.js @@ -4,7 +4,7 @@ exports['package.json build outputs expected properties 1'] = { 'version': 'x.y.z', 'buildInfo': 'replaced by normalizePackageJson', 'description': 'Cypress is a next generation front end testing tool built for the modern web', - 'homepage': 'https://github.com/cypress-io/cypress', + 'homepage': 'https://cypress.io', 'license': 'MIT', 'bugs': { 'url': 'https://github.com/cypress-io/cypress/issues', diff --git a/cli/lib/exec/spawn.js b/cli/lib/exec/spawn.js index 096458fa5022..d158aa8eb7a9 100644 --- a/cli/lib/exec/spawn.js +++ b/cli/lib/exec/spawn.js @@ -239,7 +239,7 @@ module.exports = { return } - // if we have a callback and this explictly returns + // if we have a callback and this explicitly returns // false then bail if (onStderrData && onStderrData(str) === false) { return diff --git a/cli/lib/util.js b/cli/lib/util.js index 3a3b4399adb6..653ffdd1af0d 100644 --- a/cli/lib/util.js +++ b/cli/lib/util.js @@ -331,7 +331,7 @@ const util = { }, supportsColor () { - // if we've been explictly told not to support + // if we've been explicitly told not to support // color then turn this off if (process.env.NO_COLOR) { return false diff --git a/cli/package.json b/cli/package.json index 9fe77271a209..bafd75570545 100644 --- a/cli/package.json +++ b/cli/package.json @@ -6,7 +6,7 @@ "scripts": { "clean": "node ./scripts/clean.js", "prebuild": "yarn postinstall && node ./scripts/start-build.js", - "build": "node ./scripts/build.js", + "build-cli": "node ./scripts/build.js && node ./scripts/post-build.js", "dtslint": "dtslint types", "postinstall": "patch-package && node ./scripts/post-install.js", "size": "t=\"cypress-v0.0.0.tgz\"; yarn pack --filename \"${t}\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";", @@ -176,5 +176,21 @@ "nohoist": [ "@types/*" ] + }, + "nx": { + "targets": { + "build-cli": { + "dependsOn": [ + "prebuild" + ], + "outputs": [ + "{projectRoot}/types", + "{projectRoot}/build" + ] + } + }, + "implicitDependencies": [ + "@cypress/*" + ] } } diff --git a/cli/scripts/build.js b/cli/scripts/build.js index 155a8a47a35e..a957f3e701b3 100644 --- a/cli/scripts/build.js +++ b/cli/scripts/build.js @@ -1,8 +1,6 @@ const _ = require('lodash') const path = require('path') const shell = require('shelljs') -const minimist = require('minimist') - const fs = require('../lib/fs') // grab the current version and a few other properties @@ -72,9 +70,7 @@ function makeUserPackageFile (branchName) { module.exports = makeUserPackageFile if (!module.parent) { - const args = minimist(process.argv) - - makeUserPackageFile(args.branch) + makeUserPackageFile(process.env.BRANCH) .catch((err) => { /* eslint-disable no-console */ console.error('Could not write user package file') diff --git a/cli/test/lib/cli_spec.js b/cli/test/lib/cli_spec.js index 9de88e13ce0d..3e0de35ddfae 100644 --- a/cli/test/lib/cli_spec.js +++ b/cli/test/lib/cli_spec.js @@ -635,7 +635,7 @@ describe('cli', () => { expect(spawn.start.firstCall.args[0]).to.include('component') }) - it('spawns server with correct args for depricated component-testing command', () => { + it('spawns server with correct args for deprecated component-testing command', () => { this.exec('open-ct --dev') expect(spawn.start.firstCall.args[0]).to.include('--testing-type') expect(spawn.start.firstCall.args[0]).to.include('component') @@ -647,7 +647,7 @@ describe('cli', () => { expect(spawn.start.firstCall.args[0]).to.include('component') }) - it('runs server with correct args for depricated component-testing command', () => { + it('runs server with correct args for deprecated component-testing command', () => { this.exec('run-ct --dev') expect(spawn.start.firstCall.args[0]).to.include('--testing-type') expect(spawn.start.firstCall.args[0]).to.include('component') diff --git a/cli/test/lib/exec/spawn_spec.js b/cli/test/lib/exec/spawn_spec.js index ce39d1b8fa3f..6725e0c1c9c7 100644 --- a/cli/test/lib/exec/spawn_spec.js +++ b/cli/test/lib/exec/spawn_spec.js @@ -409,7 +409,7 @@ describe('lib/exec/spawn', function () { }) }) - it('inherits when on linux and xvfb isnt needed', function () { + it('inherits when on linux and xvfb isn\'t needed', function () { this.spawnedProcess.on.withArgs('close').yieldsAsync(0) os.platform.returns('linux') xvfb.isNeeded.returns(false) diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index db17c6bda79c..df6dc6c2fc76 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -3354,7 +3354,7 @@ declare namespace Cypress { interface CypressComponentDependency { /** - * Unique idenitifer. + * Unique identifier. * @example 'reactscripts' */ type: string @@ -3489,7 +3489,7 @@ declare namespace Cypress { componentIndexHtml?: () => string /** - * Used for the Create From Comopnent feature. + * Used for the Create From Component feature. * This is currently not supported for third party frameworks. */ specPattern?: '**/*.cy.ts' diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000000..5b93acdd1ce0 --- /dev/null +++ b/docker-compose.yml @@ -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 outside 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: diff --git a/guides/building-release-artifacts.md b/guides/building-release-artifacts.md index 11f8aee787cb..2b4a5d6d53aa 100644 --- a/guides/building-release-artifacts.md +++ b/guides/building-release-artifacts.md @@ -19,7 +19,7 @@ This guide has instructions for building both. Building a new npm package is two commands: 1. Increment the version in the root `package.json` -2. `yarn build --scope cypress` +2. `yarn lerna run build-cli` The steps above: diff --git a/guides/graphql-subscriptions.md b/guides/graphql-subscriptions.md index 47ba0a66f585..a346d34299a8 100644 --- a/guides/graphql-subscriptions.md +++ b/guides/graphql-subscriptions.md @@ -109,7 +109,7 @@ browserStatusChange () { ``` - [API Docs](https://github.com/enisdenjo/graphql-ws/tree/master/docs) -- [Transport layer protcol specification](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) +- [Transport layer protocol specification](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) ### Testing diff --git a/guides/writing-cross-platform-javascript.md b/guides/writing-cross-platform-javascript.md index a10580903444..8148bc7d12fa 100644 --- a/guides/writing-cross-platform-javascript.md +++ b/guides/writing-cross-platform-javascript.md @@ -7,7 +7,7 @@ Cypress works on Linux, macOS and Windows. This includes both installing from np Throughout the code base, we access the file system in various ways, and need to be conscious of how we do so to ensure Cypress can be used and developed seamlessly on multiple platforms. One thing to keep in mind is file paths and file separators. macOS and Linux systems use `/`, and Windows uses `\`. -As a general rule, we want to use **native paths** where possible. There are a few reasons for this. Whereever we display a file path, we want to use the native file separator, since that is what the user will expect on their platform. In general, we can use the Node.js `path` module to handle this: +As a general rule, we want to use **native paths** where possible. There are a few reasons for this. Wherever we display a file path, we want to use the native file separator, since that is what the user will expect on their platform. In general, we can use the Node.js `path` module to handle this: ```js // on linux-like systems @@ -40,7 +40,7 @@ path.resolve('../', '/../', '../') // 'C:\\Users' on Windows ``` -In general, you want to avoid writing file system code using `/` and `\`, and use Node.js APIs where possible - those are cross platform and guarenteed to work. +In general, you want to avoid writing file system code using `/` and `\`, and use Node.js APIs where possible - those are cross platform and guaranteed to work. ## Use Node.js Scripts diff --git a/npm/angular/package.json b/npm/angular/package.json index 206047edca16..b9cf5aa29edc 100644 --- a/npm/angular/package.json +++ b/npm/angular/package.json @@ -7,7 +7,6 @@ "prebuild": "rimraf dist", "build": "rollup -c rollup.config.mjs", "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "build-prod": "yarn build", "check-ts": "tsc --noEmit", "lint": "eslint --ext .js,.ts,.json, ." }, @@ -59,6 +58,15 @@ "publishConfig": { "access": "public" }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{workspaceRoot}/cli/angular" + ] + } + } + }, "standard": { "globals": [ "Cypress", diff --git a/npm/create-cypress-tests/CHANGELOG.md b/npm/create-cypress-tests/CHANGELOG.md index 86aab50ae430..720d4a52aab4 100644 --- a/npm/create-cypress-tests/CHANGELOG.md +++ b/npm/create-cypress-tests/CHANGELOG.md @@ -1,3 +1,5 @@ +# [create-cypress-tests-v2.0.4](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v2.0.3...create-cypress-tests-v2.0.4) (2023-10-16) + # [create-cypress-tests-v2.0.3](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v2.0.2...create-cypress-tests-v2.0.3) (2023-09-07) # [create-cypress-tests-v2.0.2](https://github.com/cypress-io/cypress/compare/create-cypress-tests-v2.0.1...create-cypress-tests-v2.0.2) (2023-04-07) diff --git a/npm/create-cypress-tests/package.json b/npm/create-cypress-tests/package.json index 5d7a30a91a29..695a20a2695a 100644 --- a/npm/create-cypress-tests/package.json +++ b/npm/create-cypress-tests/package.json @@ -5,7 +5,6 @@ "main": "dist/src/main.js", "scripts": { "build": "yarn prepare-example && tsc -p ./tsconfig.json && node scripts/example copy-to ./dist/initial-template && yarn prepare-copy-templates", - "build-prod": "yarn build", "prepare-example": "node scripts/example copy-to ./initial-template", "prepare-copy-templates": "node scripts/copy-templates copy-to ./dist/src", "test": "cross-env TS_NODE_PROJECT=./tsconfig.test.json mocha --config .mocharc.json './src/**/*.test.ts'", @@ -23,14 +22,15 @@ "commander": "6.2.1", "find-up": "5.0.0", "fs-extra": "^9.1.0", - "inquirer": "7.3.3", + "glob": "^7.1.6", + "inquirer": "8.2.4", "ora": "^5.1.0", "recast": "0.20.4", "semver": "7.3.7" }, "devDependencies": { "@types/babel__core": "^7.1.2", - "@types/inquirer": "7.3.1", + "@types/inquirer": "8.2.4", "@types/mock-fs": "4.10.0", "@types/node": "18.17.5", "@types/ora": "^3.2.0", @@ -50,5 +50,10 @@ }, "license": "MIT", "repository": "https://github.com/cypress-io/cypress.git", - "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/create-cypress-tests/#readme" + "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/create-cypress-tests/#readme", + "nx": { + "implicitDependencies": [ + "@packages/example" + ] + } } diff --git a/npm/create-cypress-tests/scripts/copy-templates.js b/npm/create-cypress-tests/scripts/copy-templates.js index 89349cfe67a4..583538450087 100644 --- a/npm/create-cypress-tests/scripts/copy-templates.js +++ b/npm/create-cypress-tests/scripts/copy-templates.js @@ -17,15 +17,15 @@ program unique: true, }) - const srcOuput = './src/' - let destinationOuput = destination.replace('/\\/g', '/') + const srcOutput = './src/' + let destinationOutput = destination.replace('/\\/g', '/') - if (!destinationOuput.endsWith('/')) { - destinationOuput += '/' + if (!destinationOutput.endsWith('/')) { + destinationOutput += '/' } const relOutput = (template, forSource) => { - return `${forSource ? srcOuput : destinationOuput}${template}` + return `${forSource ? srcOutput : destinationOutput}${template}` } const result = await Promise.all(templates.map(async (template) => { diff --git a/npm/create-cypress-tests/src/component-testing/babel/babelTransform.ts b/npm/create-cypress-tests/src/component-testing/babel/babelTransform.ts index b7089d3cc158..0c06f49ca80c 100644 --- a/npm/create-cypress-tests/src/component-testing/babel/babelTransform.ts +++ b/npm/create-cypress-tests/src/component-testing/babel/babelTransform.ts @@ -98,10 +98,10 @@ export function createTransformPluginsFileBabelPlugin (ast: PluginsConfigAst): b babelTypes.blockStatement(statementToInject as babelTypes.Statement[] | babelTypes.Statement[]), ) - path.get('body').pushContainer('body' as never, ifComponentMode as babel.Node) + path.get('body').pushContainer('body' as never, ifComponentMode as never) if (ast.requiresReturnConfig) { - path.get('body').pushContainer('body' as never, returnConfigAst) + path.get('body').pushContainer('body' as never, returnConfigAst as never) } } }, diff --git a/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.test.ts b/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.test.ts index 42cfb0a72fc8..8a2dee76b5ff 100644 --- a/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.test.ts +++ b/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.test.ts @@ -43,7 +43,7 @@ describe('lib/util/config-file-updater', () => { context('with js files', () => { describe('#insertValueInJSString', () => { describe('es6 vs es5', () => { - it('finds the object litteral and adds the values to it es6', async () => { + it('finds the object literal and adds the values to it es6', async () => { const src = stripIndent`\ export default { foo: 42, @@ -63,7 +63,7 @@ describe('lib/util/config-file-updater', () => { expect(output).to.equal(expectedOutput) }) - it('finds the object litteral and adds the values to it es5', async () => { + it('finds the object literal and adds the values to it es5', async () => { const src = stripIndent`\ module.exports = { foo: 42, @@ -333,7 +333,7 @@ describe('lib/util/config-file-updater', () => { }) describe('failures', () => { - it('fails if not an object litteral', () => { + it('fails if not an object literal', () => { const src = [ 'const foo = {}', 'export default foo', diff --git a/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.ts b/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.ts index 0dcf07d6eaa1..b2e587f9ee3c 100644 --- a/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.ts +++ b/npm/create-cypress-tests/src/component-testing/config-file-updater/configFileUpdater.ts @@ -71,7 +71,7 @@ export async function insertValueInJSString (fileContents: string, obj: Record { expect(someOfSpyCallsIncludes(logSpy, 'yarn cypress open')).to.be.true }) - it('Fails if git repository have untracked or uncommited files', async () => { + it('Fails if git repository have untracked or uncommitted files', async () => { mockFsWithInitialTemplate({ '/package.json': JSON.stringify({ }), }) @@ -121,7 +121,7 @@ describe('create-cypress-tests', () => { await main({ useNpm: true, ignoreTs: false, ignoreExamples: false, setupComponentTesting: false }) expect( - someOfSpyCallsIncludes(errorSpy, 'This repository has untracked files or uncommmited changes.'), + someOfSpyCallsIncludes(errorSpy, 'This repository has untracked files or uncommitted changes.'), ).to.equal(true) expect(processExitStub).to.be.called diff --git a/npm/create-cypress-tests/src/main.ts b/npm/create-cypress-tests/src/main.ts index 818a58b94329..fc28840559e6 100644 --- a/npm/create-cypress-tests/src/main.ts +++ b/npm/create-cypress-tests/src/main.ts @@ -86,7 +86,7 @@ export async function main ({ useNpm, ignoreTs, setupComponentTesting, ignoreExa const gitStatus = await getGitStatus() if (gitStatus) { - console.error(`\n${chalk.bold.red('This repository has untracked files or uncommmited changes.')}\nThis command will ${chalk.cyan('make changes in the codebase')}, so please remove untracked files, stash or commit any changes, and try again.`) + console.error(`\n${chalk.bold.red('This repository has untracked files or uncommitted changes.')}\nThis command will ${chalk.cyan('make changes in the codebase')}, so please remove untracked files, stash or commit any changes, and try again.`) process.exit(1) } diff --git a/npm/cypress-schematic/package.json b/npm/cypress-schematic/package.json index fa6c8fc4f824..a002669f6925 100644 --- a/npm/cypress-schematic/package.json +++ b/npm/cypress-schematic/package.json @@ -54,5 +54,16 @@ "ng-add": { "save": "devDependencies" }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{projectRoot}/src/**/*.js", + "{projectRoot}/src/**/*.d.ts", + "{projectRoot}/src/**/*.js.map" + ] + } + } + }, "schematics": "./src/schematics/collection.json" } diff --git a/npm/grep/CHANGELOG.md b/npm/grep/CHANGELOG.md index bb91332f8a12..07b10dbad848 100644 --- a/npm/grep/CHANGELOG.md +++ b/npm/grep/CHANGELOG.md @@ -1,3 +1,10 @@ +# [@cypress/grep-v4.0.1](https://github.com/cypress-io/cypress/compare/@cypress/grep-v4.0.0...@cypress/grep-v4.0.1) (2023-10-16) + + +### Bug Fixes + +* **grep:** fix options sent to fast glob package - issue 27216 ([#27231](https://github.com/cypress-io/cypress/issues/27231)) ([5a7eee5](https://github.com/cypress-io/cypress/commit/5a7eee573ec196dc0fcd98768ab021828a3f1307)) + # [@cypress/grep-v4.0.0](https://github.com/cypress-io/cypress/compare/@cypress/grep-v3.1.5...@cypress/grep-v4.0.0) (2023-08-29) diff --git a/npm/grep/cypress.config.js b/npm/grep/cypress.config.js index 31107ca7e869..6502677a6d5e 100644 --- a/npm/grep/cypress.config.js +++ b/npm/grep/cypress.config.js @@ -1,10 +1,17 @@ const { defineConfig } = require('cypress') +const cypressGrepPlugin = require('./src/plugin') module.exports = defineConfig({ e2e: { defaultCommandTimeout: 1000, setupNodeEvents (on, config) { - require('./src/plugin')(config) + cypressGrepPlugin(config) + + on('task', { + grep (config) { + return cypressGrepPlugin(config) + }, + }) return config }, diff --git a/npm/grep/cypress/e2e/unit.js b/npm/grep/cypress/e2e/unit.js index 0ade87a29418..da61404ccb22 100644 --- a/npm/grep/cypress/e2e/unit.js +++ b/npm/grep/cypress/e2e/unit.js @@ -437,3 +437,36 @@ describe('utils', () => { }) }) }) + +describe('plugin', () => { + context('excludeSpecPattern', () => { + it('supports an array value', () => { + cy.task('grep', { + excludeSpecPattern: ['**/test2.spec.js', '**/test3.spec.js'], + specPattern: '**/*.spec.js', + env: { + grepTags: 'smoke', + grepFilterSpecs: true, + }, + }).then((config) => { + expect(config.specPattern.length).to.equal(1) + expect(config.specPattern[0]).to.contain('test1.spec.js') + }) + }) + + it('supports a string value', () => { + cy.task('grep', { + excludeSpecPattern: '**/test2.spec.js', + specPattern: '**/*.spec.js', + env: { + grepTags: 'smoke', + grepFilterSpecs: true, + }, + }).then((config) => { + expect(config.specPattern.length).to.equal(2) + expect(config.specPattern[0]).to.contain('test1.spec.js') + expect(config.specPattern[1]).to.contain('test3.spec.js') + }) + }) + }) +}) diff --git a/npm/grep/package.json b/npm/grep/package.json index 66057f2dc7b5..8dbe3656df53 100644 --- a/npm/grep/package.json +++ b/npm/grep/package.json @@ -41,5 +41,10 @@ ], "publishConfig": { "access": "public" + }, + "nx": { + "implicitDependencies": [ + "!cypress" + ] } } diff --git a/npm/grep/src/plugin.js b/npm/grep/src/plugin.js index 39923691b919..483b3aa85f18 100644 --- a/npm/grep/src/plugin.js +++ b/npm/grep/src/plugin.js @@ -69,7 +69,7 @@ function cypressGrepPlugin (config) { debug('integrationFolder', integrationFolder) const specFiles = globby.sync(specPattern, { cwd: integrationFolder, - ignore: excludeSpecPattern, + ignore: Array.isArray(excludeSpecPattern) ? excludeSpecPattern : [excludeSpecPattern], absolute: true, }) diff --git a/npm/mount-utils/package.json b/npm/mount-utils/package.json index 791a5066d003..563d40a0162b 100644 --- a/npm/mount-utils/package.json +++ b/npm/mount-utils/package.json @@ -6,7 +6,6 @@ "scripts": { "build": "tsc || echo 'built, with type errors'", "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "build-prod": "yarn build", "check-ts": "tsc --noEmit", "watch": "tsc -w", "lint": "eslint --ext .js,.ts,.json, ." @@ -33,5 +32,15 @@ "bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{workspaceRoot}/cli/mount-utils", + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/react/cypress/component/basic/network/2-users-fetch.cy.jsx b/npm/react/cypress/component/basic/network/2-users-fetch.cy.jsx index 86dc0541282b..4737dae39598 100644 --- a/npm/react/cypress/component/basic/network/2-users-fetch.cy.jsx +++ b/npm/react/cypress/component/basic/network/2-users-fetch.cy.jsx @@ -36,7 +36,7 @@ describe('Users with Fetch', () => { .contains('foo') }) - it('can inspect mocked network reaponse', () => { + it('can inspect mocked network response', () => { const users = [{ id: 1, name: 'foo' }] cy.intercept('GET', '/users?_limit=3', users).as('users') diff --git a/npm/react/package.json b/npm/react/package.json index e916668ba98e..65404f824f48 100644 --- a/npm/react/package.json +++ b/npm/react/package.json @@ -88,6 +88,19 @@ "publishConfig": { "access": "public" }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + "!@cypress/react18:build" + ], + "outputs": [ + "{workspaceRoot}/cli/react", + "{projectRoot}/dist" + ] + } + } + }, "standard": { "globals": [ "Cypress", diff --git a/npm/react18/package.json b/npm/react18/package.json index 5c9837bbebf9..e46f19612732 100644 --- a/npm/react18/package.json +++ b/npm/react18/package.json @@ -57,5 +57,15 @@ }, "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{workspaceRoot}/cli/react18", + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/svelte/package.json b/npm/svelte/package.json index e061dec3bbe4..3033377811ae 100644 --- a/npm/svelte/package.json +++ b/npm/svelte/package.json @@ -7,7 +7,6 @@ "prebuild": "rimraf dist", "build": "rollup -c rollup.config.mjs", "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "build-prod": "yarn build", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .", "check-ts": "tsc --noEmit" }, @@ -40,5 +39,18 @@ "module": "dist/cypress-svelte.esm-bundler.js", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{workspaceRoot}/cli/svelte", + "{projectRoot}/dist" + ] + } + }, + "implicitDependencies": [ + "!cypress" + ] } } diff --git a/npm/vite-dev-server/package.json b/npm/vite-dev-server/package.json index e1c54913584b..2988ca3fb0ce 100644 --- a/npm/vite-dev-server/package.json +++ b/npm/vite-dev-server/package.json @@ -5,7 +5,6 @@ "main": "index.js", "scripts": { "build": "tsc || echo 'built, with type errors'", - "build-prod": "tsc || echo 'built, with type errors'", "check-ts": "tsc --noEmit", "cypress:run": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project . --browser chrome", "cypress:run-cypress-in-cypress": "cross-env CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=1 HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York", @@ -46,5 +45,14 @@ "module": "dist/index.js", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 5583cfd816ea..e0fbdd4fa1e5 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -53,7 +53,7 @@ export const Cypress = ( base = config.base }, async transformIndexHtml (html) { - // it's possibe other plugins have modified the HTML + // it's possible other plugins have modified the HTML // before we get to. For example vitejs/plugin-react will // add a preamble. We do our best to look at the HTML we // receive and inject it. diff --git a/npm/vite-plugin-cypress-esm/package.json b/npm/vite-plugin-cypress-esm/package.json index ad600a9c85d5..ea69ce3e0ac3 100644 --- a/npm/vite-plugin-cypress-esm/package.json +++ b/npm/vite-plugin-cypress-esm/package.json @@ -5,7 +5,6 @@ "main": "index.js", "scripts": { "build": "tsc || echo 'built, with type errors'", - "build-prod": "tsc || echo 'built, with type errors'", "check-ts": "tsc --noEmit", "cypress:open": "node ../../scripts/cypress open --project . --component", "cypress:run": "node ../../scripts/cypress run --project . --component", @@ -42,5 +41,14 @@ "module": "dist/index.js", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/vue/cypress/component/advanced/access-component/message.cy.js b/npm/vue/cypress/component/advanced/access-component/message.cy.js index 41e969305b70..1ab4f4b1ad81 100644 --- a/npm/vue/cypress/component/advanced/access-component/message.cy.js +++ b/npm/vue/cypress/component/advanced/access-component/message.cy.js @@ -47,7 +47,7 @@ describe('Message', () => { describe('Events', () => { it('calls handleClick when click on message', () => { // need to spy on the _original_ method before it gets - // passed to the Vue.extend and gets into private closuer + // passed to the Vue.extend and gets into private closure const spy = cy.spy(Message.methods, 'handleClick') createCmp({ message: 'Cat' }) diff --git a/npm/vue/cypress/component/router-example/PizzaShop/Home.vue b/npm/vue/cypress/component/router-example/PizzaShop/Home.vue index b39c6d583f92..0d8a8b118d98 100644 --- a/npm/vue/cypress/component/router-example/PizzaShop/Home.vue +++ b/npm/vue/cypress/component/router-example/PizzaShop/Home.vue @@ -33,10 +33,10 @@ 🍖 Meatlover
- 🍍 Hawain + 🍍 Hawaiian
{ cy.get('.order-overview > ul > li').contains('cheese') }) - it('order hawaian + peppers pizza without using UI', () => { + it('order hawaiian + peppers pizza without using UI', () => { cy.wrap(Cypress.vue.$router) .then(($router) => $router.push({ name: 'home' })) .then(($router) => { return $router.push({ name: 'order', - params: { preset: 'hawaian' }, + params: { preset: 'hawaiian' }, query: { peppers: true }, }) }) diff --git a/npm/vue/cypress/component/tailwind/redbox.cy.js b/npm/vue/cypress/component/tailwind/redbox.cy.js index a4db3c614d15..01a5041a0dde 100644 --- a/npm/vue/cypress/component/tailwind/redbox.cy.js +++ b/npm/vue/cypress/component/tailwind/redbox.cy.js @@ -24,7 +24,7 @@ describe('RedBox 1', () => { it('displays red Hello RedBox', () => { mount({ template }, options) - // shoud have injected the inline styling. + // should have injected the inline styling. cy.get('style').should('contain.text', inlineStyle) cy.contains('Hello RedBox') diff --git a/npm/vue/package.json b/npm/vue/package.json index 2f7ac9525cce..d24c712596da 100644 --- a/npm/vue/package.json +++ b/npm/vue/package.json @@ -4,7 +4,6 @@ "description": "Browser-based Component Testing for Vue.js with Cypress.io ✌️🌲", "main": "dist/cypress-vue.cjs.js", "scripts": { - "build-prod": "yarn build", "cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}", "cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}", "build": "rimraf dist && rollup -c rollup.config.mjs", @@ -80,5 +79,18 @@ }, "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "dependsOn": [ + "!@cypress/react18:build" + ], + "outputs": [ + "{workspaceRoot}/cli/vue", + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/vue2/package.json b/npm/vue2/package.json index 16a237a58059..22348ad88aba 100644 --- a/npm/vue2/package.json +++ b/npm/vue2/package.json @@ -7,7 +7,6 @@ "check-ts": "tsc --noEmit", "build": "rimraf dist && yarn rollup -c rollup.config.mjs", "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "build-prod": "yarn build", "test": "echo \"Tests for @cypress/vue2 are run from system-tests\"", "watch": "yarn build --watch --watch.exclude ./dist/**/*", "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.vue .", @@ -49,5 +48,18 @@ "module": "dist/cypress-vue2.esm-bundler.js", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{workspaceRoot}/cli/vue2", + "{projectRoot}/dist" + ] + } + }, + "implicitDependencies": [ + "!cypress" + ] } } diff --git a/npm/vue2/src/index.ts b/npm/vue2/src/index.ts index f73be7d74400..7b8c33364aea 100644 --- a/npm/vue2/src/index.ts +++ b/npm/vue2/src/index.ts @@ -320,7 +320,7 @@ function failTestOnVueError (err, vm, info) { /** * Extract the component name from the object passed to mount - * @param componentOptions the compoennt passed to mount + * @param componentOptions the component passed to mount * @returns name of the component */ function getComponentDisplayName (componentOptions: any): string { diff --git a/npm/webpack-dev-server/package.json b/npm/webpack-dev-server/package.json index 4153d03eab2b..97312342c377 100644 --- a/npm/webpack-dev-server/package.json +++ b/npm/webpack-dev-server/package.json @@ -6,7 +6,6 @@ "scripts": { "prebuild": "rimraf dist", "build": "tsc || echo 'built, with type errors'", - "build-prod": "yarn build", "check-ts": "tsc --noEmit", "dev": "tsc --watch", "clean": "rimraf dist", @@ -57,5 +56,14 @@ "bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md", "publishConfig": { "access": "public" + }, + "nx": { + "targets": { + "build": { + "outputs": [ + "{projectRoot}/dist" + ] + } + } } } diff --git a/npm/webpack-preprocessor/package.json b/npm/webpack-preprocessor/package.json index eeb4a04b6a03..a23db178cd42 100644 --- a/npm/webpack-preprocessor/package.json +++ b/npm/webpack-preprocessor/package.json @@ -6,7 +6,6 @@ "main": "dist", "scripts": { "build": "rimraf dist && tsc || echo 'built, with errors'", - "build-prod": "yarn build", "deps": "deps-ok && dependency-check --no-dev .", "secure": "nsp check", "semantic-release": "semantic-release", @@ -72,5 +71,17 @@ "cypress-plugin", "cypress-preprocessor", "webpack" - ] + ], + "nx": { + "targets": { + "build": { + "dependsOn": [ + "!@cypress/react18:build" + ], + "outputs": [ + "{projectRoot}/dist" + ] + } + } + } } diff --git a/npm/webpack-preprocessor/test/unit/dist.spec.ts b/npm/webpack-preprocessor/test/unit/dist.spec.ts index c2271c5f3403..8fafef7a6763 100644 --- a/npm/webpack-preprocessor/test/unit/dist.spec.ts +++ b/npm/webpack-preprocessor/test/unit/dist.spec.ts @@ -1,7 +1,7 @@ const { expect } = require('chai') const preprocessor = require('../../dist/index') -describe('tyepscript ./dist output', () => { +describe('typescript ./dist output', () => { it('builds dist correctly', () => { expect(preprocessor).to.be.a('function') expect(preprocessor).to.have.property('defaultOptions') diff --git a/nx.json b/nx.json index 87746f1d41fa..031677e8a96b 100644 --- a/nx.json +++ b/nx.json @@ -5,7 +5,8 @@ "options": { "cacheableOperations": [ "lint", - "check-ts" + "check-ts", + "build" ], "accessToken": "ZmNlNjA0YzAtNTM1NS00MDIwLWFlMWItNWYxYzNiMjQ4N2VkfHJlYWQtb25seQ==" } @@ -36,7 +37,9 @@ } }, "namedInputs": { - "sharedGlobals": [], + "sharedGlobals": [ + "{workspaceRoot}/scripts" + ], "default": [ "{projectRoot}/**/*", "sharedGlobals" diff --git a/package.json b/package.json index 4e6d5b76c3b8..7f85ce6d109a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "13.1.0", + "version": "13.4.0", "description": "Cypress is a next generation front end testing tool built for the modern web", "private": true, "scripts": { @@ -14,14 +14,13 @@ "binary-zip": "node ./scripts/binary.js zip", "binary-package": "cross-env NODE_OPTIONS=--max_old_space_size=8192 node ./scripts/binary.js package", "check-binary-on-cdn": "node ./scripts/binary.js checkIfBinaryExistsOnCdn", - "build": "yarn build-npm-modules && lerna run build --stream --no-bail --ignore create-cypress-tests --ignore cypress --ignore \"'@packages/{runner}'\" --ignore \"'@cypress/{angular,react,react18,vue,vue2,mount-utils,svelte}'\" && node ./cli/scripts/post-build.js && lerna run build --stream --scope create-cypress-tests", - "build-npm-modules": "lerna run build --scope cypress --scope @cypress/mount-utils --scope @cypress/react && lerna run build --scope \"'@cypress/{angular,react18,vue,vue2,svelte}'\"", - "build-prod": "lerna run build-prod-ui --stream && lerna run build-prod --stream --ignore create-cypress-tests && node ./cli/scripts/post-build.js && lerna run build-prod --stream --scope create-cypress-tests --scope", + "build": "lerna run build --stream && lerna run build-cli --stream", + "build-prod": "lerna run build-prod --stream --ignore create-cypress-tests && node ./cli/scripts/post-build.js && lerna run build-prod --stream --scope create-cypress-tests --scope", "build-v8-snapshot-dev": "node --max-old-space-size=8192 tooling/v8-snapshot/scripts/setup-v8-snapshot-in-cypress.js --env=dev", "build-v8-snapshot-prod": "node --max-old-space-size=8192 tooling/v8-snapshot/scripts/setup-v8-snapshot-in-cypress.js", "check-node-version": "node scripts/check-node-version.js", "check-terminal": "node scripts/check-terminal.js", - "clean": "lerna run clean --parallel --no-bail || echo 'ok, errors while cleaning'", + "clean": "lerna run clean --no-bail || echo 'ok, errors while cleaning'", "check-ts": "yarn lerna run check-ts", "clean-deps": "find . -depth -name node_modules -type d -exec rimraf {} \\;", "clean-untracked-files": "git clean -d -f", @@ -40,6 +39,7 @@ "gulp:debug": "node --inspect-brk ./node_modules/.bin/gulp", "dev-debug": "node ./scripts/debug.js dev", "docker": "./scripts/run-docker-local.sh", + "docker-dev": "./scripts/run-docker-local.sh dev", "ensure-deps": "./scripts/ensure-dependencies.sh", "get-next-version": "node scripts/get-next-version.js", "postinstall": "node ./scripts/run-postInstall.js", @@ -145,7 +145,7 @@ "dedent": "^0.7.0", "del": "3.0.0", "detect-port": "^1.3.0", - "electron": "25.8.0", + "electron": "25.8.4", "electron-builder": "^23.6.0", "enzyme-adapter-react-16": "1.12.1", "eslint": "7.22.0", @@ -173,10 +173,10 @@ "http-server": "0.12.3", "human-interval": "1.0.0", "husky": "7.0.2", - "inquirer": "3.3.0", + "inquirer": "8.2.4", "inquirer-confirm": "2.0.3", "lazy-ass": "1.6.0", - "lerna": "5.4.3", + "lerna": "6.6.2", "lint-staged": "11.1.2", "listr2": "3.8.3", "lodash": "^4.17.21", @@ -208,7 +208,7 @@ "through2": "^4.0.2", "tree-kill": "1.2.2", "ts-node": "^10.9.1", - "typescript": "^4.7.4", + "typescript": "4.7.4", "yarn-deduplicate": "3.1.0" }, "engines": { @@ -221,7 +221,7 @@ "type": "git", "url": "https://github.com/cypress-io/cypress.git" }, - "homepage": "https://github.com/cypress-io/cypress", + "homepage": "https://cypress.io", "bugs": { "url": "https://github.com/cypress-io/cypress/issues" }, diff --git a/packages/app/cypress/e2e/debug.cy.ts b/packages/app/cypress/e2e/debug.cy.ts index a5252b99eb56..c2c39129028b 100644 --- a/packages/app/cypress/e2e/debug.cy.ts +++ b/packages/app/cypress/e2e/debug.cy.ts @@ -75,7 +75,7 @@ describe('App - Debug Page', () => { .contains('View in Cypress Cloud') .should('have.attr', 'href', 'https://cloud.cypress.io/projects/7p5uce/runs/2?utm_medium=Debug+Tab&utm_campaign=View+in+Cypress+Cloud&utm_source=Binary%3A+App') - cy.findByTestId('debug-runNumber-PASSED').contains('#2') + cy.findByTestId('runNumber-status-PASSED').contains('#2') cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead') cy.findByTestId('metadata').within(() => { @@ -136,7 +136,7 @@ describe('App - Debug Page', () => { cy.findByLabelText('Relevant run had 1 test failure').should('be.visible').contains('1') - cy.findByTestId('debug-runNumber-FAILED').contains('#136') + cy.findByTestId('runNumber-status-FAILED').contains('#136') cy.findByTestId('debug-commitsAhead').contains('You are 1 commit ahead') cy.findByTestId('metadata').within(() => { diff --git a/packages/app/cypress/e2e/runner/retries.experimentalRetries.mochaEvents.cy.ts b/packages/app/cypress/e2e/runner/retries.experimentalRetries.mochaEvents.cy.ts index 8acadd3ac8a1..38a6ad83825e 100644 --- a/packages/app/cypress/e2e/runner/retries.experimentalRetries.mochaEvents.cy.ts +++ b/packages/app/cypress/e2e/runner/retries.experimentalRetries.mochaEvents.cy.ts @@ -391,7 +391,7 @@ describe('Experimental retries: mochaEvents & test status tests', { retries: 0, describe('cleanses errors before emitting', () => { it('does not try to serialize error with err.actual as DOM node', function (done) { // because there are more attempts for 'detect-flake-but-always-fail', the timeout needs to be increased - this.timeout(15000) + this.timeout(20000) const { assertMatchingSnapshot } = runCypressInCypressMochaEventsTest( snapshots, diff --git a/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts b/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts index ea28149289d3..7404d1303c40 100644 --- a/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts +++ b/packages/app/cypress/e2e/runner/retries.mochaEvents.snapshots.ts @@ -240,6 +240,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -272,6 +273,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -319,6 +321,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -352,6 +355,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -960,6 +964,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1013,6 +1018,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1081,6 +1087,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1135,6 +1142,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1764,6 +1772,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1817,6 +1826,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1885,6 +1895,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -1939,6 +1950,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -2742,6 +2754,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -2805,6 +2818,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -2883,6 +2897,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -2947,6 +2962,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -3824,6 +3840,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -3880,6 +3897,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -3936,6 +3954,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -3992,6 +4011,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -4049,6 +4069,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 2, outerStatus: 'passed', @@ -4311,6 +4332,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4368,6 +4390,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4425,6 +4448,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4482,6 +4506,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4540,6 +4565,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4840,6 +4866,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4904,6 +4931,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -4968,6 +4996,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -5032,6 +5061,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -5097,6 +5127,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -5964,6 +5995,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -6008,6 +6040,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -6052,6 +6085,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -6096,6 +6130,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -6141,6 +6176,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -6307,6 +6343,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -6347,6 +6384,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -6402,6 +6440,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -6443,6 +6482,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -6599,6 +6639,7 @@ export const snapshots = { { _cypressTestStatusInfo: { attempts: 1, + strategy: 'detect-flake-and-pass-on-threshold', outerStatus: 'failed', shouldAttemptsContinue: false, }, @@ -7081,6 +7122,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -7135,6 +7177,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -7189,6 +7232,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -7243,6 +7287,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -7298,6 +7343,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -8102,6 +8148,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -8148,6 +8195,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -8194,6 +8242,7 @@ export const snapshots = { 'test:before:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -8240,6 +8289,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -8287,6 +8337,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'passed', @@ -8500,6 +8551,7 @@ export const snapshots = { 'pass', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -8554,6 +8606,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -8623,6 +8676,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -8678,6 +8732,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 1, outerStatus: 'passed', @@ -9121,6 +9176,7 @@ export const snapshots = { 'fail', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'failed', @@ -9165,6 +9221,7 @@ export const snapshots = { 'test end', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'failed', @@ -9203,6 +9260,7 @@ export const snapshots = { 'test:after:run', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'failed', @@ -9242,6 +9300,7 @@ export const snapshots = { 'test:after:run:async', { _cypressTestStatusInfo: { + strategy: 'detect-flake-and-pass-on-threshold', shouldAttemptsContinue: false, attempts: 3, outerStatus: 'failed', diff --git a/packages/app/cypress/e2e/runs.cy.ts b/packages/app/cypress/e2e/runs.cy.ts index d89a684b872d..5e6efb766d58 100644 --- a/packages/app/cypress/e2e/runs.cy.ts +++ b/packages/app/cypress/e2e/runs.cy.ts @@ -60,7 +60,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() cy.findByTestId('sidebar-link-runs-page').click() - cy.get('[data-cy="runs-loader"]') + cy.get('[data-cy*="runsSkeleton-"]') cy.get('[data-cy="runs"]') }) }) @@ -103,7 +103,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() moveToRunsPage() - cy.contains('a', 'OVERLIMIT').click() + cy.findByTestId('runNumber-status-OVERLIMIT').click() cy.withCtx((ctx, o) => { expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/4') @@ -666,29 +666,25 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() moveToRunsPage() - cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => { - cy.findByText('fix: make gql work CANCELLED') - cy.get('[data-cy="run-card-icon-CANCELLED"]') + cy.get('[data-cy="runCard-status-CANCELLED"]').first().within(() => { + cy.get('[data-cy="runNumber-status-CANCELLED"]') }) - cy.get('[href^="http://dummy.cypress.io/runs/1"]').first().within(() => { - cy.findByText('fix: make gql work ERRORED') - cy.get('[data-cy="run-card-icon-ERRORED"]') + cy.get('[data-cy="runCard-status-ERRORED"]').first().within(() => { + cy.get('[data-cy="runNumber-status-ERRORED"]') }) - cy.get('[href^="http://dummy.cypress.io/runs/2"]').first().within(() => { - cy.findByText('fix: make gql work FAILED') - cy.get('[data-cy="run-card-icon-FAILED"]') + cy.get('[data-cy="runCard-status-FAILED"]').first().within(() => { + cy.get('[data-cy="runNumber-status-FAILED"]') }) - cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun') + cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun') cy.get('@firstRun').within(() => { - cy.get('[data-cy="run-card-author"]').contains('John Appleseed') - cy.get('[data-cy="run-card-avatar"]') - cy.get('[data-cy="run-card-branch"]').contains('main') - cy.get('[data-cy="run-card-created-at"]').contains('an hour ago') - cy.get('[data-cy="run-card-duration"]').contains('01:00') + cy.get('[data-cy="runCard-author"]').contains('John Appleseed') + cy.get('[data-cy="runCard-avatar"]') + cy.get('[data-cy="runCard-branchName"]').contains('main') + cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)') cy.contains('span', 'skipped') cy.get('span').contains('pending') @@ -702,7 +698,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() moveToRunsPage() - cy.get('[data-cy^="runCard-"]').first().click() + cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click() cy.withCtx((ctx) => { expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0') @@ -765,19 +761,18 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() moveToRunsPage() + cy.findByText('fix: using Git data CANCELLED') cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().within(() => { - cy.findByText('fix: using Git data CANCELLED') - cy.get('[data-cy="run-card-icon-CANCELLED"]') + cy.get('[data-cy="runNumber-status-CANCELLED"]') }) - cy.get('[href^="http://dummy.cypress.io/runs/0"]').first().as('firstRun') + cy.get('[data-cy="runCard-status-CANCELLED"]').first().as('firstRun') cy.get('@firstRun').within(() => { - cy.get('[data-cy="run-card-author"]').contains('John Appleseed') - cy.get('[data-cy="run-card-avatar"]') - cy.get('[data-cy="run-card-branch"]').contains('main') - cy.get('[data-cy="run-card-created-at"]').contains('an hour ago') - cy.get('[data-cy="run-card-duration"]').contains('01:00') + cy.get('[data-cy="runCard-author"]').contains('John Appleseed') + cy.get('[data-cy="runCard-avatar"]') + cy.get('[data-cy="runCard-branchName"]').contains('main') + cy.get('[data-cy="runCard-createdAt"]').contains('01m 00s (an hour ago)') cy.contains('span', 'skipped') cy.get('span').contains('pending') @@ -791,7 +786,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { cy.visitApp() moveToRunsPage() - cy.get('[data-cy^="runCard-"]').first().click() + cy.get('[data-cy="runNumber-status-CANCELLED"]').first().click() cy.withCtx((ctx) => { expect((ctx.actions.electron.openExternal as SinonStub).lastCall.lastArg).to.contain('http://dummy.cypress.io/runs/0') @@ -955,7 +950,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { const itSkipIfWindows = Cypress.platform === 'win32' ? it.skip : it itSkipIfWindows('should re-query for executing runs', () => { - cy.get('[data-cy="run-card-icon-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible') + cy.get('[data-cy="runNumber-status-RUNNING"]').should('have.length', RUNNING_COUNT).should('be.visible') cy.remoteGraphQLIntercept(async (obj) => { await new Promise((resolve) => setTimeout(resolve, 100)) @@ -976,7 +971,7 @@ describe('App: Runs', { viewportWidth: 1200 }, () => { }) function completeNext (passed) { - cy.get('[data-cy="run-card-icon-PASSED"]').should('have.length', passed).should('be.visible') + cy.get('[data-cy="runNumber-status-PASSED"]').should('have.length', passed).should('be.visible') if (passed < RUNNING_COUNT) { completeNext(passed + 1) } diff --git a/packages/app/cypress/e2e/specs_list_e2e.cy.ts b/packages/app/cypress/e2e/specs_list_e2e.cy.ts index 06a1ab33123d..6d05d6c3e909 100644 --- a/packages/app/cypress/e2e/specs_list_e2e.cy.ts +++ b/packages/app/cypress/e2e/specs_list_e2e.cy.ts @@ -253,6 +253,66 @@ describe('App: Spec List (E2E)', () => { cy.findByText('No specs matched your search:').should('not.be.visible') }) + it('searches specs with "-" or "_" when search contains space', function () { + clearSearchAndType('accounts list') + + cy.findAllByTestId('spec-item') + .should('have.length', 1) + .and('contain', 'accounts_list.spec.js') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + + it('searches specs with "-" or "_" when search contains "-"', function () { + clearSearchAndType('accounts-list') + + cy.findAllByTestId('spec-item') + .should('have.length', 1) + .and('contain', 'accounts_list.spec.js') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + + it('searches specs with "-" or "_" when search contains "_"', function () { + clearSearchAndType('accounts_list') + + cy.findAllByTestId('spec-item') + .should('have.length', 1) + .and('contain', 'accounts_list.spec.js') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + + it('searches folders with "-" or "_" when search contains space', function () { + clearSearchAndType('a b c') + + cy.findAllByTestId('spec-list-directory') + .should('have.length', 1) + .and('contain', 'a-b_c') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + + it('searches folders with "-" or "_" when search contains "-"', function () { + clearSearchAndType('a-b-c') + + cy.findAllByTestId('spec-list-directory') + .should('have.length', 1) + .and('contain', 'a-b_c') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + + it('searches folders with "-" or "_" when search contains "_"', function () { + clearSearchAndType('a_b_c') + + cy.findAllByTestId('spec-list-directory') + .should('have.length', 1) + .and('contain', 'a-b_c') + + cy.findByText('No specs matched your search:').should('not.be.visible') + }) + it('saves the filter when navigating to a spec and back', function () { const targetSpecFile = 'accounts_list.spec.js' diff --git a/packages/app/package.json b/packages/app/package.json index c4a45f225676..1bd79334f164 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "check-ts": "vue-tsc --noEmit", - "build-prod-ui": "cross-env NODE_ENV=production vite build", + "build": "vite build", "clean": "rimraf dist && echo 'cleaned'", "clean-deps": "rimraf node_modules", "test": "echo 'ok'", @@ -21,7 +21,7 @@ "dependencies": {}, "devDependencies": { "@cypress-design/vue-button": "^0.10.1", - "@cypress-design/vue-icon": "^0.25.0", + "@cypress-design/vue-icon": "^0.26.0", "@cypress-design/vue-statusicon": "^0.5.0", "@cypress-design/vue-tabs": "^0.5.1", "@graphql-typed-document-node/core": "^3.1.0", @@ -79,5 +79,11 @@ }, "files": [ "dist" - ] + ], + "nx": { + "implicitDependencies": [ + "@packages/data-context", + "@packages/graphql" + ] + } } diff --git a/packages/app/src/debug/DebugPageHeader.cy.tsx b/packages/app/src/debug/DebugPageHeader.cy.tsx index 20a5b574ebb2..b5de9ddd2260 100644 --- a/packages/app/src/debug/DebugPageHeader.cy.tsx +++ b/packages/app/src/debug/DebugPageHeader.cy.tsx @@ -43,11 +43,11 @@ describe('', { cy.findByTestId('debug-results').should('be.visible') - cy.findByTestId('debug-runNumber-FAILED') + cy.findByTestId('runNumber-status-FAILED') .should('have.text', '#432') .children().should('have.length', 2) - cy.findByTestId('debug-flaky-badge') + cy.findByTestId('runResults-flakyBadge') .should('not.exist') defaults.forEach((obj) => { @@ -73,7 +73,7 @@ describe('', { }, }) - cy.findByTestId('debug-flaky-badge') + cy.findByTestId('runResults-flakyBadge') .contains(defaultMessages.specPage.flaky.badgeLabel) cy.findByTestId('total-flaky-tests') @@ -97,7 +97,7 @@ describe('', { }, }) - cy.findByTestId(`debug-runNumber-${status}`).should('be.visible') + cy.findByTestId(`runNumber-status-${status}`).should('be.visible') }) }) diff --git a/packages/app/src/debug/DebugPageHeader.vue b/packages/app/src/debug/DebugPageHeader.vue index 020eaffac4be..ee5f734d598b 100644 --- a/packages/app/src/debug/DebugPageHeader.vue +++ b/packages/app/src/debug/DebugPageHeader.vue @@ -51,12 +51,12 @@
  • - - @@ -92,7 +92,7 @@ v-if="debug.createdAt" data-cy="debug-header-createdAt" > - diff --git a/packages/app/src/debug/DebugRunNavigation.vue b/packages/app/src/debug/DebugRunNavigation.vue index ff2a1c4a260f..7bd9be4e92d2 100644 --- a/packages/app/src/debug/DebugRunNavigation.vue +++ b/packages/app/src/debug/DebugRunNavigation.vue @@ -38,12 +38,12 @@