Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: split output clients by capabilities and base dir #34135

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pavelfeldman
Copy link
Member

Fixes #34125

This comment has been minimized.

Copy link
Contributor

Test results for "tests 1"

1 failed
❌ [webkit-page] › page/page-leaks.spec.ts:161:5 › waitFor should not leak @webkit-ubuntu-22.04-node18

7 flaky ⚠️ [chromium-page] › page/page-event-request.spec.ts:110:3 › should report navigation requests and responses handled by service worker @chromium-ubuntu-22.04-node18
⚠️ [firefox-page] › page/page-evaluate.spec.ts:403:3 › should throw for too deep reference chain @firefox-ubuntu-22.04-node18
⚠️ [webkit-library] › library/browsercontext-reuse.spec.ts:50:1 › should reset serviceworker @webkit-ubuntu-22.04-node18
⚠️ [webkit-library] › library/trace-viewer.spec.ts:358:1 › should filter network requests by url @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-leaks.spec.ts:107:5 › fill should not leak @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:147:3 › should upload large file @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

37395 passed, 650 skipped
✔️✔️✔️

Merge workflow run.

githubLogger = new GitHubLogger();

constructor(options: { omitFailures?: boolean } = {}) {
super(options);
this.screen.colors = noColors;
Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid changing the global terminalScreen.colors and messing up other reporters:

Suggested change
this.screen.colors = noColors;
this.screen = { ...this.screen, colors: noColors };

@@ -222,7 +222,7 @@ class JSONReporter implements ReporterV2 {
}

private _serializeError(error: TestError): JSONReportError {
return formatError(error, true);
return formatError(nonTerminalScreen, error);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a behavior change. Previously, we were always coloring the code snippet, and now we do it conditionally based on isTTY/PLAYWRIGHT_FORCE_TTY/FORCE_COLOR/DEBUG_COLORS.

Noticing here to figure out whether this is intentional.


type MarkdownReporterOptions = {
configDir: string,
outputFile?: string;
};


class MarkdownReporter extends BaseReporter {
class MarkdownReporter extends TerminalReporter {
Copy link
Contributor

Choose a reason for hiding this comment

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

This reporter seems to be a non-terminal one. I think it is more like the json/junit.

@@ -160,6 +160,6 @@ class ListModeReporter implements ReporterV2 {

onError(error: TestError) {
// eslint-disable-next-line no-console
console.error('\n' + formatError(error, false).message);
console.error('\n' + formatError(terminalScreen, error).message);
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we did not want colors here at all, which seems consistent with plain console.log() above instead of using formatTitle(). Should we have a separate noColorsScreen?

@@ -95,7 +95,7 @@ export function createErrorCollectingReporter(writeToConsole?: boolean): ErrorCo
onError(error: TestError) {
errors.push(error);
if (writeToConsole)
process.stdout.write(formatError(error, colors.enabled).message + '\n');
process.stdout.write(formatError(terminalScreen, error).message + '\n');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be nonTerminalScreen instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Playwright does not append testDir to the error location
2 participants