feat: simplify event date labels in product components for clearer display
This commit is contained in:
@@ -141,7 +141,7 @@ describe('ProductVerticalWithCartCardComponent', () => {
|
||||
fixture.componentRef.setInput('variants', [
|
||||
{
|
||||
id: 10,
|
||||
values: { event_date: { value: '2', label: '10/10/2026 · 09:00 a 18:00' } },
|
||||
values: { event_date: { value: '2', label: '10/10/2026' } },
|
||||
},
|
||||
]);
|
||||
fixture.detectChanges();
|
||||
@@ -150,7 +150,7 @@ describe('ProductVerticalWithCartCardComponent', () => {
|
||||
'.product-vertical-with-cart-card__variant-select option',
|
||||
) as HTMLOptionElement;
|
||||
|
||||
expect(option.textContent?.trim()).toBe('10/10/2026 · 09:00 a 18:00');
|
||||
expect(option.textContent?.trim()).toBe('10/10/2026');
|
||||
expect((fixture.componentInstance as any).selectedValues()).toEqual({ event_date: '2' });
|
||||
});
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@ describe('VariantSelectorComponent', () => {
|
||||
fixture.componentRef.setInput('variants', [
|
||||
{
|
||||
value: 1,
|
||||
values: { event_date: { value: '2', label: '10/10/2026 · 09:00 a 18:00' } },
|
||||
values: { event_date: { value: '2', label: '10/10/2026' } },
|
||||
},
|
||||
]);
|
||||
fixture.detectChanges();
|
||||
|
||||
const option = fixture.nativeElement.querySelector('option') as HTMLOptionElement;
|
||||
expect(option.textContent?.trim()).toBe('10/10/2026 · 09:00 a 18:00');
|
||||
expect(option.textContent?.trim()).toBe('10/10/2026');
|
||||
expect((fixture.componentInstance as any).selectedValues()).toEqual({ event_date: '2' });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user