diff --git a/src/frontend/tests/pages/pui_dashboard.spec.ts b/src/frontend/tests/pages/pui_dashboard.spec.ts index 8b3958319a..337d77f896 100644 --- a/src/frontend/tests/pages/pui_dashboard.spec.ts +++ b/src/frontend/tests/pages/pui_dashboard.spec.ts @@ -200,18 +200,15 @@ test('Dashboard - Preserve widget sizes', async ({ browser }) => { password: user.testcred }); - (await api) - .patch('user/me/profile/', { - data: { - widgets: { - widgets: ['ovr-so'], - layouts: inflated - } + const resp = await (await api).patch('user/me/profile/', { + data: { + widgets: { + widgets: ['ovr-so'], + layouts: inflated } - }) - .then((resp) => { - expect(resp.status()).toBe(200); - }); + } + }); + expect(resp.status()).toBe(200); await page.reload(); await page.getByText('Overdue Sales Orders').waitFor();