-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
executable file
·30 lines (27 loc) · 1.05 KB
/
index.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
29
30
import { test as hyvaBase } from "@hyva/fixtures";
import CommonPage from "@common/pages/common.page";
import PPSCartPage from "../pages/cart.page";
import PPSHomePage from "../pages/home.page";
import PPSCategoryPage from "../pages/category.page";
import minQtySimpleProductPage from "../pages/simple_minqty_product.page";
type pages = {
commonPage: CommonPage;
minQtySimpleProductPage: minQtySimpleProductPage;
};
const testPages = hyvaBase.extend<pages>({
cartPage: async ({ page }, use, workerInfo) => {
await use(new PPSCartPage(page, workerInfo));
},
homePage: async ({ page }, use, workerInfo) => {
await use(new PPSHomePage(page, workerInfo));
},
categoryPage: async ({ page }, use, workerInfo) => {
await use(new PPSCategoryPage(page, workerInfo));
},
minQtySimpleProductPage: async ({ page }, use, workerInfo) => {
await use(new minQtySimpleProductPage(page, workerInfo));
}
});
export const test = testPages;
export const expect = testPages.expect;
export const describe = testPages.describe;