chore: do not show steps in line reporter without tty (#34529)
This commit is contained in:
parent
f15171bcf0
commit
4b5b326478
|
|
@ -68,12 +68,12 @@ class LineReporter extends TerminalReporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
onStepBegin(test: TestCase, result: TestResult, step: TestStep) {
|
onStepBegin(test: TestCase, result: TestResult, step: TestStep) {
|
||||||
if (step.category === 'test.step')
|
if (this.screen.isTTY && step.category === 'test.step')
|
||||||
this._updateLine(test, result, step);
|
this._updateLine(test, result, step);
|
||||||
}
|
}
|
||||||
|
|
||||||
onStepEnd(test: TestCase, result: TestResult, step: TestStep) {
|
onStepEnd(test: TestCase, result: TestResult, step: TestStep) {
|
||||||
if (step.category === 'test.step')
|
if (this.screen.isTTY && step.category === 'test.step')
|
||||||
this._updateLine(test, result, step.parent);
|
this._updateLine(test, result, step.parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
}, { reporter: 'line' });
|
}, { reporter: 'line' }, { PLAYWRIGHT_FORCE_TTY: '1' });
|
||||||
const text = result.output;
|
const text = result.output;
|
||||||
expect(text).toContain('[1/1] a.test.ts:3:15 › passes › outer › inner');
|
expect(text).toContain('[1/1] a.test.ts:3:15 › passes › outer › inner');
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue