Skip to content

Commit 4071546

Browse files
committed
chore: deflake
1 parent 7f4be1f commit 4071546

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cmd/cloudx/testhelpers/testhelpers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ func NewPage(t testing.TB, browser playwright.Browser) playwright.Page {
286286
require.NoError(t, page.Context().Route(func(actual string) bool {
287287
return strings.Contains(actual, route)
288288
}, func(r playwright.Route) {
289-
require.NoError(t, r.Abort())
289+
// Best-effort: the page may already be closed during teardown, in
290+
// which case Abort returns "target closed" for a request we no
291+
// longer care about. Failing the test here races test completion.
292+
_ = r.Abort()
290293
}))
291294
}
292295
return page

0 commit comments

Comments
 (0)