From 823a7a517ef20121a0a127da5609c241b075d4f6 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 16 Sep 2020 10:04:39 -0700 Subject: [PATCH] test: roll test runner to 0.3.12 (#3895) --- package-lock.json | 18 +++++++++--------- package.json | 2 +- test/playwright.fixtures.ts | 7 ++++++- test/setup.ts | 19 ------------------- 4 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 test/setup.ts diff --git a/package-lock.json b/package-lock.json index 76063fad7f..1727c91066 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1187,9 +1187,9 @@ } }, "@playwright/test-runner": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.3.11.tgz", - "integrity": "sha512-EG3ou/aR0N2F5is7hOYIWMbvESB3TQ9IYqakt/7baEO6NmUftqO61wQAKxczx1hPGP12TJq01U97RW+ZGviiBw==", + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.3.12.tgz", + "integrity": "sha512-U2o5LbZBDNiVUQcxTH5AKyhy6Jqq+TrLkjH1JkRqj7YyYBZCzsi5fwrpooDnfZNLCTVkFl10L0kTkjBYpGJBJg==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", @@ -2306,9 +2306,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001129", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001129.tgz", - "integrity": "sha512-9945fTVKS810DZITpsAbuhQG7Lam0tEfVbZlsBaCFZaszepbryrArS05PWmJSBQ6mta+v9iz0pUIAbW1eBILIg==", + "version": "1.0.30001131", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001131.tgz", + "integrity": "sha512-4QYi6Mal4MMfQMSqGIRPGbKIbZygeN83QsWq1ixpUwvtfgAZot5BrCKzGygvZaV+CnELdTwD0S4cqUNozq7/Cw==", "dev": true }, "caseless": { @@ -2988,9 +2988,9 @@ } }, "electron-to-chromium": { - "version": "1.3.567", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.567.tgz", - "integrity": "sha512-1aKkw0Hha1Bw9JA5K5PT5eFXC/TXbkJvUfNSNEciPUMgSIsRJZM1hF2GUEAGZpAbgvd8En21EA+Lv820KOhvqA==", + "version": "1.3.569", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.569.tgz", + "integrity": "sha512-HViXDebvp9yx3GHjNmMEzfl7RhE1N+r+4iHmRAswpwWTtf/UaYi4QGSfjOhYn5MACiONjh9+XwZzHA6NccAEtQ==", "dev": true }, "elliptic": { diff --git a/package.json b/package.json index b06274345e..1bcc55f11f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ws": "^7.3.1" }, "devDependencies": { - "@playwright/test-runner": "^0.3.11", + "@playwright/test-runner": "^0.3.12", "@types/debug": "^4.1.5", "@types/extract-zip": "^1.6.2", "@types/mime": "^2.0.3", diff --git a/test/playwright.fixtures.ts b/test/playwright.fixtures.ts index a4f854f208..8dc5434398 100644 --- a/test/playwright.fixtures.ts +++ b/test/playwright.fixtures.ts @@ -58,7 +58,7 @@ const fixtures = baseFixtures .declareParameters() .declareWorkerFixtures() .declareTestFixtures(); -const { defineTestFixture, defineWorkerFixture, defineParameter } = fixtures; +const { defineTestFixture, defineWorkerFixture, defineParameter, generateParametrizedTests } = fixtures; export const playwrightFixtures = fixtures; export const it = fixtures.it; @@ -192,6 +192,11 @@ defineWorkerFixture('browserType', async ({playwright, browserName}, test) => { defineParameter('browserName', 'Browser type name', ''); +generateParametrizedTests( + 'browserName', + process.env.BROWSER ? [process.env.BROWSER] : ['chromium', 'webkit', 'firefox']); + + defineWorkerFixture('isChromium', async ({browserName}, test) => { await test(browserName === 'chromium'); }); diff --git a/test/setup.ts b/test/setup.ts deleted file mode 100644 index 280565567b..0000000000 --- a/test/setup.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Copyright Microsoft Corporation. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(global as any).setParameterValues( - 'browserName', - process.env.BROWSER ? [process.env.BROWSER] : ['chromium', 'webkit', 'firefox']);