Read Pitch as a profile: stations and stack before the case cards.
The four public cases stay on the page; the timeline no longer follows them. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 }],
|
||||
|
||||
@@ -2,23 +2,14 @@
|
||||
<div class="content-container stack page">
|
||||
<app-page-hero [hero]="copy.hero" [ctas]="copy.ctas" />
|
||||
@for (section of copy.sections; track section.id) {
|
||||
<app-content-section [section]="section" />
|
||||
@if (section.id === 'profile') {
|
||||
<app-content-section [section]="section" />
|
||||
<ul class="stack">
|
||||
@for (line of copy.profile; track $index) {
|
||||
<li>{{ line }}</li>
|
||||
}
|
||||
</ul>
|
||||
<app-metric-list [metrics]="copy.metrics" [labelledBy]="'section-profile'" />
|
||||
}
|
||||
@if (section.id === 'featured-cases') {
|
||||
<div class="stack">
|
||||
@for (caseStudy of featuredCases(); track caseStudy.id) {
|
||||
<app-case-card [caseStudy]="caseStudy" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<section class="stack" [attr.aria-labelledby]="'pitch-timeline'">
|
||||
<h2 id="pitch-timeline">{{ copy.timelineHeading }}</h2>
|
||||
<ol class="stack">
|
||||
@@ -48,6 +39,16 @@
|
||||
}
|
||||
</ul>
|
||||
</section>
|
||||
}
|
||||
@if (section.id === 'featured-cases') {
|
||||
<app-content-section [section]="section" />
|
||||
<div class="stack">
|
||||
@for (caseStudy of featuredCases(); track caseStudy.id) {
|
||||
<app-case-card [caseStudy]="caseStudy" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
<app-cta-row [ctas]="copy.ctas" />
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user