fix(testing): run playwright from workspaceRoot (#18195)
This commit is contained in:
parent
4ffc68e18b
commit
3e86e42537
@ -64,7 +64,7 @@ export async function playwrightExecutor(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
const args = createArgs(options);
|
const args = createArgs(options);
|
||||||
const p = runPlaywright(args, join(context.root, projectRoot));
|
const p = runPlaywright(args, context.root);
|
||||||
|
|
||||||
return new Promise<{ success: boolean }>((resolve) => {
|
return new Promise<{ success: boolean }>((resolve) => {
|
||||||
p.on('close', (code) => {
|
p.on('close', (code) => {
|
||||||
|
|||||||
@ -73,7 +73,11 @@ Rename or remove the existing e2e target.`);
|
|||||||
projectConfig.targets.e2e = {
|
projectConfig.targets.e2e = {
|
||||||
executor: '@nx/playwright:playwright',
|
executor: '@nx/playwright:playwright',
|
||||||
outputs: [`dist/.playwright/${projectConfig.root}`],
|
outputs: [`dist/.playwright/${projectConfig.root}`],
|
||||||
options: {},
|
options: {
|
||||||
|
config: `${projectConfig.root}/playwright.config.${
|
||||||
|
options.js ? 'js' : 'ts'
|
||||||
|
}`,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
updateProjectConfiguration(tree, options.project, projectConfig);
|
updateProjectConfiguration(tree, options.project, projectConfig);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user