Compare commits

...

2 Commits

Author SHA1 Message Date
Gregor Vostrak
4432174439 show null billable rate as empty not as 0 to avoid confusion 2026-05-27 13:12:59 +02:00
Gregor Vostrak
ccb16118a9 fix e2e selectors to adapt to reka-ui change; 2026-05-27 13:12:10 +02:00
4 changed files with 9 additions and 9 deletions

View File

@@ -469,7 +469,7 @@ test('test that creating a report with an expiration date works', async ({ page,
await datePicker.click();
// Select a date in the next month
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
await page.getByRole('button', { name: /Next/i }).click();
await page.getByRole('gridcell').filter({ hasText: /^15$/ }).first().click();
@@ -547,7 +547,7 @@ test('test that editing a report to make it public with expiration date works',
await datePicker.click();
// Select a date in the next month
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
await page.getByRole('button', { name: /Next/i }).click();
await page.getByRole('gridcell').filter({ hasText: /^20$/ }).first().click();
@@ -741,7 +741,7 @@ test('test that updating expiration date on already-public report works', async
await datePicker.click();
// Select the 25th of next month
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
await page.getByRole('button', { name: /Next/i }).click();
await page.getByRole('gridcell').filter({ hasText: /^25$/ }).first().click();

View File

@@ -462,7 +462,7 @@ test('test that setting a date in the create modal works', async ({ page }) => {
await startDatePicker.click();
// Wait for calendar to appear
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
// Navigate to previous month and select the 15th (a day that's always in the middle of the month)
@@ -515,7 +515,7 @@ test('test that updating the date via the time entry row range selector works',
await startDatePicker.click();
// Wait for the calendar to appear and select a day
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
// Navigate to previous month and select the 5th
@@ -568,7 +568,7 @@ test('test that updating the end date via the time entry row range selector work
await endDatePicker.click();
// Wait for the calendar to appear
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
// Navigate to next month and select the 20th (to ensure end > start)

View File

@@ -293,7 +293,7 @@ test('test that setting an end time with a different date via the timetracker ra
await endDatePicker.click();
// Calendar should appear
const calendarGrid = page.getByRole('grid');
const calendarGrid = page.getByRole('gridcell').first();
await expect(calendarGrid).toBeVisible({ timeout: 5000 });
// Navigate to the next month and select a day to ensure end > start

View File

@@ -24,7 +24,7 @@ const billableRateInput = ref<HTMLInputElement | null>(null);
useFocus(billableRateInput, { initialValue: props.focus });
function formatValue(modelValue: number | null) {
return modelValue ? modelValue / 100 : 0;
return modelValue ? modelValue / 100 : null;
}
</script>
@@ -43,7 +43,7 @@ function formatValue(modelValue: number | null) {
currencyDisplay: 'code',
currencySign: 'accounting',
}"
@update:model-value="(value) => (model = value * 100)">
@update:model-value="(value) => (model = value ? value * 100 : null)">
<NumberFieldContent>
<NumberFieldDecrement />
<NumberFieldInput placeholder="Billable Rate" />