diff --git a/docs/generated/packages/playwright/executors/playwright.json b/docs/generated/packages/playwright/executors/playwright.json index a6d210aad88a1..cab859f13333d 100644 --- a/docs/generated/packages/playwright/executors/playwright.json +++ b/docs/generated/packages/playwright/executors/playwright.json @@ -24,6 +24,10 @@ "type": "boolean", "description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options" }, + "lastFailed": { + "type": "boolean", + "description": "Run only the tests that failed in the last run" + }, "forbidOnly": { "type": "boolean", "description": "Fail if test.only is called" diff --git a/packages/playwright/src/executors/playwright/playwright.impl.ts b/packages/playwright/src/executors/playwright/playwright.impl.ts index 5ea711aba536f..93dfbb081a7db 100644 --- a/packages/playwright/src/executors/playwright/playwright.impl.ts +++ b/packages/playwright/src/executors/playwright/playwright.impl.ts @@ -1,4 +1,3 @@ -import { execSync, fork } from 'child_process'; import { ExecutorContext, getPackageManagerCommand, @@ -6,6 +5,7 @@ import { output, workspaceRoot, } from '@nx/devkit'; +import { execSync, fork } from 'child_process'; export interface PlaywrightExecutorSchema { /* @@ -15,6 +15,7 @@ export interface PlaywrightExecutorSchema { browser?: 'all' | 'chromium' | 'firefox' | 'webkit' | string; config?: string; debug?: boolean; + lastFailed?: boolean; forbidOnly?: boolean; fullyParallel?: boolean; grep?: string; diff --git a/packages/playwright/src/executors/playwright/schema.json b/packages/playwright/src/executors/playwright/schema.json index 8b2c1c39996a1..d65d7087db4de 100644 --- a/packages/playwright/src/executors/playwright/schema.json +++ b/packages/playwright/src/executors/playwright/schema.json @@ -21,6 +21,10 @@ "type": "boolean", "description": "Run tests with Playwright Inspector. Shortcut for 'PWDEBUG=1' environment variable and '--timeout=0',--max-failures=1 --headed --workers=1' options" }, + "lastFailed": { + "type": "boolean", + "description": "Run only the tests that failed in the last run" + }, "forbidOnly": { "type": "boolean", "description": "Fail if test.only is called"