Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Oct 10, 2024
1 parent fc74b03 commit 95c8a13
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions integration/client-data-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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;
});
Expand Down

0 comments on commit 95c8a13

Please sign in to comment.