Skip to content

Commit b44954d

Browse files
committed
chore(playwright): Wait for server response before checking sorting result
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
1 parent 140a8d7 commit b44954d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

apps/files/src/store/viewConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { emit, subscribe } from '@nextcloud/event-bus'
1111
import { loadState } from '@nextcloud/initial-state'
1212
import { generateUrl } from '@nextcloud/router'
1313
import { defineStore } from 'pinia'
14-
import { ref, set } from 'vue'
14+
import {ref, set} from 'vue'
1515

1616
const initialViewConfig = loadState('files', 'viewConfigs', {}) as ViewConfigs
1717

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)