chore: skip failing cookie tests in Firefox (#5575)

They fail because cookies in Firefox return a `sameSite` key which the tests don't expect.

This is a solution that at least gets the Travis Firefox build (hopefully!) green again. Longer term it'd be great to allow the assertion to change based on the browser, rather than skip these tests entirely.
This commit is contained in:
Jack Franklin 2020-04-06 09:34:45 +01:00 committed by GitHub
parent 88446df724
commit a99a3cf757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ module.exports.addTests = function({testRunner, expect}) {
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
expect(await page.cookies()).toEqual([]); expect(await page.cookies()).toEqual([]);
}); });
it('should get a cookie', async({page, server}) => { it_fails_ffox('should get a cookie', async({page, server}) => {
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => { await page.evaluate(() => {
document.cookie = 'username=John Doe'; document.cookie = 'username=John Doe';
@ -71,7 +71,7 @@ module.exports.addTests = function({testRunner, expect}) {
expect(cookies.length).toBe(1); expect(cookies.length).toBe(1);
expect(cookies[0].sameSite).toBe('Lax'); expect(cookies[0].sameSite).toBe('Lax');
}); });
it('should get multiple cookies', async({page, server}) => { it_fails_ffox('should get multiple cookies', async({page, server}) => {
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => { await page.evaluate(() => {
document.cookie = 'username=John Doe'; document.cookie = 'username=John Doe';

View File

@ -29,7 +29,7 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p
delete state.browser; delete state.browser;
delete state.page; delete state.page;
}); });
it('page.cookies() should work', async({page, server}) => { it_fails_ffox('page.cookies() should work', async({page, server}) => {
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => { await page.evaluate(() => {
document.cookie = 'username=John Doe'; document.cookie = 'username=John Doe';