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
chore: use stable library along with the test runner in ttest (#33312)
Pavel Feldman4b7c8d8a2097
diff --git a/tests/playwright-test/stable-test-runner/package-lock.json b/tests/playwright-test/stable-test-runner/package-lock.jsonindex 6b882f8999..9b14a59c90 100644--- a/tests/playwright-test/stable-test-runner/package-lock.json+++ b/tests/playwright-test/stable-test-runner/package-lock.json@@ -5,15 +5,15 @@"packages": {"": {"dependencies": {- "@playwright/test": "1.49.0-alpha-2024-10-25"+ "@playwright/test": "1.49.0-alpha-2024-10-26"}},"node_modules/@playwright/test": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-ds5PrtfECd21uiyVhKFOns0B2QdbQrxTYZSJQYCKcjomH3i6Fu0ZgPMe8Fh/6Nnx1vYUv9P6XWsHdkSHF2IZVA==",+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-EUl8wIsAWVJJlX2ynKdY1KxRs44Yz9MPDmN8AH6HIdwazSRe1ML46kaM3V49gQvMVMo5JZfuXnRzbtYDMFpKYA==","dependencies": {- "playwright": "1.49.0-alpha-2024-10-25"+ "playwright": "1.49.0-alpha-2024-10-26"},"bin": {"playwright": "cli.js"@@ -36,11 +36,11 @@}},"node_modules/playwright": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-D8hV9H9MARk2ZyOO0/ivoRYXqBcsXnKsDzTLpiF5HIiweGIlxdiDcRQhelNAdfnxa01oAy+Qosu7Dsoy/RYWBw==",+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-1qh/6z4UdWv7qMocNQmUMbvZAXzzS93jckUzjGr0mWMn9rs4QavHhuK0s2HIS0hLB+t5T1+NBUpHudWzeasudA==","dependencies": {- "playwright-core": "1.49.0-alpha-2024-10-25"+ "playwright-core": "1.49.0-alpha-2024-10-26"},"bin": {"playwright": "cli.js"@@ -53,9 +53,9 @@}},"node_modules/playwright-core": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-zHESnOKxzkEwUpi391rHnnBR0D+dkn6Oto5L9SqrBgOIhYUm7fnIywXk8FWq/uRDtlTH1RaGh0H1aAoPvVuW1w==",+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-ELIdRRHkdzkHP7siPcFSE9jBLRnDHE1l3UigIgEzVN9o34yGBgH8TAkC2uK1M8Jrkomc3jKQm5faiBsimu0XEQ==","bin": {"playwright-core": "cli.js"},@@ -66,11 +66,11 @@},"dependencies": {"@playwright/test": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-ds5PrtfECd21uiyVhKFOns0B2QdbQrxTYZSJQYCKcjomH3i6Fu0ZgPMe8Fh/6Nnx1vYUv9P6XWsHdkSHF2IZVA==",+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-EUl8wIsAWVJJlX2ynKdY1KxRs44Yz9MPDmN8AH6HIdwazSRe1ML46kaM3V49gQvMVMo5JZfuXnRzbtYDMFpKYA==","requires": {- "playwright": "1.49.0-alpha-2024-10-25"+ "playwright": "1.49.0-alpha-2024-10-26"}},"fsevents": {@@ -80,18 +80,18 @@"optional": true},"playwright": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-D8hV9H9MARk2ZyOO0/ivoRYXqBcsXnKsDzTLpiF5HIiweGIlxdiDcRQhelNAdfnxa01oAy+Qosu7Dsoy/RYWBw==",+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-1qh/6z4UdWv7qMocNQmUMbvZAXzzS93jckUzjGr0mWMn9rs4QavHhuK0s2HIS0hLB+t5T1+NBUpHudWzeasudA==","requires": {"fsevents": "2.3.2",- "playwright-core": "1.49.0-alpha-2024-10-25"+ "playwright-core": "1.49.0-alpha-2024-10-26"}},"playwright-core": {- "version": "1.49.0-alpha-2024-10-25",- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-alpha-2024-10-25.tgz",- "integrity": "sha512-zHESnOKxzkEwUpi391rHnnBR0D+dkn6Oto5L9SqrBgOIhYUm7fnIywXk8FWq/uRDtlTH1RaGh0H1aAoPvVuW1w=="+ "version": "1.49.0-alpha-2024-10-26",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-alpha-2024-10-26.tgz",+ "integrity": "sha512-ELIdRRHkdzkHP7siPcFSE9jBLRnDHE1l3UigIgEzVN9o34yGBgH8TAkC2uK1M8Jrkomc3jKQm5faiBsimu0XEQ=="}}}diff --git a/tests/playwright-test/stable-test-runner/package.json b/tests/playwright-test/stable-test-runner/package.jsonindex 1d17874a75..93ee2dba85 100644--- a/tests/playwright-test/stable-test-runner/package.json+++ b/tests/playwright-test/stable-test-runner/package.json@@ -1,6 +1,6 @@{"private": true,"dependencies": {- "@playwright/test": "1.49.0-alpha-2024-10-25"+ "@playwright/test": "1.49.0-alpha-2024-10-26"}}diff --git a/tests/playwright-test/ui-mode-fixtures.ts b/tests/playwright-test/ui-mode-fixtures.tsindex 7ae98bb662..d0a508da77 100644--- a/tests/playwright-test/ui-mode-fixtures.ts+++ b/tests/playwright-test/ui-mode-fixtures.ts@@ -20,7 +20,8 @@ import * as path from 'path';import type { TestChildProcess } from '../config/commonFixtures';import { cleanEnv, cliEntrypoint, test as base, writeFiles, removeFolders } from './playwright-test-fixtures';import type { Files, RunOptions } from './playwright-test-fixtures';-import type { Browser, BrowserType, Page, TestInfo } from './stable-test-runner';+import type { Browser, Page, TestInfo } from './stable-test-runner';+import { chromium } from './stable-test-runner';import { createGuid } from '../../packages/playwright-core/src/utils/crypto';type Latch = {@@ -106,14 +107,13 @@ export const test = basecwd: options.cwd ? path.resolve(baseDir, options.cwd) : baseDir,});let page: Page;- // We want to have ToT playwright-core here, since we install it's browsers and otherwise- // don't have the right browser revision (ToT revisions != stable-test-runner revisions).- const chromium: BrowserType = require('../../packages/playwright-core').chromium;+ // Use the browser from ToT so that we don't need to install a stable test runner one.+ const executablePath = require('../../packages/playwright-core').chromium.executablePath();if (options.useWeb) {await testProcess.waitForOutput('Listening on');const line = testProcess.output.split('\n').find(l => l.includes('Listening on'));const uiAddress = line!.split(' ')[2];- browser = await chromium.launch();+ browser = await chromium.launch({ executablePath });page = await browser.newPage();await page.goto(uiAddress);} else {