- 优化了预约详情页面的打开和关闭方法 - 改进了预约操作的处理流程 - 添加了 PopupContent 组件以简化弹窗操作 -调整了测试用例的结构,提高了可读性和可维护性
20 lines
521 B
TypeScript
20 lines
521 B
TypeScript
import { test as base } from '@playwright/test';
|
|
import { NumberInput, PopupContent } from '@/pages/components';
|
|
|
|
type MyFixture = {
|
|
numberInput: NumberInput;
|
|
popupContent: PopupContent;
|
|
};
|
|
|
|
export const test = base.extend<MyFixture>({
|
|
numberInput: async ({ page }, use) => {
|
|
const numberInput = new NumberInput(page);
|
|
await use(numberInput);
|
|
},
|
|
|
|
popupContent: async ({ page }, use) => {
|
|
const popupContent = new PopupContent(page);
|
|
await use(popupContent);
|
|
},
|
|
});
|