Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Oct 29, 2024
1 parent 29ebf0e commit e122aab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
3 changes: 2 additions & 1 deletion integration/client-data-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,10 @@ test.describe("Client Data", () => {
page.on("console", (msg) => {
let text = msg.text();
if (
text.includes("React Router Future Flag Warning") ||
// 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)
text.includes("Download the React DevTools")
) {
return;
}
Expand Down
4 changes: 3 additions & 1 deletion integration/prefetch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,9 @@ test.describe("single fetch", () => {

let consoleLogs: string[] = [];
page.on("console", (msg) => {
consoleLogs.push(msg.text());
if (!msg.text().includes("React Router Future Flag Warning")) {
consoleLogs.push(msg.text());
}
});

let selectors = {
Expand Down
6 changes: 5 additions & 1 deletion integration/resource-routes-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ test.describe("loader in an app", async () => {
page,
}) => {
let logs: string[] = [];
page.on("console", (msg) => logs.push(msg.text()));
page.on("console", (msg) => {
if (!msg.text().includes("React Router Future Flag Warning")) {
logs.push(msg.text());
}
});
let app = new PlaywrightFixture(appFixture, page);
await app.goto("/");
await app.clickSubmitButton("/no-action");
Expand Down
6 changes: 5 additions & 1 deletion integration/vite-spa-mode-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,11 @@ test.describe("SPA Mode", () => {
expect(html).toMatch('<h1 data-loading="true">Loading SPA...</h1>');

let logs: string[] = [];
page.on("console", (msg) => logs.push(msg.text()));
page.on("console", (msg) => {
if (!msg.text().includes("React Router Future Flag Warning")) {
logs.push(msg.text());
}
});

let app = new PlaywrightFixture(appFixture, page);
await app.goto("/");
Expand Down

0 comments on commit e122aab

Please sign in to comment.