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
fix(tests): fix selenium installation tests
Pavel Feldmana4a2d41705ce
diff --git a/tests/components/test-all.spec.js b/tests/components/test-all.spec.jsindex 219965ea68..23ed35638c 100644--- a/tests/components/test-all.spec.js+++ b/tests/components/test-all.spec.js@@ -9,14 +9,13 @@ for (const dir of fs.readdirSync(__dirname)) {if (!fs.statSync(folder).isDirectory())continue;test.describe.serial(path.basename(folder), () => {- test.setTimeout(120000);+ test.setTimeout(180000);test('install', async () => {await run('npm', ['i'], folder);});for (const project of ['chromium', 'firefox', 'webkit']) {test(project, async () => {- test.setTimeout(120000);await run('npx', ['playwright', 'test', '--project=' + project, '--reporter=list'], folder);});}diff --git a/tests/library/browsertype-launch-selenium.spec.ts b/tests/library/browsertype-launch-selenium.spec.tsindex 0ce1cfba30..345c8dee5f 100644--- a/tests/library/browsertype-launch-selenium.spec.ts+++ b/tests/library/browsertype-launch-selenium.spec.ts@@ -21,12 +21,12 @@ import fs from 'fs';import { start } from '../../packages/playwright-core/lib/outofprocess';const chromeDriver = process.env.PWTEST_CHROMEDRIVER;-const brokenDriver = path.join(__dirname, 'assets', 'selenium-grid', 'broken-selenium-driver.js');-const standalone_3_141_59 = path.join(__dirname, 'assets', 'selenium-grid', 'selenium-server-standalone-3.141.59.jar');-const selenium_4_0_0_rc1 = path.join(__dirname, 'assets', 'selenium-grid', 'selenium-server-4.0.0-rc-1.jar');+const brokenDriver = path.join(__dirname, '..', 'assets', 'selenium-grid', 'broken-selenium-driver.js');+const standalone_3_141_59 = path.join(__dirname, '..', 'assets', 'selenium-grid', 'selenium-server-standalone-3.141.59.jar');+const selenium_4_0_0_rc1 = path.join(__dirname, '..', 'assets', 'selenium-grid', 'selenium-server-4.0.0-rc-1.jar');function writeSeleniumConfig(testInfo: TestInfo, port: number) {- const template = path.join(__dirname, 'assets', 'selenium-grid', `selenium-config-standalone.json`);+ const template = path.join(__dirname, '..', 'assets', 'selenium-grid', `selenium-config-standalone.json`);const content = fs.readFileSync(template, 'utf8').replace(/4444/g, String(port));const file = testInfo.outputPath(`selenium-config-standalone.json`);fs.writeFileSync(file, content, 'utf8');diff --git a/tests/library/role-utils.spec.ts b/tests/library/role-utils.spec.tsindex e61cab7f24..6f0ecfe8ce 100644--- a/tests/library/role-utils.spec.ts+++ b/tests/library/role-utils.spec.ts@@ -17,6 +17,8 @@import { contextTest as test, expect } from '../config/browserTest';import fs from 'fs';+test.skip(({ mode }) => mode !== 'default');+test('wpt accname', async ({ page, asset, server, browserName }) => {const skipped = [// Spec clearly says to only use control's value when embedded in a label (step 2C).