Skip to content

Conversation

@jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Jun 2, 2025

Close #528

@cypress
Copy link

cypress bot commented Jun 2, 2025

circleci-orb    Run #304

Run Properties:  status check failed Failed #304  •  git commit 307ffe6b1b: add executor
Project circleci-orb
Branch Review bump-browser-tools
Run status status check failed Failed #304
Run duration 00m 11s
Commit git commit 307ffe6b1b: add executor
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 0
View all changes introduced in this branch ↗︎
UI Coverage  100%
  Untested elements 0  
  Tested elements 3  
Accessibility  90.82%
  Failed rules  0 critical   0 serious   3 moderate   0 minor
  Failed elements 5  

Tests for review

Failed  cypress/e2e/login.cy.ts • 1 failed test

View Output

Test Artifacts
Authentication > Logs in Test Replay Screenshots

@jennifer-shehane
Copy link
Member Author

jennifer-shehane commented Jun 2, 2025

Chrome for Testing isn't installing due to this issue: CircleCI-Public/browser-tools-orb#137

I could theoretically bump our version and get built in Edge support, but I think I'll wait a bit to see if this PR merges.

We also want the version to be optional which is covered here: CircleCI-Public/browser-tools-orb#138

@jennifer-shehane jennifer-shehane self-assigned this Jun 2, 2025
@jennifer-shehane jennifer-shehane changed the title bump browser tools feat: Update browser-tools orb so that Chrome for testing and Edge browsers are installed in cypress/install Jun 2, 2025
@jennifer-shehane
Copy link
Member Author

jennifer-shehane commented Jun 6, 2025

Fixed and made some requests to browser-tools orb which they addressed in 2.1.0: https://github.com/CircleCI-Public/browser-tools-orb/releases/tag/v2.1.0

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Jun 10, 2025

@jennifer-shehane

This PR is trying to run cypress-for-testing using the Cypress Docker image cypress/browsers

This won't work, and is the reason for CI failures, because cypress/browsers only contains Chrome, not Chrome for Testing.

@jennifer-shehane
Copy link
Member Author

@MikeMcC399 Yah I'm a bit confused by these tests - I thought it was meant to test itself - like the install browsers part, but it's just using our browsers image...

@MikeMcC399
Copy link
Collaborator

@jennifer-shehane

This PR is hitting multiple issues including the fact that Cypress doesn't find the Chrome for Testing installation from CircleCI.

This may need fixes in circleci/browser-tools.

I will dig in deeper and report back what I can find out and if I have any suggestions.

@MikeMcC399
Copy link
Collaborator

Cypress runs by default in the Electron browser. Use this flag to install additional browsers to run your tests in.
This is only needed if you are passing the `--browser` flag in your `cypress-command`.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome and FireFox.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for testing, FireFox, and Edge.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for testing, FireFox, and Edge.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for Testing, FireFox, and Edge.

https://developer.chrome.com/blog/chrome-for-testing/ brands it as "Chrome for Testing"

Cypress runs by default in the Electron browser. Use this flag to install additional browsers to run your tests in.
This is only needed if you are passing the `--browser` flag in your `cypress-command`.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome and FireFox.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for testing, FireFox and Edge.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for testing, FireFox and Edge.
This parameter leverages the `circleci/browser-tools` orb and includes Chrome, Chrome for Testing, FireFox and Edge.

Comment on lines 38 to 39
docker:
- image: cypress/browsers:22.16.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker:
- image: cypress/browsers:22.16.0
executor:
name: cypress/default

run-ct-tests-in-chrome:
executor:
name: cypress/default
node-version: "22.14.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe delete this line and take the default node-version ?

MikeMcC399

This comment was marked as outdated.

orbs:
node: circleci/node@7
browser-tools: circleci/browser-tools@1.5.3
browser-tools: circleci/browser-tools@2.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
browser-tools: circleci/[email protected].0
browser-tools: circleci/[email protected].1

This is the minimum version required that allows Cypress to detect Chrome for Testing.
See https://github.com/CircleCI-Public/browser-tools-orb/releases/tag/v2.1.1

MikeMcC399

This comment was marked as outdated.

- browser-tools/install-browser-tools
- browser-tools/install_browser_tools:
install_chrome_for_testing: true
install_chrome_for_testing_driver: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
install_chrome_for_testing_driver: true
install_edge: true

The driver isn't needed, however Edge is missing

@MikeMcC399
Copy link
Collaborator

I suggest to close this PR as there are / were several issues with it and it would be tricky to fix everything here in a transparent way that lends itself to reviewing. Instead, I'm two thirds into replacing it with:

and I would follow up with a final PR to add Chrome for Testing.

The remaining issue is that in https://github.com/cypress-io/circleci-orb/blob/master/.circleci/test-deploy.yml the install-and-persist job doesn't persist browser installations, so you either test in Docker, which means you're not testing the install browser functionality of the orb, or you need to manually install any necessary browser in each test job.

The CircleCI issue preventing Chrome for Testing from being used by Cypress was resolved in CircleCI-Public/browser-tools-orb#141

In parallel I'm also submitting some PRs to the https://github.com/CircleCI-Public/browser-tools-orb to fix their documentation.

@MikeMcC399
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update browser-tools orb to v2 (support for chrome for testing + edge browsers)

3 participants