Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(testserver): simplify onlyChanged param (#40638)
Simon Knott3db0c5ef2ff6
diff --git a/packages/playwright/src/isomorphic/testServerInterface.ts b/packages/playwright/src/isomorphic/testServerInterface.tsindex 5ac8e022d2..408b0e8372 100644--- a/packages/playwright/src/isomorphic/testServerInterface.ts+++ b/packages/playwright/src/isomorphic/testServerInterface.ts@@ -73,7 +73,7 @@ export interface TestServerInterface {locations?: string[];grep?: string;grepInvert?: string;- onlyChanged?: string;+ onlyChanged?: boolean;}): Promise<{report: ReportEntry[],status: reporterTypes.FullResult['status']diff --git a/packages/playwright/src/runner/testRunner.ts b/packages/playwright/src/runner/testRunner.tsindex 826763a66e..3d4a74d499 100644--- a/packages/playwright/src/runner/testRunner.ts+++ b/packages/playwright/src/runner/testRunner.ts@@ -58,7 +58,7 @@ export type ListTestsParams = {locations?: string[];grep?: string;grepInvert?: string;- onlyChanged?: string;+ onlyChanged?: boolean;};export type RunTestsParams = {@@ -246,7 +246,7 @@ export class TestRunner extends EventEmitter<TestRunnerEventMap> {grep: params.grep,grepInvert: params.grepInvert,projectFilter: params.projects?.length ? params.projects : undefined,- onlyChanged: params.onlyChanged,+ onlyChanged: params.onlyChanged ? 'HEAD' : undefined,listMode: true,};diff --git a/packages/trace-viewer/src/ui/uiModeView.tsx b/packages/trace-viewer/src/ui/uiModeView.tsxindex 3f8f9a6391..f1c595027c 100644--- a/packages/trace-viewer/src/ui/uiModeView.tsx+++ b/packages/trace-viewer/src/ui/uiModeView.tsx@@ -198,7 +198,7 @@ export const UIModeView: React.FC<{}> = ({if (status !== 'passed')return;- const result = await testServerConnection.listTests({ projects: queryParams.projects, locations: queryParams.args, grep: queryParams.grep, grepInvert: queryParams.grepInvert, onlyChanged: onlyChanged ? 'HEAD' : undefined });+ const result = await testServerConnection.listTests({ projects: queryParams.projects, locations: queryParams.args, grep: queryParams.grep, grepInvert: queryParams.grepInvert, onlyChanged });teleSuiteUpdater.processListReport(result.report);testServerConnection.onReport(params => {@@ -322,7 +322,7 @@ export const UIModeView: React.FC<{}> = ({commandQueue.current = commandQueue.current.then(async () => {setIsLoading(true);try {- const result = await testServerConnection.listTests({ projects: queryParams.projects, locations: queryParams.args, grep: queryParams.grep, grepInvert: queryParams.grepInvert, onlyChanged: onlyChanged ? 'HEAD' : undefined });+ const result = await testServerConnection.listTests({ projects: queryParams.projects, locations: queryParams.args, grep: queryParams.grep, grepInvert: queryParams.grepInvert, onlyChanged });teleSuiteUpdater.processListReport(result.report);} catch (e) {// eslint-disable-next-line no-console