Gives a featured package a quiet highlight and makes the optional CMS fields explicit
A featured card gets a heidegroen top rule, border and a small "Uitgelicht" tab on its top edge; the tab sits on the border so the row keeps its layout. Tests and docs state that the site does not depend on description, price note or button label. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,22 @@ describe('mapOfferings', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('mapOfferings without description, price note and button label', () => {
|
||||
const bare = { slug: 'x', title: 'X', price: '€ 100', features: ['a'] };
|
||||
|
||||
it.each([
|
||||
['absent', {}],
|
||||
['null', { description: null, priceNote: null, ctaLabel: null }],
|
||||
['empty', { description: '', priceNote: ' ', ctaLabel: '' }],
|
||||
])('still gives the card when they are %s', (_name, extra) => {
|
||||
const mapped = mapOfferings([{ ...bare, ...extra }]);
|
||||
expect(mapped?.packages).toHaveLength(1);
|
||||
expect(mapped?.packages[0]).toMatchObject({ id: 'x', price: 100 });
|
||||
expect(mapped?.packages[0].description).toBeUndefined();
|
||||
expect(mapped?.packages[0].priceNote).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('mapBanner', () => {
|
||||
it('neemt titel, tekst en een volledige link', () => {
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user