dx: fix flaky test
Massimo Melina committed
Mar 13, 2026 at 23:59 UTC
b2cc74c71aae998df375c71fdb69fd81b42294f8
2 files changed
+2
-2
admin/src/InternetPage.ts
+1
-1
@@ -38,7 +38,7 @@ export default function InternetPage({ setTitleSide }: PageProps) {
38
const localColor = with_([status.data?.http?.error, status.data?.https?.error], ([h, s]) =>
39
h && s ? 'error' : h || s ? 'warning' : 'success')
40
const nat = useApiEx<typeof adminApis.get_nat>('get_nat', {}, { timeout: 20 })
41
- const { data: publicIps } = useApiEx<typeof adminApis.get_public_ips>('get_public_ips')
41
+ const { data: publicIps } = useApiEx<typeof adminApis.get_public_ips>('get_public_ips', { timeout: 20 })
42
const { data } = nat
43
const port = data?.internalPort
44
const wrongMap = data?.mapped && data.mapped.private.port !== port && data.mapped.private.port
e2e/frontend.spec.ts
+1
-1
@@ -262,7 +262,7 @@ test('admin1', async ({ page }) => {
262
await screenshot(page)
263
await page.getByRole('main').click()
264
await clickAdminMenu(page, 'Internet')
265
- await expect(page.getByText('Server')).toBeVisible({ timeout: 10000 }) // wait for data (get_nat can be very slow)
265
+ await expect(page.getByText('Server')).toBeVisible({ timeout: 15000 }) // wait for data (get_nat can be very slow)
266
await page.mouse.click(1, 1) // avoid focus inconsistencies
267
await screenshot(page)
268
await clickAdminMenu(page, 'Logout')