Daily Shaarli

All links of one day in a single page.

January 6, 2023

Screenshots taken during 'cypress run' do not respect the viewport size set

In cypress.config.ts, property e2e.setupNodeEvents for a screen 1920x1080 :

on('before:browser:launch', (browser = {}, args) => {
    if (browser.name === 'chrome') {
        args.push('--window-size=1920,1080')
        return args
    }
})

This goes for chrome, but there also a workaround for Electron: https://github.com/cypress-io/cypress/issues/2102#issuecomment-692585453