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