0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-28 07:58:42 +00:00
nextcloud_server/cypress/pages/FilesNavigation.ts
Ferdinand Thiessen 2c0e2cc09e
test: Add cypress tests for file list filtering
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-25 19:33:28 +02:00

36 lines
776 B
TypeScript

/*!
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/**
* Page object model for the files app navigation
*/
export class FilesNavigationPage {
navigation() {
return cy.findByRole('navigation', { name: 'Files' })
}
searchInput() {
return this.navigation().findByRole('searchbox', { name: /filter filenames/i })
}
searchClearButton() {
return this.navigation().findByRole('button', { name: /clear search/i })
}
settingsToggle() {
return this.navigation().findByRole('link', { name: 'Files settings' })
}
views() {
return this.navigation().findByRole('list', { name: 'Views' })
}
quota() {
return this.navigation().find('[data-cy-files-navigation-settings-quota]')
}
}