@@ -68,7 +68,7 @@ test('should include custom expect message with web-first assertions', async ({
6868
6969 expect ( result . output ) . toContain ( 'Error: x-foo must be visible' ) ;
7070 expect ( result . output ) . toContain ( 'expect(locator).toBeVisible() failed' ) ;
71- expect ( result . output ) . toContain ( 'Timeout: 1ms' ) ;
71+ expect ( result . output ) . toContain ( 'Timeout: 1ms' ) ;
7272 expect ( result . output ) . toContain ( 'Call log:' ) ;
7373} ) ;
7474
@@ -533,13 +533,13 @@ test('should support toHaveURL with baseURL from webServer', async ({ runInlineT
533533 } , { workers : 1 } ) ;
534534 const output = result . output ;
535535 expect ( output ) . toContain ( 'expect(page).toHaveURL' ) ;
536- expect ( output ) . toContain ( `Expected string : \"http://localhost:${ port } /kek\"` ) ;
536+ expect ( output ) . toContain ( `Expected: \"http://localhost:${ port } /kek\"` ) ;
537537 expect ( result . passed ) . toBe ( 1 ) ;
538538 expect ( result . failed ) . toBe ( 1 ) ;
539539 expect ( result . exitCode ) . toBe ( 1 ) ;
540540} ) ;
541541
542- test ( 'should respect expect.timeout' , async ( { runInlineTest } ) => {
542+ test ( 'should respect expect.timeout in toHaveURL ' , async ( { runInlineTest } ) => {
543543 const result = await runInlineTest ( {
544544 'playwright.config.js' : `module.exports = { expect: { timeout: 1000 } }` ,
545545 'a.test.ts' : `
@@ -550,7 +550,7 @@ test('should respect expect.timeout', async ({ runInlineTest }) => {
550550 await page.goto('data:text/html,<div>A</div>');
551551 const error = await expect(page).toHaveURL('data:text/html,<div>B</div>').catch(e => e);
552552 expect(stripVTControlCharacters(error.message)).toContain('expect(page).toHaveURL(expected) failed');
553- expect(stripVTControlCharacters(error.message)).toContain('Timeout: 1000ms');
553+ expect(stripVTControlCharacters(error.message)).toContain('Timeout: 1000ms');
554554 expect(error.message).toContain('data:text/html,<div>');
555555 });
556556 ` ,
@@ -570,7 +570,7 @@ test('should support toHaveURL predicate', async ({ runInlineTest }) => {
570570 await page.goto('data:text/html,<div>A</div>');
571571 const error = await expect(page).toHaveURL(url => url === 'data:text/html,<div>B</div>').catch(e => e);
572572 expect(stripVTControlCharacters(error.message)).toContain('expect(page).toHaveURL(expected) failed');
573- expect(stripVTControlCharacters(error.message)).toContain('Timeout: 1000ms');
573+ expect(stripVTControlCharacters(error.message)).toContain('Timeout: 1000ms');
574574 expect(error.message).toContain('data:text/html,<div>');
575575 });
576576 ` ,
@@ -615,8 +615,8 @@ test('should print expected/received before timeout', async ({ runInlineTest })
615615 expect ( result . passed ) . toBe ( 0 ) ;
616616 expect ( result . failed ) . toBe ( 1 ) ;
617617 expect ( result . output ) . toContain ( 'Test timeout of 2000ms exceeded.' ) ;
618- expect ( result . output ) . toContain ( 'Expected string : "Text 2"' ) ;
619- expect ( result . output ) . toContain ( 'Received string : "Text content"' ) ;
618+ expect ( result . output ) . toContain ( 'Expected: "Text 2"' ) ;
619+ expect ( result . output ) . toContain ( 'Received: "Text content"' ) ;
620620} ) ;
621621
622622test ( 'should print pending operations for toHaveText' , async ( { runInlineTest } ) => {
@@ -634,7 +634,7 @@ test('should print pending operations for toHaveText', async ({ runInlineTest })
634634 expect ( result . exitCode ) . toBe ( 1 ) ;
635635 const output = result . output ;
636636 expect ( output ) . toContain ( `expect(locator).toHaveText(expected)` ) ;
637- expect ( output ) . toContain ( 'Expected string : "Text"' ) ;
637+ expect ( output ) . toContain ( 'Expected: "Text"' ) ;
638638 expect ( output ) . toContain ( 'Error: element(s) not found' ) ;
639639 expect ( output ) . toContain ( 'waiting for locator(\'no-such-thing\')' ) ;
640640} ) ;
@@ -690,8 +690,8 @@ test('should print expected/received on Ctrl+C', async ({ interactWithTestRunner
690690 const result = parseTestRunnerOutput ( testProcess . output ) ;
691691 expect ( result . passed ) . toBe ( 0 ) ;
692692 expect ( result . interrupted ) . toBe ( 1 ) ;
693- expect ( result . output ) . toContain ( 'Expected string : "Text 2"' ) ;
694- expect ( result . output ) . toContain ( 'Received string : "Text content"' ) ;
693+ expect ( result . output ) . toContain ( 'Expected: "Text 2"' ) ;
694+ expect ( result . output ) . toContain ( 'Received: "Text content"' ) ;
695695} ) ;
696696
697697test ( 'should not print timed out error message when test times out' , async ( { runInlineTest } ) => {
@@ -1024,7 +1024,7 @@ test('should respect timeout from configured expect when used outside of the tes
10241024 expect ( code ) . toBe ( 1 ) ;
10251025 expect ( stdout ) . toBe ( '' ) ;
10261026 expect ( stripAnsi ( stderr ) ) . toContain ( 'expect(locator).toBeAttached() failed' ) ;
1027- expect ( stripAnsi ( stderr ) ) . toContain ( 'Timeout: 10ms' ) ;
1027+ expect ( stripAnsi ( stderr ) ) . toContain ( 'Timeout: 10ms' ) ;
10281028} ) ;
10291029
10301030test ( 'should expose timeout to custom matchers' , async ( { runInlineTest, runTSC } ) => {
0 commit comments