mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
add frontend format support for currencies, add currencies endpoint
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { expect, Page } from '@playwright/test';
|
||||
import { PLAYWRIGHT_BASE_URL } from '../playwright/config';
|
||||
import { test } from '../playwright/fixtures';
|
||||
import { formatCents } from '../resources/js/packages/ui/src/utils/money';
|
||||
import { formatCents, getOrganizationCurrencySymbol } from '../resources/js/packages/ui/src/utils/money';
|
||||
import type { CurrencyFormat } from '../resources/js/packages/ui/src/utils/money';
|
||||
|
||||
async function goToProjectsOverview(page: Page) {
|
||||
await page.goto(PLAYWRIGHT_BASE_URL + '/projects');
|
||||
@@ -61,6 +62,12 @@ test('test that updating project member billable rate works for existing time en
|
||||
page
|
||||
.getByRole('row')
|
||||
.first()
|
||||
.getByText(formatCents(newBillableRate * 100, 'EUR'))
|
||||
.getByText(formatCents(
|
||||
newBillableRate * 100,
|
||||
'EUR',
|
||||
'symbol-before' as CurrencyFormat,
|
||||
'€',
|
||||
'space-point'
|
||||
))
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { expect, Page } from '@playwright/test';
|
||||
import { PLAYWRIGHT_BASE_URL } from '../playwright/config';
|
||||
import { test } from '../playwright/fixtures';
|
||||
import { formatCents } from '../resources/js/packages/ui/src/utils/money';
|
||||
import { formatCents, getOrganizationCurrencySymbol } from '../resources/js/packages/ui/src/utils/money';
|
||||
import type { CurrencyFormat } from '../resources/js/packages/ui/src/utils/money';
|
||||
|
||||
async function goToProjectsOverview(page: Page) {
|
||||
await page.goto(PLAYWRIGHT_BASE_URL + '/projects');
|
||||
@@ -131,7 +132,13 @@ test('test that updating billable rate works with existing time entries', async
|
||||
page
|
||||
.getByRole('row')
|
||||
.first()
|
||||
.getByText(formatCents(newBillableRate * 100, 'EUR'))
|
||||
.getByText(formatCents(
|
||||
newBillableRate * 100,
|
||||
'EUR',
|
||||
'symbol-before' as CurrencyFormat,
|
||||
'€',
|
||||
'space-point'
|
||||
))
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user