-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the config for timeout errors (#355)
* update the config * updating wait * update lines * network idle * page load time * skipping merch card tests in headless mode for chrome browser * update htmlextn feature test for http2 error for chrome * updating the workers * removing saucectl on pr * fixing eslint erros * update htmlextn * update eslint in config.js * fix config.js, eslint errors * fix eslint errors * add timout for video mpc button --------- Co-authored-by: nateekar <[email protected]>
- Loading branch information
Showing
7 changed files
with
339 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,54 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { features } from '../../features/milo/htmlextn.spec.js' | ||
import { features } from '../../features/milo/htmlextn.spec.js'; | ||
|
||
const envList = require('../../envs/envs.js'); | ||
const miloLibs = process.env.MILO_LIBS || ''; | ||
|
||
test.describe('Milo Html Extension feature test suite', () => { | ||
|
||
// Test 0 : Html Extension validation for bacom | ||
test(`${features[0].name},${features[0].tags}`, async ({ page }) => { | ||
test(`${features[0].name},${features[0].tags}`, async ({ page, browserName }) => { | ||
const paths = features[0].path; | ||
const env = features[0].envs; | ||
|
||
|
||
if (browserName === 'chromium') { | ||
test.skip('Skipping test for Chrome browser : net::ERR_HTTP2_PROTOCOL_ERROR.'); | ||
} | ||
|
||
await test.step('step-1: Go to test page urls and verify .html', async () => { | ||
for (const path of paths) { | ||
console.info('[Test Page]\n:', envList[env]+`${path}`); | ||
const url = envList[env]+ path; | ||
await page.goto(url); | ||
await page.waitForLoadState('domcontentloaded'); | ||
console.info('[Test Page]\n:', `${envList[env]}${path}`); | ||
|
||
const url = envList[env] + path; | ||
await page.goto(url); | ||
await page.waitForLoadState('networkidle'); | ||
|
||
if (!page.url().match(/@blog/) && (page.url().match(/customer-success-stories/))) { | ||
expect(page.url()).toContain('.html'); | ||
} else { | ||
expect(page.url()).toContain('.html'); | ||
} else { | ||
await expect(page).toHaveURL(url); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
// Test 1 : Html Extension validation for blog | ||
test(`${features[1].name},${features[1].tags}`, async ({ page }) => { | ||
test(`${features[1].name},${features[1].tags}`, async ({ page }) => { | ||
const paths = features[1].path; | ||
const env = features[1].envs; | ||
|
||
await test.step('step-1: Go to test page urls and verify .html', async () => { | ||
for (const path of paths) { | ||
console.info('[Test Page]\n:', envList[env]+`${path}`); | ||
const url = envList[env]+ path; | ||
console.info('[Test Page]\n:', `${envList[env]}${path}`); | ||
|
||
const url = envList[env] + path; | ||
await page.goto(url); | ||
await page.waitForLoadState('domcontentloaded'); | ||
await page.waitForLoadState('networkidle'); | ||
|
||
if (!page.url().match(/@blog/) && (page.url().match(/customer-success-stories/))) { | ||
expect(page.url()).toContain('.html'); | ||
} else { | ||
expect(page.url()).toContain('.html'); | ||
} else { | ||
await expect(page).toHaveURL(url); | ||
} | ||
} | ||
} | ||
}); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.