Skip to content

Commit 9b70a65

Browse files
authored
Merge pull request #62032 from nextcloud/fix/race-condition-on-sort
chore(playwright): Wait for server response before checking sorting result
2 parents 0258837 + 672a46f commit 9b70a65

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/playwright/support/sections/FilesListPage.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ export class FilesListPage {
106106

107107
/** Click a column header's sort button to toggle sorting by that column. */
108108
async sortByColumn(name: string): Promise<void> {
109+
const saved = this.page.waitForResponse((r) => r.request().method() === 'PUT' && r.url().includes('/index.php/apps/files/api/v1/views'))
110+
109111
await this.getColumnHeader(name).getByRole('button', { name }).click()
112+
113+
await saved
110114
}
111115

112116
/** The per-row selection checkboxes. */

0 commit comments

Comments
 (0)