From f1068781eec06920b39c66d41d129fec76027b68 Mon Sep 17 00:00:00 2001 From: Zakk Date: Fri, 25 Sep 2026 22:48:46 +1000 Subject: [PATCH] test(connections): export CSV only after the filter applies The search filter reaches the list through a deferred value, so clicking Export right after typing could export all 1000 rows (CI got 1001 lines, expected 151). The test now waits until the grid reports the 150 matching rows before exporting. --- e2e/connections.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e/connections.spec.ts b/e2e/connections.spec.ts index e2da6058..c486ca79 100644 --- a/e2e/connections.spec.ts +++ b/e2e/connections.spec.ts @@ -328,6 +328,9 @@ test('phone details retain routing diagnostics and omit unsupported flow actions test('the connection list exports the filtered rows as CSV', async ({page}) => { await page.goto('/#/connections?tab=list'); await page.locator('.rp-toolbar input').fill('api.telegram.org'); + // The filter applies through a deferred value; export only once the list shows the 150 matches and its header. + const grid = page.getByRole('grid', {name: 'Connections'}).or(page.getByRole('treegrid', {name: 'Connections'})); + await expect(grid).toHaveAttribute('aria-rowcount', '151'); const download = page.waitForEvent('download'); await page.getByRole('button', {name: 'Export CSV', exact: true}).click(); const file = await download;