test(webkit): uncomment clearCookies test w/ right expectations
This commit is contained in:
parent
d08a0f02ce
commit
401a916732
|
|
@ -72,7 +72,7 @@ module.exports.describe = function ({ testRunner, expect, defaultBrowserOptions,
|
||||||
sameSite: 'None',
|
sameSite: 'None',
|
||||||
}]);
|
}]);
|
||||||
});
|
});
|
||||||
it.fail(WEBKIT)('context.clearCookies() should work', async({page, server}) => {
|
it('context.clearCookies() should work', async({page, server}) => {
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
await page.context().setCookies([{
|
await page.context().setCookies([{
|
||||||
url: server.EMPTY_PAGE,
|
url: server.EMPTY_PAGE,
|
||||||
|
|
@ -85,6 +85,8 @@ module.exports.describe = function ({ testRunner, expect, defaultBrowserOptions,
|
||||||
}]);
|
}]);
|
||||||
expect(await page.evaluate('document.cookie')).toBe('cookie1=1; cookie2=2');
|
expect(await page.evaluate('document.cookie')).toBe('cookie1=1; cookie2=2');
|
||||||
await page.context().clearCookies();
|
await page.context().clearCookies();
|
||||||
|
await page.reload();
|
||||||
|
expect(await page.context().cookies([])).toEqual([]);
|
||||||
expect(await page.evaluate('document.cookie')).toBe('');
|
expect(await page.evaluate('document.cookie')).toBe('');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue