-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-options.ts
29 lines (24 loc) · 885 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
26
27
28
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()
// in order to activate this fixture, input use command
// all steps before use command are preConditions and
// all steps after use command are tearDowns
await use('')
console.log('Tear Down')
}, {auto: true}],
pageManager: async({page, formLayoutsPage}, use) => {
const pm = new PageManager(page)
await use(pm)
}
})