Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[not for merge] Add fixture highlighting slot layout remount under test/e2e/app-dir/hello-world #74800

Draft
wants to merge 1 commit into
base: canary
Choose a base branch
from
Draft
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
27 changes: 27 additions & 0 deletions test/e2e/app-dir/hello-world/app/@audience/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'use client'
import * as React from 'react'
import Link from 'next/link'

export default function AudienceLayout({ children }) {
React.useEffect(() => {
console.log('mount')
}, [])

return (
<fieldset>
<legend>app/@audience/layout</legend>
<ul>
<li>
<Link href="/">home</Link>
</li>
<li>
<Link href="/one">one</Link>
</li>
<li>
<Link href="/two">two</Link>
</li>
</ul>
{children}
</fieldset>
)
}
7 changes: 7 additions & 0 deletions test/e2e/app-dir/hello-world/app/@audience/one/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function AudienceOnePage() {
return (
<fieldset>
<legend>app/@audience/one/page</legend>
</fieldset>
)
}
7 changes: 7 additions & 0 deletions test/e2e/app-dir/hello-world/app/@audience/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function AudiencePage() {
return (
<fieldset>
<legend>app/@audience/page</legend>
</fieldset>
)
}
7 changes: 7 additions & 0 deletions test/e2e/app-dir/hello-world/app/@audience/two/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function AudienceTwoPage() {
return (
<fieldset>
<legend>app/@audience/two/page</legend>
</fieldset>
)
}
7 changes: 7 additions & 0 deletions test/e2e/app-dir/hello-world/app/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Page() {
return (
<fieldset>
<legend>app/default</legend>
</fieldset>
)
}
16 changes: 16 additions & 0 deletions test/e2e/app-dir/hello-world/app/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:focus-visible {
outline-color: red;
}

@keyframes highlight {
from {
background-color: green;
}
to {
background-color: white;
}
}

legend {
animation: highlight 1s ease-in-out 1;
}
18 changes: 16 additions & 2 deletions test/e2e/app-dir/hello-world/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
export default function Root({ children }: { children: React.ReactNode }) {
'use client'
import './global.css'
export default function Root({
children,
audience,
}: {
children: React.ReactNode
audience: React.ReactNode
}) {
return (
<html>
<body>{children}</body>
<body>
<fieldset>
<legend>app/layout</legend>
{children}
{audience}
</fieldset>
</body>
</html>
)
}
6 changes: 5 additions & 1 deletion test/e2e/app-dir/hello-world/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export default function Page() {
return <p>hello world</p>
return (
<fieldset>
<legend>app/page</legend>
</fieldset>
)
}
Loading