Some checks are pending
		
		
	
	Playwright Tests / test (push) Waiting to run
				
			init test test test 划分美管加、慧来客、智荟宝项目 新增美管加demo 新增npm命令 测试智荟宝 test test ii csv test init test test init init
		
			
				
	
	
		
			18 lines
		
	
	
		
			801 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			801 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const { test: setup, expect } = require('@playwright/test');
 | |
| const path = require('path');
 | |
| const mgjAuthFile = path.join(process.cwd(), '.auth', 'mgj_admin.json');
 | |
| 
 | |
| setup('mgj管理员登录', async ({ page, baseURL }) => {
 | |
|   const account = process.env.MGJ_ACCOUNT;
 | |
|   const password = process.env.MGJ_PASSWORD;
 | |
| 
 | |
|   await page.goto(baseURL);
 | |
|   await page.getByText('点击此处帐号登录').click();
 | |
|   await page.getByPlaceholder('用户名').fill(account);
 | |
|   await page.getByPlaceholder('请输入密码').fill(password);
 | |
|   await page.getByText('登录', { exact: true }).click();
 | |
|   await page.locator('#shopSelect').getByText('一店').click();
 | |
|   await expect(page.locator('#autoStationTip').getByText('我知道了')).toBeVisible();
 | |
|   await page.context().storageState({ path: mgjAuthFile });
 | |
| });
 |