mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: update expectation after webkit roll (#14718)
This commit is contained in:
parent
6c739eb345
commit
21d570f62e
@ -192,7 +192,7 @@ test('should respect context options in various contexts', async ({ runInlineTes
|
|||||||
import rimraf from 'rimraf';
|
import rimraf from 'rimraf';
|
||||||
|
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
test.use({ locale: 'fr-CH' });
|
test.use({ locale: 'fr-FR' });
|
||||||
|
|
||||||
let context;
|
let context;
|
||||||
test.beforeAll(async ({ browser }) => {
|
test.beforeAll(async ({ browser }) => {
|
||||||
@ -206,19 +206,19 @@ test('should respect context options in various contexts', async ({ runInlineTes
|
|||||||
test('shared context', async ({}) => {
|
test('shared context', async ({}) => {
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-FR');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('own context', async ({ browser }) => {
|
test('own context', async ({ browser }) => {
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-FR');
|
||||||
await page.close();
|
await page.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('default context', async ({ page }) => {
|
test('default context', async ({ page }) => {
|
||||||
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-FR');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('persistent context', async ({ playwright, browserName }) => {
|
test('persistent context', async ({ playwright, browserName }) => {
|
||||||
@ -227,7 +227,7 @@ test('should respect context options in various contexts', async ({ runInlineTes
|
|||||||
const page = context.pages()[0];
|
const page = context.pages()[0];
|
||||||
|
|
||||||
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
expect(page.viewportSize()).toEqual({ width: 500, height: 500 });
|
||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-FR');
|
||||||
|
|
||||||
await context.close();
|
await context.close();
|
||||||
rimraf.sync(dir);
|
rimraf.sync(dir);
|
||||||
@ -237,7 +237,7 @@ test('should respect context options in various contexts', async ({ runInlineTes
|
|||||||
const browser = await playwright.webkit.launch();
|
const browser = await playwright.webkit.launch();
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
|
|
||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-FR');
|
||||||
|
|
||||||
await browser.close();
|
await browser.close();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user