diff options
Diffstat (limited to 'cypress/pages/FilesNavigation.ts')
-rw-r--r-- | cypress/pages/FilesNavigation.ts | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/cypress/pages/FilesNavigation.ts b/cypress/pages/FilesNavigation.ts new file mode 100644 index 00000000000..1be11231bad --- /dev/null +++ b/cypress/pages/FilesNavigation.ts @@ -0,0 +1,46 @@ +/*! + * 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') + } + + searchScopeTrigger() { + return this.navigation().findByRole('button', { name: /search scope options/i }) + } + + /** + * Only available after clicking on the search scope trigger + */ + searchScopeMenu() { + return cy.findByRole('menu', { name: /search scope options/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]') + } + +} |