Skip to content

Commit

Permalink
feat(e2e-runner): Added support for @nx/playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Aug 9, 2023
1 parent 61205c5 commit f689d1e
Show file tree
Hide file tree
Showing 3 changed files with 896 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@nx/devkit": "16.3.2",
"@nx/playwright": "^16.7.0-beta.1",
"@nx/workspace": "16.3.2",
"@types/tar": "^6.1.5",
"axios": "^1.4.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/e2e-runner/src/executors/run/run.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RunCommandsOptions } from 'nx/src/executors/run-commands/run-commands.i
import { NxTarget, NxTargetOptions } from './utils/nx-target'

export interface RunOptions {
runner: 'cypress' | 'playwright' | 'run-commands'
runner: 'cypress' | 'playwright' | '@nx/playwright' | 'run-commands'
runnerTarget?: string
watch?: boolean
targets: NxTargetOptions[]
Expand Down Expand Up @@ -46,6 +46,11 @@ export async function endToEndRunner(
// eslint-disable-next-line @typescript-eslint/no-var-requires
const playwrightExecutor = require('@nx-extend/playwright/src/executors/test/test.impl').default

success = (await playwrightExecutor(rest, context)).success
} else if (runner === '@nx/playwright') {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const playwrightExecutor = require('@nx/playwright/src/executors/playwright/playwright').default

success = (await playwrightExecutor(rest, context)).success
} else if (runner === 'run-commands') {
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
Loading

0 comments on commit f689d1e

Please sign in to comment.