feat(ui): action bar is contextualizez accross sections
- [download] + [remove from recent] for recent section - [download] + [remove from favorite] for favorite section - [restore] + [permanent delete] for trash section
This commit is contained in:
@@ -55,8 +55,12 @@ test('favorites batch select-all then move dialog', async ({ page }) => {
|
||||
await page.getByTestId('resource-list-select-all-checkbox').check();
|
||||
await expect(page.getByTestId('resource-list-batch-close-btn')).toBeVisible();
|
||||
|
||||
// Batch-move opens the move dialog; cancel it.
|
||||
await page.getByTestId('favorites-batch-move-btn').click();
|
||||
await expect(page.getByTestId('move-dialog')).toBeVisible({ timeout: 15_000 });
|
||||
await page.getByTestId('move-dialog-cancel-btn').click();
|
||||
// Batch-remove-from-favorite un-stars every selected row without
|
||||
// touching the underlying file — the /favorites batch bar was
|
||||
// trimmed to Download + Remove-from-favorite (destructive-to-content
|
||||
// actions moved into the row context menu). Verify the two folders
|
||||
// vanish from the list after the click.
|
||||
await page.getByTestId('favorites-batch-remove-btn').click();
|
||||
await expect(page.getByTestId(f1)).toHaveCount(0, { timeout: 15_000 });
|
||||
await expect(page.getByTestId(f2)).toHaveCount(0);
|
||||
});
|
||||
|
||||
@@ -23,12 +23,15 @@ test('recent shows accessed items, batch selection, and clear', async ({ page })
|
||||
await expect(page.getByTestId('appshell-logo-link')).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
// Switch to list view (reveals the select-all header) and batch-select.
|
||||
// /recent's batch bar was trimmed to Download + Remove-from-recent
|
||||
// (destructive-to-content actions moved into the row context menu),
|
||||
// so this exercises the new remove-from-recent batch instead of the
|
||||
// old batch-move-into-dialog flow.
|
||||
await page.getByTestId('display-mode-view-list-btn').click({ timeout: 3_000 }).catch(() => {});
|
||||
const selectAll = page.getByTestId('resource-list-select-all-checkbox');
|
||||
if (await selectAll.isVisible().catch(() => false)) {
|
||||
await selectAll.check();
|
||||
await page.getByTestId('recent-batch-move-btn').click({ timeout: 3_000 }).catch(() => {});
|
||||
await page.getByTestId('move-dialog-cancel-btn').click({ timeout: 3_000 }).catch(() => {});
|
||||
await page.getByTestId('recent-batch-remove-btn').click({ timeout: 3_000 }).catch(() => {});
|
||||
}
|
||||
|
||||
// Clear the history if the control is present.
|
||||
|
||||
Reference in New Issue
Block a user