fix(list reporter): use positive-status-mark for last result row
This commit is contained in:
parent
9df34356af
commit
d9994ac127
|
|
@ -126,7 +126,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('render steps in non-TTY mode', async ({ runInlineTest }) => {
|
test.only('render steps in non-TTY mode', async ({ runInlineTest }) => {
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
@ -144,7 +144,6 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||||
}, { reporter: 'list' }, { PW_TEST_DEBUG_REPORTERS: '1', PLAYWRIGHT_LIST_PRINT_STEPS: '1' });
|
}, { reporter: 'list' }, { PW_TEST_DEBUG_REPORTERS: '1', PLAYWRIGHT_LIST_PRINT_STEPS: '1' });
|
||||||
const text = result.output;
|
const text = result.output;
|
||||||
const lines = text.split('\n').filter(l => l.match(/^#.* :/)).map(l => l.replace(/[.\d]+m?s/, 'Xms'));
|
const lines = text.split('\n').filter(l => l.match(/^#.* :/)).map(l => l.replace(/[.\d]+m?s/, 'Xms'));
|
||||||
lines.pop(); // Remove last item that contains [v] and time in ms.
|
|
||||||
expect(lines).toEqual([
|
expect(lines).toEqual([
|
||||||
'#0 : 1.1 a.test.ts:5:26 › passes › outer 1.0 › inner 1.1 (Xms)',
|
'#0 : 1.1 a.test.ts:5:26 › passes › outer 1.0 › inner 1.1 (Xms)',
|
||||||
'#1 : 1.2 a.test.ts:6:26 › passes › outer 1.0 › inner 1.2 (Xms)',
|
'#1 : 1.2 a.test.ts:6:26 › passes › outer 1.0 › inner 1.2 (Xms)',
|
||||||
|
|
@ -152,6 +151,7 @@ for (const useIntermediateMergeReport of [false, true] as const) {
|
||||||
'#3 : 1.4 a.test.ts:9:26 › passes › outer 2.0 › inner 2.1 (Xms)',
|
'#3 : 1.4 a.test.ts:9:26 › passes › outer 2.0 › inner 2.1 (Xms)',
|
||||||
'#4 : 1.5 a.test.ts:10:26 › passes › outer 2.0 › inner 2.2 (Xms)',
|
'#4 : 1.5 a.test.ts:10:26 › passes › outer 2.0 › inner 2.2 (Xms)',
|
||||||
'#5 : 1.6 a.test.ts:8:24 › passes › outer 2.0 (Xms)',
|
'#5 : 1.6 a.test.ts:8:24 › passes › outer 2.0 (Xms)',
|
||||||
|
`#6 : ${POSITIVE_STATUS_MARK} 1 a.test.ts:3:15 › passes (Xms)`,
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue