fix(permissions): fix notifications permissions on firefox (#1531)

This commit is contained in:
Pavel Feldman 2020-03-25 11:52:50 -07:00 committed by GitHub
parent 6be3634356
commit ef9e04d399
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@
"main": "index.js",
"playwright": {
"chromium_revision": "751710",
"firefox_revision": "1054",
"firefox_revision": "1056",
"webkit_revision": "1182"
},
"scripts": {

View file

@ -52,19 +52,19 @@ module.exports.describe = function({testRunner, expect, WEBKIT, FFOX}) {
await context.grantPermissions(['geolocation'], { origin: server.EMPTY_PAGE });
expect(await getPermission(page, 'geolocation')).toBe('granted');
});
it.fail(FFOX)('should grant notifications permission when listed', async({page, server, context}) => {
it('should grant notifications permission when listed', async({page, server, context}) => {
await page.goto(server.EMPTY_PAGE);
await context.grantPermissions(['notifications'], { origin: server.EMPTY_PAGE });
expect(await getPermission(page, 'notifications')).toBe('granted');
});
it.fail(FFOX)('should accumulate when adding', async({page, server, context}) => {
it('should accumulate when adding', async({page, server, context}) => {
await page.goto(server.EMPTY_PAGE);
await context.grantPermissions(['geolocation']);
await context.grantPermissions(['notifications']);
expect(await getPermission(page, 'geolocation')).toBe('granted');
expect(await getPermission(page, 'notifications')).toBe('granted');
});
it.fail(FFOX)('should clear permissions', async({page, server, context}) => {
it('should clear permissions', async({page, server, context}) => {
await page.goto(server.EMPTY_PAGE);
await context.grantPermissions(['geolocation']);
await context.clearPermissions();