Skip to content

Commit b468a1f

Browse files
gchanampcode-com
andcommitted
[TE-4877] Fix flaky test due to different Playwright error messages
Amp-Thread-ID: https://ampcode.com/threads/T-79a10363-8be3-4646-b396-ab641d508ec9 Co-authored-by: Amp <amp@ampcode.com>
1 parent 95d68e0 commit b468a1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

e2e/playwright.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('examples/playwright', () => {
7272
expect(data).toHaveProperty("data[1].location", "tests/example.spec.js:9:1")
7373
expect(data).toHaveProperty("data[1].file_name", "tests/example.spec.js")
7474
expect(data).toHaveProperty("data[1].result", "failed")
75-
expect(data).toHaveProperty("data[1].failure_reason", "Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected)")
75+
expect(data).toHaveProperty("data[1].failure_reason", expect.stringContaining("expect(locator).toHaveText(expected)"))
7676
expect(data).toHaveProperty("data[1].failure_expanded", expect.arrayContaining([
7777
expect.objectContaining({
7878
expanded: expect.arrayContaining(['Expected string: "Hello, World!"', 'Received: <element(s) not found>'])

0 commit comments

Comments
 (0)