forked from bondar-artem/pw-practice-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-options.ts
25 lines (23 loc) · 835 Bytes
/
test-options.ts
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 { test as baseTest } from "@playwright/test"
import { test as base } from '@playwright/test'
import { PageManager } from '../pw-practice-app/page-objects/pageManager'
export type TestOptions = {
globalsQaURL: string
formLayoutsPage: string
pageManager: PageManager
}
export const test = base.extend<TestOptions>({
globalsQaURL: ['', { option: true}] ,
formLayoutsPage: [async({ page }, use) => {
await page.goto('/')
await page.getByText('Forms').click()
await page.getByText('Form Layouts').click()
await use('')
console.log('formLayoutsPage TEARDOWN')
}, { auto: true }],
pageManager: [async({ page }, use, testInfo) => {
const pm = new PageManager(page)
await use(pm)
console.log('pageManager TEARDOWN')
}, { auto: true }]
})