@@ -288,6 +288,34 @@ for (const useIntermediateMergeReport of [false, true] as const) {
288288 expect ( result . exitCode ) . toBe ( 1 ) ;
289289 } ) ;
290290
291+ test ( 'print failures inline for a non-retriable error' , async ( { runInlineTest } ) => {
292+ // A missing snapshot fails the test but is not retried. The reporter must
293+ // still print the failure inline, even though the retry budget is not exhausted.
294+ const result = await runInlineTest ( {
295+ 'playwright.config.ts' : `
296+ module.exports = {
297+ reporter: [['list', { printFailuresInline: true }]],
298+ retries: 1,
299+ workers: 1,
300+ };
301+ ` ,
302+ 'a.test.ts' : `
303+ import { test, expect } from '@playwright/test';
304+ test('missing snapshot', async ({}) => {
305+ expect('actual').toMatchSnapshot('foo.txt');
306+ });
307+ ` ,
308+ } ) ;
309+ const text = result . output ;
310+ const failureHeader = '1) a.test.ts:3:15 › missing snapshot' ;
311+ const failureIndex = text . indexOf ( failureHeader ) ;
312+ expect ( failureIndex , 'failure should be printed inline' ) . not . toBe ( - 1 ) ;
313+ expect ( text . indexOf ( `A snapshot doesn't exist` , failureIndex ) ) . toBeGreaterThan ( failureIndex ) ;
314+ // It must not be retried, so there is exactly one failure block.
315+ expect ( text . indexOf ( failureHeader , failureIndex + 1 ) ) . toBe ( - 1 ) ;
316+ expect ( result . exitCode ) . toBe ( 1 ) ;
317+ } ) ;
318+
291319 test ( 'print stdio' , async ( { runInlineTest } ) => {
292320 const result = await runInlineTest ( {
293321 'a.test.ts' : `
0 commit comments