fix(testing): run playwright from workspaceRoot (#18195)

This commit is contained in:
Caleb Ukle 2023-07-19 13:37:00 -05:00 committed by GitHub
parent 4ffc68e18b
commit 3e86e42537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -64,7 +64,7 @@ export async function playwrightExecutor(
);
}
const args = createArgs(options);
const p = runPlaywright(args, join(context.root, projectRoot));
const p = runPlaywright(args, context.root);
return new Promise<{ success: boolean }>((resolve) => {
p.on('close', (code) => {

View File

@ -73,7 +73,11 @@ Rename or remove the existing e2e target.`);
projectConfig.targets.e2e = {
executor: '@nx/playwright:playwright',
outputs: [`dist/.playwright/${projectConfig.root}`],
options: {},
options: {
config: `${projectConfig.root}/playwright.config.${
options.js ? 'js' : 'ts'
}`,
},
};
updateProjectConfiguration(tree, options.project, projectConfig);
}