diff --git a/src/app/features/page-rendering.spec.ts b/src/app/features/page-rendering.spec.ts index 0e0c52b..7f84f2b 100644 --- a/src/app/features/page-rendering.spec.ts +++ b/src/app/features/page-rendering.spec.ts @@ -161,6 +161,27 @@ describe('page rendering, semantics and accessibility', () => { } }); + it('renders pitch as profile, stations, stack, then cases', async () => { + TestBed.configureTestingModule({ + providers: [provideRouter(routes), { provide: SITE_CONTENT, useValue: SITE_CONTENT_DATA }], + }); + + const harness = await RouterTestingHarness.create(); + + for (const path of ['/pitch', '/en/pitch']) { + await harness.navigateByUrl(path); + const root = harness.routeNativeElement as HTMLElement; + const headingIds = [...root.querySelectorAll('h2')].map((heading) => heading.id); + expect(headingIds, path).toEqual([ + 'section-profile', + 'pitch-timeline', + 'pitch-stack', + 'section-featured-cases', + ]); + expect(root.querySelectorAll('app-case-card')).toHaveLength(CASE_STUDY_IDS.length); + } + }); + it('renders pitch in both locales with a single h1', async () => { TestBed.configureTestingModule({ providers: [provideRouter(routes), { provide: SITE_CONTENT, useValue: SITE_CONTENT_DATA }], diff --git a/src/app/features/pitch/pitch.html b/src/app/features/pitch/pitch.html index 61ecf54..fc87b8c 100644 --- a/src/app/features/pitch/pitch.html +++ b/src/app/features/pitch/pitch.html @@ -2,16 +2,46 @@
@for (section of copy.sections; track section.id) { - @if (section.id === 'profile') { +
    @for (line of copy.profile; track $index) {
  • {{ line }}
  • }
+
+

{{ copy.timelineHeading }}

+
    + @for (entry of copy.timeline; track entry.id) { +
  1. +

    + {{ entry.period }} + · {{ entry.role }} +

    +

    {{ entry.body }}

    +
  2. + } +
+
+
+

{{ copy.stackHeading }}

+
    + @for (group of copy.coreStack; track group.id) { +
  • +

    + {{ group.title }} + @if (group.body) { + — {{ group.body }} + } +

    +
  • + } +
+
} @if (section.id === 'featured-cases') { +
@for (caseStudy of featuredCases(); track caseStudy.id) { @@ -19,35 +49,6 @@
} } -
-

{{ copy.timelineHeading }}

-
    - @for (entry of copy.timeline; track entry.id) { -
  1. -

    - {{ entry.period }} - · {{ entry.role }} -

    -

    {{ entry.body }}

    -
  2. - } -
-
-
-

{{ copy.stackHeading }}

-
    - @for (group of copy.coreStack; track group.id) { -
  • -

    - {{ group.title }} - @if (group.body) { - — {{ group.body }} - } -

    -
  • - } -
-
}