···
7
7
import SembleContainerSkeleton from '@/features/semble/containers/sembleContainer/Skeleton.SembleContainer';
8
8
9
9
interface Props {
10
10
-
searchParams: Promise<{ id: string | undefined; viaCardId?: string; sembleTab?: string }>;
10
10
+
searchParams: Promise<{
11
11
+
id: string | undefined;
12
12
+
viaCardId?: string;
13
13
+
sembleTab?: string;
14
14
+
}>;
11
15
}
12
16
13
17
export async function generateMetadata({
14
18
searchParams,
15
19
}: {
16
16
-
searchParams: Promise<{ id: string | undefined; viaCardId?: string; sembleTab?: string }>;
20
20
+
searchParams: Promise<{
21
21
+
id: string | undefined;
22
22
+
viaCardId?: string;
23
23
+
sembleTab?: string;
24
24
+
}>;
17
25
}): Promise<Metadata> {
18
26
const { id: url } = await searchParams;
19
27
···
7
7
* /settings/* and /profile (bare) redirect via the client-side useAuth fallback.
8
8
*/
9
9
10
10
-
const protectedRoutes = [
11
11
-
'/home',
12
12
-
'/notifications',
13
13
-
'/settings',
14
14
-
'/profile',
15
15
-
];
10
10
+
const protectedRoutes = ['/home', '/notifications', '/settings', '/profile'];
16
11
17
12
for (const route of protectedRoutes) {
18
13
test(`unauthenticated ${route} redirects to /login`, async ({ page }) => {
···
25
25
});
26
26
27
27
test('renders community highlights section', async ({ page }) => {
28
28
-
await expect(
29
29
-
page.getByText('Highlights from our community'),
30
30
-
).toBeVisible();
28
28
+
await expect(page.getByText('Highlights from our community')).toBeVisible();
31
29
32
32
-
await expect(
33
33
-
page.getByRole('link', { name: 'Explore' }),
34
34
-
).toBeVisible();
30
30
+
await expect(page.getByRole('link', { name: 'Explore' })).toBeVisible();
35
31
});
36
36
-
37
32
38
33
test('renders footer with social and doc links', async ({ page }) => {
39
34
await expect(
40
35
page.getByRole('link', { name: 'Follow our blog' }),
41
36
).toBeVisible();
42
42
-
await expect(
43
43
-
page.getByRole('link', { name: 'Semble Docs' }),
44
44
-
).toBeVisible();
37
37
+
await expect(page.getByRole('link', { name: 'Semble Docs' })).toBeVisible();
45
38
});
46
39
});