feat: add WorkUnitEditorModal component for managing work units
- Implemented WorkUnitEditorModal.razor for creating and editing work units. - Added necessary services and parameters for data handling. - Included computed values for calculated hours, gross income, and net income. - Enhanced UI with modal structure and styling. fix: update _Imports.razor to include Shared components - Added reference to WorkUnitEditorModal in _Imports.razor for accessibility. feat: extend CalendarEventDocument with StartDate and EndDate properties - Updated CalendarEventDocument.cs to include StartDate and EndDate for better event management. feat: create CalendarEventFormatter for event description formatting - Introduced CalendarEventFormatter.cs to handle display logic for calendar events. fix: enhance CouchbaseLiteWorkDayService for calendar event management - Updated methods to handle new StartDate and EndDate properties in calendar events. - Improved event saving and deletion logic. test: add Playwright tests for date locale functionality - Created date-locale.spec.ts to verify date picker behavior and formatting. style: enhance app.css with modal and date input styles - Added styles for calendar modal, date input, and related components for improved UI.
This commit is contained in:
parent
0d003903cf
commit
bc28d869eb
14 changed files with 1638 additions and 150 deletions
30
tests/playwright/date-locale.spec.ts
Normal file
30
tests/playwright/date-locale.spec.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { expect, test } from '@playwright/test';
|
||||
|
||||
test.use({
|
||||
locale: 'en-US'
|
||||
});
|
||||
|
||||
async function waitForBlazorConnection(page: Parameters<typeof test>[0]['page']) {
|
||||
await page.waitForTimeout(750);
|
||||
}
|
||||
|
||||
test('date picker popup is monday-first and uses european formatting', async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1440, height: 960 });
|
||||
await page.goto('/calendar-event', { waitUntil: 'networkidle' });
|
||||
await waitForBlazorConnection(page);
|
||||
|
||||
const startDateInput = page.getByTestId('calendar-event-start-date-input');
|
||||
await expect(startDateInput).toBeVisible();
|
||||
|
||||
await startDateInput.click();
|
||||
|
||||
const popup = page.getByTestId('calendar-event-start-date-popover');
|
||||
await expect(popup).toBeVisible();
|
||||
|
||||
const weekdayHeaders = popup.getByTestId('date-picker-weekday');
|
||||
await expect(weekdayHeaders).toHaveCount(7);
|
||||
await expect(weekdayHeaders.first()).toHaveText(/^(Mon|Lun)$/);
|
||||
|
||||
await page.getByTestId('calendar-event-start-date-day-2026-04-22').click();
|
||||
await expect(startDateInput).toHaveValue(/^22\/\d{2}\/\d{4}$/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue