nextcloud/tests/playwright/support/sections/NavigationHeaderPage.ts
Ferdinand Thiessen ae8d311a33
test: migrate some tests to playwright
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-06-10 09:49:04 +02:00

26 lines
603 B
TypeScript

/*
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { Locator, Page } from '@playwright/test'
export class NavigationHeaderPage {
constructor(private readonly page: Page) {}
private get header(): Locator {
return this.page.locator('header#header')
}
logo(): Locator {
return this.header.locator('#nextcloud')
}
navigation(): Locator {
return this.header.getByRole('navigation', { name: 'Applications menu' })
}
navigationEntries(): Locator {
return this.navigation().getByRole('listitem')
}
}