Skip to content
Merged
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
30 changes: 7 additions & 23 deletions examples/app-pages-router/app/parallel/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,13 @@ export default function Layout({

return (
<div>
<div className="flex flex-col mb-10">
<label htmlFor="a">
Enable A
<input
name="a"
type="checkbox"
checked={routeA}
onChange={(e) => {
setRouteA(e.target.checked);
}}
/>
</label>
<label htmlFor="b">
Enable B
<input
name="b"
type="checkbox"
checked={routeB}
onChange={(e) => {
setRouteB(e.target.checked);
}}
/>
</label>
<div className="flex flex-col items-start mb-10">
<button onClick={() => setRouteA(!routeA)} data-testid="enable-a">
{routeA ? "Disable A" : "Enable A"}
</button>
<button onClick={() => setRouteB(!routeB)} data-testid="enable-b">
{routeB ? "Disable B" : "Enable B"}
</button>
</div>

{routeA && a}
Expand Down
30 changes: 7 additions & 23 deletions examples/app-router/app/parallel/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,13 @@ export default function Layout({

return (
<div>
<div className="flex flex-col mb-10">
<label htmlFor="a">
Enable A
<input
name="a"
type="checkbox"
checked={routeA}
onChange={(e) => {
setRouteA(e.target.checked);
}}
/>
</label>
<label htmlFor="b">
Enable B
<input
name="b"
type="checkbox"
checked={routeB}
onChange={(e) => {
setRouteB(e.target.checked);
}}
/>
</label>
<div className="flex flex-col items-start mb-10">
<button onClick={() => setRouteA(!routeA)} data-testid="enable-a">
{routeA ? "Disable A" : "Enable A"}
</button>
<button onClick={() => setRouteB(!routeB)} data-testid="enable-b">
{routeB ? "Disable B" : "Enable B"}
</button>
</div>

{routeA && a}
Expand Down
10 changes: 0 additions & 10 deletions packages/tests-e2e/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,4 @@ export default defineConfig({
},
},
],
// Workaround for https://github.com/microsoft/playwright/issues/36371
// It seems to be failing in our Github action
// https://github.com/opennextjs/opennextjs-aws/actions/runs/19116336570/job/54627469525#step:15:171
use: {
launchOptions: {
args: [
"--disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,DeferRendererTasksAfterInput",
],
},
},
});
6 changes: 3 additions & 3 deletions packages/tests-e2e/tests/appPagesRouter/parallel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from "@playwright/test";

test("Parallel routes", async ({ page }) => {
await page.goto("/");
await page.locator('[href="/parallel"]').click();
await page.getByRole("link", { name: "Parallel" }).click();

await page.waitForURL("/parallel");

Expand All @@ -13,13 +13,13 @@ test("Parallel routes", async ({ page }) => {
await expect(routeB).not.toBeVisible();

// Enable A, which should be visible but not B
await page.locator('input[name="a"]').check();
await page.getByTestId("enable-a").click();
routeA = page.getByText("Parallel Route A");
await expect(routeA).toBeVisible();
await expect(routeB).not.toBeVisible();

// Enable B, both should be visible
await page.locator('input[name="b"]').check();
await page.getByTestId("enable-b").click();
routeB = page.getByText("Parallel Route B");
await expect(routeA).toBeVisible();
await expect(routeB).toBeVisible();
Expand Down
4 changes: 2 additions & 2 deletions packages/tests-e2e/tests/appRouter/parallel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ test("Parallel routes", async ({ page }) => {
await expect(routeB).not.toBeVisible();

// Enable A, which should be visible but not B
await page.locator('input[name="a"]').check();
await page.getByTestId("enable-a").click();
routeA = page.getByText("Parallel Route A");
await expect(routeA).toBeVisible();
await expect(routeB).not.toBeVisible();

// Enable B, both should be visible
await page.locator('input[name="b"]').check();
await page.getByTestId("enable-b").click();
routeB = page.getByText("Parallel Route B");
await expect(routeA).toBeVisible();
await expect(routeB).toBeVisible();
Expand Down
Loading