Skip to content

Commit

Permalink
chore: allow selecting update source type via test server (#34014)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Dec 14, 2024
1 parent 3a10c32 commit 1e4239f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/playwright/src/common/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export type ConfigCLIOverrides = {
timeout?: number;
tsconfig?: string;
ignoreSnapshots?: boolean;
updateSnapshots?: 'all'|'changed'|'missing'|'none';
updateSourceMethod?: 'overwrite'|'patch'|'3way';
updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
updateSourceMethod?: 'overwrite' | 'patch' | '3way';
workers?: number | string;
projects?: { name: string, use?: any }[],
use?: any;
Expand Down
3 changes: 2 additions & 1 deletion packages/playwright/src/isomorphic/testServerInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export interface TestServerInterface {
testIds?: string[];
headed?: boolean;
workers?: number | string;
updateSnapshots?: 'all' | 'none' | 'missing';
updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
updateSourceMethod?: 'overwrite' | 'patch' | '3way';
reporters?: string[],
trace?: 'on' | 'off';
video?: 'on' | 'off';
Expand Down
1 change: 1 addition & 0 deletions packages/playwright/src/runner/testServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ export class TestServerDispatcher implements TestServerInterface {
_optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined,
},
...(params.updateSnapshots ? { updateSnapshots: params.updateSnapshots } : {}),
...(params.updateSourceMethod ? { updateSourceMethod: params.updateSourceMethod } : {}),
...(params.workers ? { workers: params.workers } : {}),
};
if (params.trace === 'on')
Expand Down

0 comments on commit 1e4239f

Please sign in to comment.