Skip to content

Commit

Permalink
try something new
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Sep 21, 2023
1 parent 3522402 commit c4abc6a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })

import '@testing-library/cypress/add-commands';

Cypress.on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args = launchOptions.args.map((arg) => {
if (arg === '--headless') {
return '--headless=new';
}

return arg;
});
}

return launchOptions;
});

0 comments on commit c4abc6a

Please sign in to comment.