change e2e tests to use organization default values for money formatting

This commit is contained in:
Gregor Vostrak
2025-05-09 18:34:23 +02:00
parent 68f636c8ff
commit 02a8367d16
4 changed files with 26 additions and 18 deletions

View File

@@ -1,7 +1,7 @@
import { expect, Page } from '@playwright/test';
import { PLAYWRIGHT_BASE_URL } from '../playwright/config';
import { test } from '../playwright/fixtures';
import { formatCents, getOrganizationCurrencySymbol } from '../resources/js/packages/ui/src/utils/money';
import { formatCentsWithOrganizationDefaults } from './utils/money';
import type { CurrencyFormat } from '../resources/js/packages/ui/src/utils/money';
async function goToProjectsOverview(page: Page) {
@@ -132,13 +132,7 @@ test('test that updating billable rate works with existing time entries', async
page
.getByRole('row')
.first()
.getByText(formatCents(
newBillableRate * 100,
'EUR',
'symbol-before' as CurrencyFormat,
'€',
'space-point'
))
.getByText(formatCentsWithOrganizationDefaults(newBillableRate * 100))
).toBeVisible();
});