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