develop #2
@@ -1,14 +1,6 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('审计工作流', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.locator('input[placeholder*="用户名"]').fill('admin');
|
||||
await page.locator('input[placeholder*="密码"]').fill('admin123');
|
||||
await page.locator('button:has-text("登录")').click();
|
||||
await page.waitForURL('**/dashboard', { timeout: 30000 });
|
||||
});
|
||||
|
||||
test('执行操作并查看操作日志', async ({ page }) => {
|
||||
await test.step('执行用户管理操作', async () => {
|
||||
await page.goto('/users');
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('文件管理工作流', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.locator('input[placeholder*="用户名"]').fill('admin');
|
||||
await page.locator('input[placeholder*="密码"]').fill('admin123');
|
||||
await page.locator('button:has-text("登录")').click();
|
||||
await page.waitForURL('**/dashboard', { timeout: 30000 });
|
||||
});
|
||||
|
||||
test('文件上传流程', async ({ page }) => {
|
||||
await test.step('导航到文件管理', async () => {
|
||||
await page.goto('/dashboard');
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test.describe('系统配置工作流', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.locator('input[placeholder*="用户名"]').fill('admin');
|
||||
await page.locator('input[placeholder*="密码"]').fill('admin123');
|
||||
await page.locator('button:has-text("登录")').click();
|
||||
await page.waitForURL('**/dashboard', { timeout: 30000 });
|
||||
});
|
||||
|
||||
test('查看系统配置', async ({ page }) => {
|
||||
await test.step('导航到系统配置', async () => {
|
||||
await page.goto('/dashboard');
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"cookies": [],
|
||||
"origins": [
|
||||
{
|
||||
"origin": "http://localhost:3002",
|
||||
"localStorage": [
|
||||
{
|
||||
"name": "userId",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "username",
|
||||
"value": "admin"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"value": "eyJhbGciOiJIUzM4NCJ9.eyJyb2xlcyI6W10sInVzZXJJZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsInN1YiI6ImFkbWluIiwiaWF0IjoxNzc1NTMzNzQ5LCJleHAiOjE3NzU2MjAxNDl9.FH-r-jQL6ojOAB0xjxj41mTiVnRl8vhMZ5yRuDjgbjI9Y1AzSLRveN6I7aGToelN"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user