mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-10 12:57:42 +03:00
test(firefox): enable locale tests (#1562)
This commit is contained in:
parent
4826b3aca5
commit
59fa2cba90
@ -9,7 +9,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"playwright": {
|
"playwright": {
|
||||||
"chromium_revision": "751710",
|
"chromium_revision": "751710",
|
||||||
"firefox_revision": "1059",
|
"firefox_revision": "1061",
|
||||||
"webkit_revision": "1182"
|
"webkit_revision": "1182"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -322,7 +322,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
|
|||||||
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
|
||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
it.fail(FFOX)('should format number', async({browser, server}) => {
|
it('should format number', async({browser, server}) => {
|
||||||
{
|
{
|
||||||
const context = await browser.newContext({ locale: 'en-US' });
|
const context = await browser.newContext({ locale: 'en-US' });
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
@ -356,7 +356,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
|
|||||||
await context.close();
|
await context.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
it.fail(FFOX)('should format number in popups', async({browser, server}) => {
|
it('should format number in popups', async({browser, server}) => {
|
||||||
const context = await browser.newContext({ locale: 'fr-CH' });
|
const context = await browser.newContext({ locale: 'fr-CH' });
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
@ -131,5 +131,16 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT,
|
|||||||
expect(response.request()).toBe(request);
|
expect(response.request()).toBe(request);
|
||||||
expect(response.ok()).toBe(true);
|
expect(response.ok()).toBe(true);
|
||||||
});
|
});
|
||||||
|
it('should format number using context locale', async({browser, server}) => {
|
||||||
|
const context = await browser.newContext({ locale: 'ru-RU' });
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
const [worker] = await Promise.all([
|
||||||
|
page.waitForEvent('worker'),
|
||||||
|
page.evaluate(() => new Worker(URL.createObjectURL(new Blob(['console.log(1)'], {type: 'application/javascript'})))),
|
||||||
|
]);
|
||||||
|
expect(await worker.evaluate(() => (10000.20).toLocaleString())).toBe('10\u00A0000,2');
|
||||||
|
await context.close();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user