mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
test(planner): pin a weekday in the opening hours inspector test so it passes on Sundays
This commit is contained in:
@@ -689,6 +689,12 @@ describe('PlaceInspector', () => {
|
||||
});
|
||||
|
||||
it('FE-PLANNER-INSPECTOR-2472: the own e-mail and hours show, the hours ahead of looked-up ones', async () => {
|
||||
// The collapsed row shows today's hours, so on a Sunday it reads "Closed"
|
||||
// and the button below is not found. Pin a Monday; only Date is faked so
|
||||
// userEvent's timers keep running.
|
||||
vi.useFakeTimers({ toFake: ['Date'] });
|
||||
vi.setSystemTime(new Date('2026-09-28T10:00:00'));
|
||||
onTestFinished(() => { vi.useRealTimers(); });
|
||||
const user = userEvent.setup();
|
||||
const week = JSON.stringify(Array.from({ length: 7 }, (_, i) => (i === 6 ? { closed: true } : { closed: false, open: '08:00', close: '12:00' })));
|
||||
const p = buildPlace({ id: 302, email: 'hi@bakery.test', opening_hours: week } as any);
|
||||
|
||||
Reference in New Issue
Block a user