aboutsummaryrefslogtreecommitdiffstats
path: root/cypress/pages/FilesNavigation.ts
blob: cb3897afb90e3712805510a294f9ae56d65dad4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*!
 * 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]')
	}

}