From 17621146d37cc2632d343547c3c8cff164fe0b30 Mon Sep 17 00:00:00 2001 From: Gleb Khmyznikov Date: Wed, 13 Dec 2023 21:36:44 +0100 Subject: [PATCH] remove optimizations from other calls --- FindServiceWorker/index.ts | 11 ++++++----- FindWebManifest/index.ts | 11 ++++++----- playwright.config.ts | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/FindServiceWorker/index.ts b/FindServiceWorker/index.ts index 2ba57a5..486f700 100644 --- a/FindServiceWorker/index.ts +++ b/FindServiceWorker/index.ts @@ -61,12 +61,13 @@ const httpTrigger: AzureFunction = async function ( try { page.on('request', (req) => { - if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){ - req.abort(); - } - else { + // commented because it doesn't work on Azure environment + // if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){ + // req.abort(); + // } + // else { req.continue(); - } + // } }); try { diff --git a/FindWebManifest/index.ts b/FindWebManifest/index.ts index 398e9ef..238e3fe 100644 --- a/FindWebManifest/index.ts +++ b/FindWebManifest/index.ts @@ -156,12 +156,13 @@ async function puppeteerAttempt(site: string, context?: Context): Promise<{error try { // speed up loading page.on('request', (req) => { - if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){ - req.abort(); - } - else { + // commented because it doesn't work on Azure environment + // if(SKIP_RESOURCES.some((type) => req.resourceType() == type)){ + // req.abort(); + // } + // else { req.continue(); - } + // } }); // waiting for manifest request or until full page loads diff --git a/playwright.config.ts b/playwright.config.ts index 8db5ad5..965c119 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ - retries: process.env.CI ? 1 : 0, + retries: process.env.CI ? 2 : 2, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */