Fix cookies test on windows (#772)

The `username` and `password` cookies showed up in the wrong order on Windows, causing the test to fail.
This commit is contained in:
JoelEinbinder 2017-09-13 17:30:25 -07:00 committed by Andrey Lushnikov
parent 010872012f
commit 89e923d5f0

View File

@ -2049,7 +2049,8 @@ describe('Page', function() {
value: '123456' value: '123456'
}); });
expect(await page.evaluate('document.cookie')).toBe('username=John Doe; password=123456'); expect(await page.evaluate('document.cookie')).toBe('username=John Doe; password=123456');
expect(await page.cookies()).toEqual([{ const cookies = await page.cookies();
expect(cookies.sort((a, b) => a.name.localeCompare(b.name))).toEqual([{
name: 'password', name: 'password',
value: '123456', value: '123456',
domain: 'localhost', domain: 'localhost',