forked from VKCOM/devicehub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorModal.ts
More file actions
25 lines (20 loc) · 779 Bytes
/
errorModal.ts
File metadata and controls
25 lines (20 loc) · 779 Bytes
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
import { expect, Locator, Page } from '@playwright/test'
import { PageHeader } from '../pageHeader'
import playwrightConfig from '../../playwright.config'
export class DeviceHubErrorModalPage {
readonly page: Page
readonly pageHeader: PageHeader
readonly baseUrl = playwrightConfig?.use?.baseURL
readonly title: Locator
readonly description: Locator
constructor(page: Page, headerText: string, descriptionText: string) {
this.page = page
this.pageHeader = new PageHeader(this.page)
this.title = page.getByText(headerText)
this.description = page.getByText(descriptionText)
}
async isModalDisplayed() {
await expect(this.title).toBeVisible()
await expect(this.description).toBeVisible()
}
}