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