Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
} );
async function setupBrowser() {
await setBrowserViewport( 'large' );
}
async function setupBrowser() {
await setBrowserViewport( 'large' );
}
async function setupBrowser() {
const userAgent = await browser.userAgent();
await page.setUserAgent( userAgent + ' wp-e2e-tests' );
await setBrowserViewport( 'large' );
}
async function setupBrowser() {
await clearLocalStorage();
await setBrowserViewport( 'large' );
}
async function setupBrowser() {
await clearLocalStorage();
await setBrowserViewport( 'large' );
}
beforeAll(async () => {
await Promise.all([
(async () => {
await resetSite();
await execa.command(`npm run env cli rewrite structure /%POSTNAME%/`);
})(),
setBrowserViewport('large'),
]);
await activatePlugin('wp-gistpen');
});