From 95c8a133e7e6138e54a82f869554db2259718c21 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Thu, 10 Oct 2024 15:34:11 -0400 Subject: [PATCH] Update e2e test --- integration/client-data-test.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/integration/client-data-test.ts b/integration/client-data-test.ts index 5588ce84825..eebc4fb7c72 100644 --- a/integration/client-data-test.ts +++ b/integration/client-data-test.ts @@ -937,7 +937,17 @@ test.describe("Client Data", () => { let app = new PlaywrightFixture(appFixture, page); let logs: string[] = []; - page.on("console", (msg) => logs.push(msg.text())); + page.on("console", (msg) => { + let text = msg.text(); + if ( + // Ignore any dev tools messages. This may only happen locally when dev + // tools is installed and not in CI but either way we don't care + /Download the React DevTools/.test(text) + ) { + return; + } + logs.push(text); + }); await app.goto("/parent/child", false); let html = await app.getHtml("main"); @@ -954,10 +964,7 @@ test.describe("Client Data", () => { expect(html).toMatch("Child Server Error"); expect(html).not.toMatch("Should not see me"); - expect(logs).toEqual([ - expect.stringContaining("Download the React DevTools"), - "running parent client loader", - ]); + expect(logs).toEqual(["running parent client loader"]); console.error = _consoleError; });