mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(test): follow up to tests refactoring (#13085)
This commit is contained in:
parent
02cac8a066
commit
a454328c25
@ -22,7 +22,7 @@ async function checkFeatures(name: string, context: any, server: any) {
|
||||
const page = await context.newPage();
|
||||
await page.goto(server.PREFIX + '/modernizr.html');
|
||||
const actual = await page.evaluate('window.report');
|
||||
const expected = JSON.parse(fs.readFileSync(require.resolve(`./assets/modernizr/${name}.json`), 'utf-8'));
|
||||
const expected = JSON.parse(fs.readFileSync(require.resolve(`../assets/modernizr/${name}.json`), 'utf-8'));
|
||||
return { actual, expected };
|
||||
} finally {
|
||||
await context.close();
|
||||
|
@ -95,7 +95,7 @@ async function runWatch() {
|
||||
if (onChange.script)
|
||||
child_process.spawnSync('node', [onChange.script], { stdio: 'inherit' });
|
||||
else
|
||||
child_process.spawnSync(onChange.command, onChange.args || [], { stdio: 'inherit', cwd: onChange.cwd });
|
||||
child_process.spawnSync(onChange.command, onChange.args || [], { stdio: 'inherit', cwd: onChange.cwd, shell: true });
|
||||
}
|
||||
// chokidar will report all files as added in a sync loop, throttle those.
|
||||
const reschedule = () => {
|
||||
@ -166,7 +166,7 @@ async function runBuild() {
|
||||
if (onChange.script)
|
||||
runStep({ command: 'node', args: [filePath(onChange.script)], shell: false });
|
||||
else
|
||||
runStep({ command: onChange.command, args: onChange.args, shell: false, cwd: onChange.cwd });
|
||||
runStep({ command: onChange.command, args: onChange.args, shell: true, cwd: onChange.cwd });
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ onChanges.push({
|
||||
],
|
||||
command: 'npx',
|
||||
args: ['vite', 'build'],
|
||||
cwd: 'packages/trace-viewer',
|
||||
cwd: path.join(__dirname, '..', '..', 'packages', 'trace-viewer'),
|
||||
});
|
||||
|
||||
onChanges.push({
|
||||
@ -279,7 +279,7 @@ onChanges.push({
|
||||
],
|
||||
command: 'npx',
|
||||
args: ['vite', 'build'],
|
||||
cwd: 'packages/recorder',
|
||||
cwd: path.join(__dirname, '..', '..', 'packages', 'recorder'),
|
||||
});
|
||||
|
||||
// The recorder and trace viewer have an app_icon.png that needs to be copied.
|
||||
|
Loading…
x
Reference in New Issue
Block a user