- 添加项目配置文件和环境变量设置 - 创建测试用例目录结构和命名规范 - 实现基础测试 fixture 和页面对象模型 - 添加示例测试用例和数据生成器 - 配置 playwright 和 gitignore 文件
16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
import { test as base } from '@playwright/test';
|
|
import { AppointmentPage } from '@/pages/appointmentPage';
|
|
|
|
type MyFixture = {
|
|
appointmentPage: AppointmentPage;
|
|
};
|
|
|
|
export const test = base.extend<MyFixture>({
|
|
appointmentPage: async ({ page }, use) => {
|
|
const appointmentPage = new AppointmentPage(page);
|
|
await use(appointmentPage);
|
|
},
|
|
});
|
|
|
|
export { expect } from '@playwright/test';
|