How to use the @wordpress/e2e-test-utils.setBrowserViewport function in @wordpress/e2e-test-utils

To help you get started, we’ve selected a few @wordpress/e2e-test-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / site-kit-wp / tests / e2e / config / bootstrap.js View on Github external
beforeAll( async () => {
	capturePageEventsForTearDown();
	optOutOfEventTracking();
	enablePageDialogAccept();
	observeConsoleLogging();
	if ( '1' === process.env.DEBUG_REST ) {
		page.on( 'request', observeRestRequest );
		page.on( 'response', observeRestResponse );
	}
	await setBrowserViewport( 'large' );

	await deactivateAllOtherPlugins();
	await resetSiteKit();
} );
github liip / bootstrap-blocks-wordpress-plugin / e2e-tests / setup-test-framework.js View on Github external
async function setupBrowser() {
	await setBrowserViewport( 'large' );
}
github getblocklab / block-lab / tests / e2e / config / setup-test-framework.js View on Github external
async function setupBrowser() {
	await setBrowserViewport( 'large' );
}
github Automattic / jetpack / tests / e2e / lib / setup-env.js View on Github external
async function setupBrowser() {
	const userAgent = await browser.userAgent();
	await page.setUserAgent( userAgent + ' wp-e2e-tests' );
	await setBrowserViewport( 'large' );
}
github Automattic / Edit-Flow / tests / e2e / config / setup-test-framework.js View on Github external
async function setupBrowser() {
	await clearLocalStorage();
	await setBrowserViewport( 'large' );
}
github WordPress / gutenberg / packages / e2e-tests / config / setup-test-framework.js View on Github external
async function setupBrowser() {
	await clearLocalStorage();
	await setBrowserViewport( 'large' );
}
github intraxia / wp-gistpen / e2e / setupTests.ts View on Github external
beforeAll(async () => {
  await Promise.all([
    (async () => {
      await resetSite();
      await execa.command(`npm run env cli rewrite structure /%POSTNAME%/`);
    })(),
    setBrowserViewport('large'),
  ]);

  await activatePlugin('wp-gistpen');
});