const { test: base, expect, devices } = require('@playwright/test'); const authFile = '.auth/hlk_admin.json'; const test = base.extend({ /** * @type {import('@playwright/test').Page} */ touchPage: async ({ browser, baseURL }, use) => { const context = await browser.newContext({ storageState: authFile, }); const page = await context.newPage(); await page.goto(baseURL); await use(page); await page.close(); await context.close(); }, /** * @type {import('@playwright/test').Page} */ h5Page: async ({ browser }, use) => { const iPhone = devices['iPhone 11']; const context = await browser.newContext({ ...iPhone, storageState: undefined, }); const page = await context.newPage(); await page.goto(process.env.H5_BASE_URL); await use(page); }, }); module.exports = { test, expect, };