Refactor: better rounding (#1594)

This commit is contained in:
Alex Christoffer Rasmussen
2025-06-05 06:13:49 +02:00
committed by Carlos Valente
parent c1054711b0
commit b9ab1c6fd7
10 changed files with 93 additions and 181 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ test('time until absolute', async ({ page }) => {
await page.getByTestId('entry-1').getByTestId('time-input-duration').fill('30s');
await page.getByTestId('entry-1').getByTestId('time-input-duration').press('Enter');
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('29s');
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('30s');
await expect(page.getByTestId('entry-3').locator('#event-block')).toContainText('10m');
await expect(page.getByTestId('entry-4').locator('#event-block')).toContainText('20m');
});
@@ -69,7 +69,7 @@ test('time until relative', async ({ page }) => {
await page.getByTestId('entry-1').getByTestId('time-input-duration').fill('30s');
await page.getByTestId('entry-1').getByTestId('time-input-duration').press('Enter');
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('29s');
await expect(page.getByTestId('entry-2').locator('#event-block')).toContainText('30s');
await expect(page.getByTestId('entry-3').locator('#event-block')).toContainText('10m');
await expect(page.getByTestId('entry-4').locator('#event-block')).toContainText('20m');
});