From 4fe4b4ef3c096d84c96afbeee0457d42ae645ae8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 17 Feb 2023 15:10:16 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Link=20Component=20=E2=80=94=20mailto:=20sh?= =?UTF-8?q?ould=20stay=20mailto:=20as=20an=20absolute=20url=20when=20passe?= =?UTF-8?q?d=20as=20an=20to=20attribute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- integration/bug-report-test.ts | 36 ++++------------------------------ 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/integration/bug-report-test.ts b/integration/bug-report-test.ts index c8a9f18ac1b..fc2323f1ef4 100644 --- a/integration/bug-report-test.ts +++ b/integration/bug-report-test.ts @@ -48,27 +48,10 @@ test.beforeAll(async () => { //////////////////////////////////////////////////////////////////////////// files: { "app/routes/index.jsx": js` - import { json } from "@remix-run/node"; - import { useLoaderData, Link } from "@remix-run/react"; - - export function loader() { - return json("pizza"); - } + import { Link } from "@remix-run/react"; export default function Index() { - let data = useLoaderData(); - return ( -
- {data} - Other Route -
- ) - } - `, - - "app/routes/burgers.jsx": js` - export default function Index() { - return
cheeseburger
; + return {'Some Mailto: link'}; } `, }, @@ -87,22 +70,11 @@ 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("[mailto: should stay mailto as an absolute url used in Link Component]", 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"); - expect(await app.getHtml()).toMatch("cheeseburger"); - - // 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! - // await app.poke(20); - - // Go check out the other tests to see what else you can do. + expect(await response.text()).toMatch("href=\"mailto:foo@baz.com\""); }); //////////////////////////////////////////////////////////////////////////////// From 1cb4af57d2ad43d6011e73bd6c31373517dfde67 Mon Sep 17 00:00:00 2001 From: Thomas Verleye Date: Fri, 17 Feb 2023 15:16:56 +0100 Subject: [PATCH 2/2] Update contributors.yml --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index 1100adb6314..2e6af8d3806 100644 --- a/contributors.yml +++ b/contributors.yml @@ -448,6 +448,7 @@ - therealflyingcoder - thomasheyenbrock - thomasrettig +- thomasverleye - tjefferson08 - tombiju - tombyrer