Skip to content

Commit 98f6695

Browse files
committed
feat add tests
1 parent 6578054 commit 98f6695

File tree

33 files changed

+394
-136
lines changed

33 files changed

+394
-136
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default function AuthLayout(props: LayoutProps<'/'>) {
2+
return (
3+
<div>
4+
<div style={{ padding: '20px', backgroundColor: '#f5f5f5' }}>
5+
<h2>Authentication</h2>
6+
<nav>
7+
<a href="/login" style={{ marginRight: '10px' }}>
8+
Login
9+
</a>
10+
<a href="/register">Register</a>
11+
</nav>
12+
</div>
13+
<main style={{ padding: '20px' }}>{props.children}</main>
14+
</div>
15+
)
16+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export default function LoginPage(props: PageProps<'/login'>) {
22
return (
33
<div>
4-
<h2>Login Page</h2>
5-
<p>Please log in to continue.</p>
4+
<h1>Login</h1>
5+
<p>Please sign in to your account.</p>
66
</div>
77
)
88
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default async function ResetPasswordPage(
2+
props: PageProps<'/reset-password/[token]'>
3+
) {
4+
const { token } = await props.params
5+
6+
return (
7+
<div>
8+
<h1>Reset Password</h1>
9+
<p>Enter your new password using token: {token}</p>
10+
</div>
11+
)
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default async function BlogPost(props: PageProps<'/blog/[slug]'>) {
2+
const { slug } = await props.params
3+
return <div>Blog post: {slug}</div>
4+
}

test/e2e/typed-routes-new/app/dashboard/@analytics/page.tsx renamed to test/e2e/app-dir/typed-routes/app/dashboard/@analytics/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function AnalyticsPage() {
1+
export default function AnalyticsPage(props: PageProps<'/dashboard'>) {
22
return (
33
<div>
44
<h4>Analytics Dashboard</h4>

test/e2e/typed-routes-new/app/dashboard/@analytics/settings/page.tsx renamed to test/e2e/app-dir/typed-routes/app/dashboard/@analytics/settings/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export default function AnalyticsSettingsPage() {
1+
export default function AnalyticsSettingsPage(
2+
props: PageProps<'/dashboard/settings'>
3+
) {
24
return (
35
<div>
46
<h4>Analytics Settings</h4>

test/e2e/typed-routes-new/app/dashboard/@team/page.tsx renamed to test/e2e/app-dir/typed-routes/app/dashboard/@team/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default function TeamPage() {
1+
export default function TeamPage(props: PageProps<'/dashboard'>) {
22
return (
33
<div>
44
<h4>Team Dashboard</h4>

test/e2e/typed-routes-new/app/dashboard/@team/settings/page.tsx renamed to test/e2e/app-dir/typed-routes/app/dashboard/@team/settings/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export default function TeamSettingsPage() {
1+
export default function TeamSettingsPage(
2+
props: PageProps<'/dashboard/settings'>
3+
) {
24
return (
35
<div>
46
<h4>Team Settings</h4>

test/e2e/typed-routes-new/app/dashboard/layout.tsx renamed to test/e2e/app-dir/typed-routes/app/dashboard/layout.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import React from 'react'
2-
31
export default function DashboardLayout(props: LayoutProps<'/dashboard'>) {
42
return (
53
<div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function DashboardPage(props: PageProps<'/dashboard'>) {
2+
return <div>Dashboard Home</div>
3+
}

0 commit comments

Comments
 (0)