Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: uncomment more cookies tests
Pavel Feldman505c9e366060
diff --git a/src/webkit/Browser.ts b/src/webkit/Browser.tsindex 9ea7af0b8c..4e40f86e08 100644--- a/src/webkit/Browser.ts+++ b/src/webkit/Browser.ts@@ -24,6 +24,7 @@ import { Events } from './events';import { Page, Viewport } from './Page';import { Target } from './Target';import { TaskQueue } from './TaskQueue';+import { Protocol } from './protocol';export class Browser extends EventEmitter {_defaultViewport: Viewport;@@ -272,7 +273,7 @@ export class BrowserContext extends EventEmitter {async setCookies(cookies: SetNetworkCookieParam[]) {cookies = rewriteCookies(cookies);- const cc = cookies.map(c => ({ ...c, session: c.expires === -1 || c.expires === undefined }));+ const cc = cookies.map(c => ({ ...c, session: c.expires === -1 || c.expires === undefined })) as Protocol.Browser.SetCookieParam[];await this._browser._connection.send('Browser.setCookies', { cookies: cc, browserContextId: this._id });}diff --git a/test/defaultbrowsercontext.spec.js b/test/defaultbrowsercontext.spec.jsindex 1b0ab310f6..eb232de6c9 100644--- a/test/defaultbrowsercontext.spec.js+++ b/test/defaultbrowsercontext.spec.js@@ -14,7 +14,7 @@* limitations under the License.*/-module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) {+module.exports.addTests = function ({ testRunner, expect, defaultBrowserOptions, playwright }) {const {describe, xdescribe, fdescribe} = testRunner;const {it, fit, xit} = testRunner;const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;@@ -40,14 +40,13 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, pdomain: 'localhost',path: '/',expires: -1,- size: 16,httpOnly: false,secure: false,session: true,sameSite: 'None',}]);});- it.skip(WEBKIT)('context.setCookies() should work', async({page, server}) => {+ it('context.setCookies() should work', async({page, server}) => {await page.goto(server.EMPTY_PAGE);await page.browserContext().setCookies([{url: server.EMPTY_PAGE,@@ -61,14 +60,13 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, pdomain: 'localhost',path: '/',expires: -1,- size: 16,httpOnly: false,secure: false,session: true,sameSite: 'None',}]);});- it.skip(WEBKIT)('context.clearCookies() should work', async({page, server}) => {+ it('context.clearCookies() should work', async({page, server}) => {await page.goto(server.EMPTY_PAGE);await page.browserContext().setCookies([{url: server.EMPTY_PAGE,