Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- ayushmanchhabra
- babafemij-k
- barclayd
- Bastian
- bavardage
- bbrowning918
- BDomzalski
Expand Down
20 changes: 16 additions & 4 deletions integration/bug-report-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,22 @@ test.beforeAll(async () => {
////////////////////////////////////////////////////////////////////////////
files: {
"app/routes/_index.tsx": js`
import { useLoaderData, Link } from "react-router";
import { useEffect } from "react";
import { useLoaderData, Link, useNavigate } from "react-router";

export function loader() {
return "pizza";
}

export default function Index() {
let data = useLoaderData();

const navigate = useNavigate();
useEffect(() => {
navigate("/burgers");
navigate("/burgers");
}, []);

return (
<div>
{data}
Expand Down Expand Up @@ -97,16 +105,20 @@ test.afterAll(() => {
// add a good description for what you expect Remix to do 👇🏽
////////////////////////////////////////////////////////////////////////////////

test("[description of what you expect it to do]", async ({ page }) => {
test("should not show 404 page on multiple navigate calls", async ({
page,
}) => {
let app = new PlaywrightFixture(appFixture, page);
// You can test any request your app might get using `fixture`.
let response = await fixture.requestDocument("/");
expect(await response.text()).toMatch("pizza");

// If you need to test interactivity use the `app`
await app.goto("/");
await app.clickLink("/burgers");
await page.waitForSelector("text=cheeseburger");
await page.waitForURL("**/burgers");
// await app.poke(20);
await expect(page.locator("text=Not Found")).not.toBeVisible();
await expect(page.locator("text=cheeseburger")).toBeVisible();

// If you're not sure what's going on, you can "poke" the app, it'll
// automatically open up in your browser for 20 seconds, so be quick!
Expand Down
Loading