Skip to content

Commit

Permalink
fix(testing): run playwright from workspaceRoot (#18195)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbados-clemens authored Jul 19, 2023
1 parent 4ffc68e commit 3e86e42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/playwright/src/executors/playwright/playwright.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

1 comment on commit 3e86e42

@vercel
Copy link

@vercel vercel bot commented on 3e86e42 Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.