Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 2e62bbb

Browse files
test: update screenshot system-tests flake so that it no longer compares images for uniqueness that represent the same state (cypress-io#20463)
1 parent ef3be70 commit 2e62bbb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/driver/cypress/integration/commands/net_stubbing_spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const testFail = (cb, expectedDocsUrl = 'https://on.cypress.io/intercept') => {
1111
})
1212
}
1313

14+
// Due to an issue with requests leaking between tests, we need to ensure that routes are unique from test to test
15+
// See https://github.com/cypress-io/cypress/issues/20397
1416
let routeCount = 0
1517
const uniqueRoute = (route) => {
1618
routeCount += 1

system-tests/test/screenshots_spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ describe('e2e screenshots', () => {
9090
fs.statAsync(screenshot4).get('size'),
9191
fs.statAsync(screenshot5).get('size'),
9292
fs.statAsync(screenshot6).get('size'),
93-
fs.statAsync(screenshot7).get('size'),
93+
// Ignore comparing 6 and 7 since they can sometimes be the same since we take the screenshot as close to the failure as possible and
94+
// the test run error may not have displayed yet. Leaving this commented in case we want to change this behavior in the future
95+
// fs.statAsync(screenshot7).get('size'),
9496
fs.statAsync(screenshot8).get('size'),
9597
fs.statAsync(screenshot9).get('size'),
9698
])

0 commit comments

Comments
 (0)