Skip to content

Commit f948395

Browse files
authored
Merge pull request #123 from buildkite/te-4877-soc2-vulnerability-detected-in-test-collector-javascript
[TE-4877] Fix broken test after Playwright upgrade
2 parents 0b2f96b + 0e74033 commit f948395

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

e2e/playwright.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ 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({
78-
expanded: expect.arrayContaining(['Expected string: "Hello, World!"', 'Received: <element(s) not found>'])
78+
expanded: expect.arrayContaining([expect.stringContaining('"Hello, World!"')])
7979
})
8080
]))
8181

@@ -120,10 +120,10 @@ describe('examples/playwright', () => {
120120
expect(data).toHaveProperty("data[0].location", "tests/example.spec.js:3:1")
121121
expect(data).toHaveProperty("data[0].file_name", "tests/example.spec.js")
122122
expect(data).toHaveProperty("data[0].result", 'failed')
123-
expect(data).toHaveProperty("data[1].failure_reason", "Test timeout of 1ms exceeded while setting up \"browserName\".")
123+
expect(data).toHaveProperty("data[1].failure_reason", expect.stringContaining("Test timeout of 1ms exceeded while setting up"))
124124
expect(data).toHaveProperty("data[1].failure_expanded", expect.arrayContaining([
125125
expect.objectContaining({
126-
expanded: expect.arrayContaining(["Test timeout of 1ms exceeded while setting up \"browserName\"."])
126+
expanded: expect.arrayContaining([expect.stringContaining("Test timeout of 1ms exceeded while setting up")])
127127
})
128128
]))
129129

@@ -132,10 +132,10 @@ describe('examples/playwright', () => {
132132
expect(data).toHaveProperty("data[1].location", "tests/example.spec.js:9:1")
133133
expect(data).toHaveProperty("data[1].file_name", "tests/example.spec.js")
134134
expect(data).toHaveProperty("data[1].result", "failed")
135-
expect(data).toHaveProperty("data[1].failure_reason", "Test timeout of 1ms exceeded while setting up \"browserName\".")
135+
expect(data).toHaveProperty("data[1].failure_reason", expect.stringContaining("Test timeout of 1ms exceeded while setting up"))
136136
expect(data).toHaveProperty("data[1].failure_expanded", expect.arrayContaining([
137137
expect.objectContaining({
138-
expanded: expect.arrayContaining(["Test timeout of 1ms exceeded while setting up \"browserName\"."])
138+
expanded: expect.arrayContaining([expect.stringContaining("Test timeout of 1ms exceeded while setting up")])
139139
})
140140
]))
141141
expect(stdout).toMatch(/Test Engine .* response/m)

0 commit comments

Comments
 (0)