Makes the shoot blocks smaller and livelier
At the owner's review: the shoot photos are smaller (MediaText's new `small` size), each shoot gets a square detail photo overlapping the main one, and the text, now at most 36rem wide, sits centred between the photos and the edge. Every shoot has its own band, alternating paper and paper.alt, instead of a hairline. Existing MediaText callers are unchanged. The route test expects the portfolio links once the portfolio page is indexed, so it stays green when that page goes live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,9 +30,14 @@ describe('ShootBlock', () => {
|
||||
expect(
|
||||
within(article).getByRole('heading', { level: 2 }),
|
||||
).toHaveTextContent('Newborn');
|
||||
expect(within(article).getByRole('img')).toHaveAccessibleName(
|
||||
expect(
|
||||
within(article)
|
||||
.getAllByRole('img')
|
||||
.map((img) => img.getAttribute('alt')),
|
||||
).toEqual([
|
||||
shoot('newborn').image.alt,
|
||||
);
|
||||
shoot('newborn').detailImage!.alt,
|
||||
]);
|
||||
expect(
|
||||
within(article).getByText(/De fotoshoot vindt bij jou thuis/),
|
||||
).toBeInTheDocument();
|
||||
@@ -68,8 +73,10 @@ describe('ShootBlock', () => {
|
||||
).toHaveAttribute('href', '/portfolio?shoot=portret');
|
||||
});
|
||||
|
||||
it('loads a priority photo straight away and others lazily', async () => {
|
||||
it('loads a priority photo straight away, its detail photo lazily', async () => {
|
||||
await renderBlock('newborn', { priority: true });
|
||||
expect(screen.getByRole('img')).not.toHaveAttribute('loading', 'lazy');
|
||||
const [main, detail] = screen.getAllByRole('img');
|
||||
expect(main).not.toHaveAttribute('loading', 'lazy');
|
||||
expect(detail).toHaveAttribute('loading', 'lazy');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user