Impossible to activate headed mode
Hi, It seems impossible to activate headed mode with Cypress (8.0) and its Github action. Look at https://github.com/nboisteault/lizmap-web-client/runs/3134874027?check_suite_focus=true#step:9:5 , I did put :
headless: false
headed: true
But action is ran headless : https://github.com/nboisteault/lizmap-web-client/runs/3134874027?check_suite_focus=true#step:9:51
Thanks for you help.
Seeing the same issue. It's especially annoying when running visual regression tests, because headed vs headless renderings of the same page/ component are different. Same goes for using the clipboard which is unavailable in headless Chrome.
From what I see in the code it doesn't even look for the headed prop:
const headless = getInputBool('headless')
+1
realized this today after trying headless: false and seeing it still run in headless mode. seems misleading to me if the headless option is always the default anyway, would really appreciate a headed option
update: as a workaround i was able to get headed mode working by using the command option
- name: Install Cypress and run tests
uses: cypress-io/github-action@v2
with:
command: yarn cypress run --headed --browser chrome
Thank you, @andrewalc!
A little hint for anyone coming here in the future, you still need to specify the build and start commands:
uses: cypress-io/github-action@v2
with:
build: npm run build
start: npm start
command: yarn cypress run --headed --browser chrome
I noticed the same.
- name: 'Run end-to-end tests'
id: cypress
timeout-minutes: 15
uses: cypress-io/github-action@v5 # see https://github.com/cypress-io/github-action/issues/620
env:
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu' # see https://github.com/cypress-io/cypress/issues/25357
with:
working-directory: 'e2e-tests'
config: 'specPattern="**/*.cy.ts"'
env: 'host="${{ steps.setup.outputs.deployment_url }}",username="${{ steps.setup.outputs.deployment_username }}",password="${{ steps.setup.outputs.deployment_password }}"'
browser: '${{ steps.setup.outputs.browser }}'
headed: false
Run cypress-io/github-action@v5
with:
working-directory: ***-tests
config: specPattern="**/*.cy.ts"
env: host="***",username="***",***
browser: edge
headed: false
record: false
publish-summary: true
component: false
env:
ELECTRON_EXTRA_LAUNCH_ARGS: --disable-gpu
(...)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 12.17.1 │
│ Browser: Edge 114 (headless) │
│ Node Version: v16.16.0 (/home/runner/runners/2.305.0/externals/node16/bin/node) │
│ Specs: 6 found (login/login-message.cy.ts, login/login.cy.ts, login/reset-password.cy │
│ .ts, specifications/specifications.cy.ts, wizards/quick-start/quick-start-wiza │
│ rd.cy.ts, wizards/welcome/welcome-wizard.cy.ts) │
│ Searched: **/*.cy.ts │
│ Experiments: experimentalMemoryManagement=true,experimentalWebKitSupport=true │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
@ricardo-dematos
I don't see any remaining problem with github-action@v5 using the option headed: true or headed: false.
Could you please explain what you think should be different?
In your example you specified headed: false and Cypress ran headless, which is correct.
@ricardo-dematos
I don't see any remaining problem with
github-action@v5using the optionheaded: trueorheaded: false.Could you please explain what you think should be different?
In your example you specified
headed: falseand Cypress ranheadless, which is correct.
You are absolutely correct! I misinterpreted the action option. :shame:
Should I delete these messages, to avoid confusing other users?
@ricardo-dematos
You are absolutely correct! I misinterpreted the action option. :shame:
Should I delete these messages, to avoid confusing other users?
Since you have commented on this stale issue it has become reactivated in the triage process.
I did check that headed: true and headed: false work as expected with Edge and the workflow to prove it is on https://github.com/MikeMcC399/github-action/actions/runs/5521971740
So I suggest to leave your comments and wait for a member of the Cypress team to pick up this issue.
My recommendation would be to close this issue as it is resolved and no longer reproducible.
Closing as resolved