Skip to content

Commit

Permalink
test: add new system test for --headless=old (#27834)
Browse files Browse the repository at this point in the history
  • Loading branch information
mschile authored Sep 19, 2023
1 parent 343097b commit 2247ffd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions system-tests/projects/e2e/cypress/e2e/headless_old.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe('e2e headless old spec', function () {
it('has expected launch args', function () {
cy.task('get:browser:args').should('contain', '--headless=old')
})
})
11 changes: 11 additions & 0 deletions system-tests/projects/e2e/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,17 @@ module.exports = (on, config) => {
}

if (browser.family === 'chromium' && browser.name !== 'electron') {
if (process.env.CHROMIUM_USE_HEADLESS_OLD) {
options.args = options.args.map((arg) => {
// ensure we are using --headless=old by overriding both headless new and default
if (arg === '--headless' || arg === '--headless=new') {
return '--headless=old'
}

return arg
})
}

if (process.env.CHROMIUM_EXTRA_LAUNCH_ARGS) {
options.args = options.args.concat(process.env.CHROMIUM_EXTRA_LAUNCH_ARGS.split(' '))
}
Expand Down
13 changes: 13 additions & 0 deletions system-tests/test/headless_old_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const systemTests = require('../lib/system-tests').default

describe('e2e', () => {
systemTests.setup()

systemTests.it('succeeds using --headless=old', {
spec: 'headless_old.cy.js',
browser: 'chrome',
processEnv: {
CHROMIUM_USE_HEADLESS_OLD: 1,
},
})
})

4 comments on commit 2247ffd

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 2247ffd Sep 19, 2023

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/linux-x64/develop-2247ffd79b226a7fe00dd3252020becf2c22b110/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 2247ffd Sep 19, 2023

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/linux-arm64/develop-2247ffd79b226a7fe00dd3252020becf2c22b110/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 2247ffd Sep 19, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/darwin-x64/develop-2247ffd79b226a7fe00dd3252020becf2c22b110/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 2247ffd Sep 19, 2023

Choose a reason for hiding this comment

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

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.3.0/win32-x64/develop-2247ffd79b226a7fe00dd3252020becf2c22b110/cypress.tgz

Please sign in to comment.