Skip to content

Commit e785d2e

Browse files
committed
Move Breadcrumbs component to use /server directory, implement structured data test in e2e test case for Breadcrumbs
1 parent 02f249d commit e785d2e

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/components/Breadcrumbs/index.astro‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ const breadcrumbs = generateBreadcrumbs(path, pageTitle)
2020

2121
{
2222
breadcrumbs.length > 1 && (
23-
<div class="mx-auto max-w-[75rem] w-[90%] mt-4">
23+
<div class="mx-auto max-w-300 w-[90%] mt-4">
2424
<nav aria-label="Breadcrumb" class="breadcrumbs pl-8">
25-
<ol class="flex items-center space-x-2 text-sm text-[color:var(--color-text-offset)]">
25+
<ol class="flex items-center space-x-2 text-sm text-offset">
2626
{breadcrumbs.map((item, index) => (
2727
<li class="flex items-center">
2828
{index > 0 && (
2929
<svg
30-
class="w-4 h-4 mx-2 text-[color:var(--color-text-offset)] opacity-60"
30+
class="w-4 h-4 mx-2 text-offset opacity-60"
3131
fill="none"
3232
stroke="currentColor"
3333
viewBox="0 0 24 24"
@@ -43,13 +43,13 @@ const breadcrumbs = generateBreadcrumbs(path, pageTitle)
4343
)}
4444

4545
{item.isCurrentPage ? (
46-
<span class="text-[color:var(--color-text)] font-medium" aria-current="page">
46+
<span class="text-text font-medium" aria-current="page">
4747
{item.label}
4848
</span>
4949
) : (
5050
<a
5151
href={item.href}
52-
class="text-[color:var(--color-primary)] hover:text-[color:var(--color-primary-offset)] hover:underline transition-colors duration-200"
52+
class="text-primary hover:text-primary-offset hover:underline transition-colors duration-200"
5353
>
5454
{item.label}
5555
</a>

src/components/Breadcrumbs/__tests__/server.spec.ts renamed to src/components/Breadcrumbs/server/__tests__/index.spec.ts

File renamed without changes.
File renamed without changes.

‎test/e2e/specs/04-components/breadcrumbs.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ test.describe('Breadcrumbs Component', () => {
107107
await page.expectElementVisible('nav[aria-label="Breadcrumb"]')
108108
})
109109

110-
test.skip('@wip breadcrumbs have structured data', async ({ page: playwrightPage }) => {
110+
test('@ready breadcrumbs have structured data', async ({ page: playwrightPage }) => {
111111
// Expected: Should include JSON-LD BreadcrumbList schema
112112
const page = await BasePage.init(playwrightPage)
113113
await setupTestPage(playwrightPage, '/articles')

0 commit comments

Comments
 (0)