chore: use stable library along with the test runner in ttest (#33312)

This commit is contained in:
Pavel Feldman 2024-10-25 23:15:10 -07:00 committed by GitHub
parent 88c42f7887
commit 4b7c8d8a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 29 deletions

View File

@ -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=="
}
}
}

View File

@ -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"
}
}

View File

@ -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 = base
cwd: 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 {