mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-21 18:41:40 +03:00
29 lines
1.1 KiB
TypeScript
29 lines
1.1 KiB
TypeScript
import { type Locator, type Page } from '@playwright/test'
|
|
import { CalendarPage } from '../calendar-page'
|
|
|
|
export class DocumentCommonPage extends CalendarPage {
|
|
readonly page: Page
|
|
readonly inputMessageText: Locator
|
|
readonly buttonMessageSend: Locator
|
|
readonly buttonReleaseTab: Locator
|
|
readonly buttonContentTab: Locator
|
|
readonly buttonReasonAndImpactTab: Locator
|
|
readonly buttonHistoryTab: Locator
|
|
|
|
constructor (page: Page) {
|
|
super(page)
|
|
this.page = page
|
|
this.inputMessageText = page.locator('div.popup div.tiptap')
|
|
this.buttonMessageSend = page.locator('div.popup button.primary')
|
|
this.buttonReleaseTab = page.locator('div.tab', { hasText: 'Release' })
|
|
this.buttonContentTab = page.locator('div.tab', { hasText: 'Content' })
|
|
this.buttonReasonAndImpactTab = page.locator('div.tab', { hasText: 'Reason & Impact' })
|
|
this.buttonHistoryTab = page.locator('div.tab', { hasText: 'History' })
|
|
}
|
|
|
|
async addMessage (message: string): Promise<void> {
|
|
await this.inputMessageText.fill(message)
|
|
await this.buttonMessageSend.click()
|
|
}
|
|
}
|