Skip to content

Commit f7649ee

Browse files
committed
test(org): filter the two console messages this environment alone produces
Plain HTTP makes Chromium ignore COOP, and the analytics host refuses CI's origin. Nothing else about console errors loosens.
1 parent 4f771ff commit f7649ee

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎apps/sim/scripts/org-redesign-e2e/harness.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ const HANDLED_RUNTIME = /NEXT_REDIRECT|NEXT_HTTP_ERROR_FALLBACK/
123123
const STREAMED_FAILURE = /Minified React error #419/
124124
/** The browser's own line for a failed load, which the response and requestfailed listeners judge. */
125125
const BROWSER_LOAD_FAILURE = /^Failed to load resource/
126+
/**
127+
* What this environment says that production would not: the suite runs over plain HTTP, where the
128+
* browser ignores COOP, and the Inth analytics host refuses CI's origin, which production's allows.
129+
*/
130+
const ENVIRONMENT_CONSOLE_NOISE = [
131+
/^The Cross-Origin-Opener-Policy header has been ignored, because the URL's origin was untrustworthy\./,
132+
/^Access to fetch at 'https:\/\/sim-sim\.inth\.app\/init' from origin /,
133+
]
126134
const HIGH_VOLUME_REQUEST = /\/api\/mothership\/events|\/socket\.io\/|\/api\/auth\/socket-token/
127135

128136
const browser: Browser = await chromium.launch()
@@ -223,6 +231,7 @@ class Session {
223231
const text = message.text()
224232
if (
225233
!BROWSER_LOAD_FAILURE.test(text) &&
234+
!ENVIRONMENT_CONSOLE_NOISE.some((noise) => noise.test(text)) &&
226235
!HANDLED_RUNTIME.test(text) &&
227236
!STREAMED_FAILURE.test(text)
228237
)

0 commit comments

Comments
 (0)