Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/playwright/e2e/files/files-settings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ test.describe('files: Set default view', () => {
await filesListPage.open()

const dialog = await filesNavigation.openSettings()
// The next page load only honors the new default once the config PUT has
// been persisted, so wait for it before re-navigating.
const saved = page.waitForResponse((r) => r.url().includes('/apps/files/api/v1/config/default_view'))
// The radio input is `hidden-visually` and can sit below the dialog fold, so
// clicking its visible label is more reliable than checking the input.
await dialog.getByRole('group', { name: 'Default view' })
.getByText('Personal files', { exact: true })
.click()
await saved
await expect(dialog.getByRole('group', { name: 'Default view' }).getByRole('radio', { name: 'Personal files' })).toBeChecked()
await filesNavigation.closeSettings()

Expand Down
Loading