From 918ef9d265b4a1cd71d49c5bfe3f7b376d0efce3 Mon Sep 17 00:00:00 2001
From: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Date: Tue, 1 Sep 2026 14:20:11 +0800
Subject: [PATCH] test(review): filter known CSP browser warning
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
---
web/e2e/rejected-version-republish.spec.ts | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/web/e2e/rejected-version-republish.spec.ts b/web/e2e/rejected-version-republish.spec.ts
index 5a014ac9..4a4faa3f 100644
--- a/web/e2e/rejected-version-republish.spec.ts
+++ b/web/e2e/rejected-version-republish.spec.ts
@@ -15,6 +15,12 @@ function adminCredentials() {
}
}
+function withoutKnownMetaCspWarning(messages: string[]): string[] {
+ return messages.filter((message) => (
+ !message.includes("frame-ancestors' is ignored when delivered via a element")
+ ))
+}
+
test.describe('Rejected version replacement (Real API)', () => {
test.describe.configure({ timeout: 150_000 })
@@ -142,12 +148,9 @@ test.describe('Rejected version replacement (Real API)', () => {
await progressCard.getByRole('link', { name: 'Edit and resubmit' }).click()
await expect(page).toHaveURL(/\/dashboard\/publish/)
await expect(page.getByText(new RegExp(`Resubmit .* v${replacement.version}`))).toBeVisible()
- const unexpectedConsoleErrors = consoleErrors.filter((message) => (
- !message.includes("frame-ancestors' is ignored when delivered via a element")
- ))
- expect(unexpectedConsoleErrors).toEqual([])
+ expect(withoutKnownMetaCspWarning(consoleErrors)).toEqual([])
expect(pageErrors).toEqual([])
- expect(adminConsoleErrors).toEqual([])
+ expect(withoutKnownMetaCspWarning(adminConsoleErrors)).toEqual([])
expect(adminPageErrors).toEqual([])
} finally {
await adminBuilder.cleanup()