Skip to content

Commit d6c5faa

Browse files
committed
Refactor Testimonials component to Lit web component, update tests to Test/webComponent pattern, update e2e test
1 parent a70bcc4 commit d6c5faa

9 files changed

Lines changed: 487 additions & 758 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { CollectionEntry } from 'astro:content'
2+
import { mockTestimonials } from '@components/Testimonials/client/__fixtures__/mockData'
3+
4+
export type TestimonialCollectionEntry = CollectionEntry<'testimonials'>
5+
6+
type MinimalTestimonialEntry = Pick<TestimonialCollectionEntry, 'id' | 'slug' | 'body' | 'data' | 'collection'>
7+
8+
const collectionFixture: MinimalTestimonialEntry[] = mockTestimonials.map((testimonial, index) => ({
9+
id: testimonial.id,
10+
slug: testimonial.id,
11+
body: testimonial.content,
12+
collection: 'testimonials',
13+
data: {
14+
name: testimonial.author,
15+
organization: testimonial.company ?? testimonial.role,
16+
publishDate: new Date(2024, index, 1).toISOString(),
17+
},
18+
}))
19+
20+
export default collectionFixture as TestimonialCollectionEntry[]

src/components/Testimonials/__fixtures__/domHelpers.ts

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)