Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for chrome for testing browser #30751

Merged
merged 20 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

11-5-24
11-11-24
11 changes: 5 additions & 6 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'chore/update_reporter_mobx'
- 'publish-binary'
- 'mschile/chrome_for_testing'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -42,7 +41,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'ryanm/experiment/esm', << pipeline.git.branch >> ]
- equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -53,7 +52,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ]
- equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,7 +75,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/update_reporter_mobx', << pipeline.git.branch >> ]
- equal: [ 'mschile/chrome_for_testing', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -152,7 +151,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/experiment/esm" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "mschile/chrome_for_testing" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down
6 changes: 5 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
## 13.16.2
## 13.17.0

_Released 12/17/2024 (PENDING)_

**Features:**

- Added support for Google Chrome for Testing browser. Addresses [#28123](https://github.com/cypress-io/cypress/issues/28123) and [#28554](https://github.com/cypress-io/cypress/issues/28554).

**Bugfixes:**

- Fixed an issue where targets may hang if `Network.enable` is not implemented for the target. Addresses [#29876](https://github.com/cypress-io/cypress/issues/29876).
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const AllCypressErrors = {
Browser: ${fmt.highlight(browser)} was not found on your system or is not supported by Cypress.

Cypress supports the following browsers:
${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome:canary', 'edge', 'firefox'])}
${fmt.listItems(['electron', 'chrome', 'chromium', 'chrome-for-testing', 'edge', 'firefox'])}

You can also use a custom browser: https://on.cypress.io/customize-browsers

Expand Down
6 changes: 4 additions & 2 deletions packages/frontend-shared/src/assets/browserLogos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import edgeIcon from 'browser-logos/src/edge/edge.svg?url'
import electronIcon from 'browser-logos/src/electron/electron.svg?url'
import canaryIcon from 'browser-logos/src/chrome-canary/chrome-canary.svg?url'
import chromeBetaIcon from 'browser-logos/src/chrome-beta/chrome-beta.svg?url'
import chromeTestIcon from 'browser-logos/src/chrome-test/chrome-test.svg?url'
import chromiumIcon from 'browser-logos/src/chromium/chromium.svg?url'
import edgeBetaIcon from 'browser-logos/src/edge-beta/edge-beta.png'
import edgeCanaryIcon from 'browser-logos/src/edge-canary/edge-canary.png'
Expand All @@ -16,11 +17,12 @@ import genericBrowserLogo from '@packages/frontend-shared/src/assets/logos/gener
export const allBrowsersIcons = {
'Electron': electronIcon,
'Chrome': chromeIcon,
'Chrome Beta': chromeBetaIcon,
'Chrome Canary': canaryIcon,
'Chrome Test': chromeTestIcon,
jennifer-shehane marked this conversation as resolved.
Show resolved Hide resolved
'Firefox': firefoxIcon,
'Edge': edgeIcon,
'Chromium': chromiumIcon,
'Canary': canaryIcon,
'Chrome Beta': chromeBetaIcon,
'Firefox Nightly': firefoxNightlyIcon,
'Firefox Developer Edition': firefoxDeveloperEditionIcon,
'Edge Canary': edgeCanaryIcon,
Expand Down
35 changes: 22 additions & 13 deletions packages/launcher/__snapshots__/browsers_spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ exports['browsers returns the expected list of browsers 1'] = [
],
'minSupportedVersion': 64,
},
{
'name': 'chromium',
'family': 'chromium',
'channel': 'stable',
'displayName': 'Chromium',
'versionRegex': {},
'binary': [
'chromium-browser',
'chromium',
],
'minSupportedVersion': 64,
},
{
'name': 'chrome',
'family': 'chromium',
Expand All @@ -37,11 +25,32 @@ exports['browsers returns the expected list of browsers 1'] = [
'name': 'chrome',
'family': 'chromium',
'channel': 'canary',
'displayName': 'Canary',
'displayName': 'Chrome Canary',
'versionRegex': {},
'binary': 'google-chrome-canary',
'minSupportedVersion': 64,
},
{
'name': 'chrome-for-testing',
'family': 'chromium',
'channel': 'stable',
'displayName': 'Chrome Test',
'versionRegex': {},
'binary': 'chrome',
'minSupportedVersion': 64,
},
{
'name': 'chromium',
'family': 'chromium',
'channel': 'stable',
'displayName': 'Chromium',
'versionRegex': {},
'binary': [
'chromium-browser',
'chromium',
],
'minSupportedVersion': 64,
},
{
'name': 'firefox',
'family': 'firefox',
Expand Down
Loading
Loading