mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
add currency to organization update endpoint
This commit is contained in:
committed by
Constantin Graf
parent
4975cf1dab
commit
24875f9424
@@ -55,6 +55,33 @@ test('test that organization name can be updated', async ({ page }) => {
|
||||
);
|
||||
});
|
||||
|
||||
test('test that organization currency can be updated', async ({ page }) => {
|
||||
await goToOrganizationSettings(page);
|
||||
await page.getByLabel('Currency', { exact: true }).selectOption('USD');
|
||||
await Promise.all([
|
||||
page.waitForRequest(
|
||||
(request) =>
|
||||
request.url().includes('/api/v1/organizations/') &&
|
||||
request.method() === 'PUT' &&
|
||||
request.postDataJSON().currency === 'USD'
|
||||
),
|
||||
page.waitForResponse(
|
||||
async (response) =>
|
||||
response.url().includes('/api/v1/organizations/') &&
|
||||
response.request().method() === 'PUT' &&
|
||||
response.status() === 200 &&
|
||||
(await response.json()).data.currency === 'USD'
|
||||
),
|
||||
page
|
||||
.locator('form')
|
||||
.filter({ hasText: 'Organization Name' })
|
||||
.getByRole('button', { name: 'Save' })
|
||||
.click(),
|
||||
]);
|
||||
await page.reload();
|
||||
await expect(page.getByLabel('Currency', { exact: true })).toHaveValue('USD');
|
||||
});
|
||||
|
||||
test('test that organization billable rate can be updated with all existing time entries', async ({
|
||||
page,
|
||||
}) => {
|
||||
|
||||
Reference in New Issue
Block a user