What will be the base URL used by Cypress tests if the following cypress.config.js is loaded?
module.exports = { e2e: { baseUrl: 'https://example.com', setupNodeEvents(on, config) { // no changes } } };
Look at the baseUrl property inside the e2e object.
The baseUrl is explicitly set to 'https://example.com' inside the e2e configuration. Cypress uses this as the base URL for all tests.
Given this cypress.config.js snippet, which assertion correctly verifies the viewport width setting?
module.exports = { e2e: { viewportWidth: 1280, viewportHeight: 720 } };
Check the property path and value for viewport width.
The viewportWidth is inside the e2e object and set to 1280. Option C correctly asserts this.
What error will Cypress throw when loading this cypress.config.js?
module.exports = { e2e: { baseUrl: 'https://testsite.com', setupNodeEvents(on, config) { on('before:browser:launch', (browser = {}, launchOptions) => { launchOptions.args.push('--disable-gpu') }); } } };
Check for missing or mismatched brackets and parentheses.
The arrow function passed to on is missing a closing parenthesis and curly brace, causing a syntax error.
What is the effect of setting video: false in the e2e configuration of cypress.config.js?
Think about what the video setting controls in Cypress.
Setting video: false disables recording of videos during test runs, but does not affect screenshots or test execution mode.
Which option correctly configures Cypress to retry failed tests 2 times for e2e tests only?
Retries can be configured globally or per testing type. Here, only e2e tests should retry.
Option B correctly sets retries inside the e2e object with separate values for run and open modes.