feat: add date display toggle for shifts and update styles

Enhanced the ShiftWhen component to conditionally render the date based on a new prop, showDate. Updated app.css to include a new class for date styling. Modified tests to verify the presence and absence of date information in the rendered output.
This commit is contained in:
blake committed 2026-11-02 11:28:24 -06:00
1 parent fb30b6e92b
commit e7fc1e03ae
4 files changed
+17 -2

No files matched your search

+5
View File
@@ -150,6 +150,9 @@ describe('public pages', () => {
const shiftHtml = await shift.text();
expect(shift.status).toBe(200);
expect(shiftHtml).toContain('Open Sorting');
expect(shiftHtml).toContain('Thursday, October 15, 2026');
expect(shiftHtml).toContain('dateTime="2026-10-15"');
expect(shiftHtml).toContain('9:00 AM');
expect(shiftHtml).not.toContain('class="crumb"');
const shiftMain = shiftHtml.slice(shiftHtml.indexOf('<main'), shiftHtml.indexOf('class="footer"'));
expect(shiftMain).not.toContain('Weekly pantry');
@@ -466,6 +469,8 @@ describe('public pages', () => {
expect(openPane).toContain('>Sign up');
expect(openPane).toContain('href="/s/');
expect(openPane).toContain('data-signup=""');
expect(openPane).toContain('9:00 AM');
expect(openPane).not.toContain('Wednesday, October 21, 2026');
});
it('keeps a finished shift on today and drops that day at midnight', async () => {