mirror of
https://github.com/Zakkaus/doona.git
synced 2026-12-05 16:02:03 +00:00
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.
This commit is contained in:
1 parent
ca2b5be0fe
commit
f1068781ee
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user