增加 后端,后台管理系统,uniapp会员端的自动化测试。

This commit is contained in:
2026-07-21 18:09:29 +08:00
parent df0e68469b
commit 6b60b3b4da
64 changed files with 13095 additions and 376 deletions
@@ -0,0 +1,47 @@
import { test, expect } from '@playwright/test';
import { CoachManagementPage } from '../pages/CoachManagementPage';
import { BannerManagementPage } from '../pages/BannerManagementPage';
test.describe('教练管理工作流', () => {
let coachPage: CoachManagementPage;
test.beforeEach(async ({ page }) => {
coachPage = new CoachManagementPage(page);
});
test('查看教练列表', async () => {
await test.step('导航到教练管理页面', async () => {
await coachPage.goto();
});
await test.step('验证表格加载', async () => {
await expect(coachPage.table).toBeVisible({ timeout: 10000 });
await coachPage.waitForTableReady();
const rowCount = await coachPage.getRowCount();
console.log(`教练列表包含 ${rowCount} 条记录`);
expect(rowCount).toBeGreaterThanOrEqual(0);
});
});
});
test.describe('轮播图管理工作流', () => {
let bannerPage: BannerManagementPage;
test.beforeEach(async ({ page }) => {
bannerPage = new BannerManagementPage(page);
});
test('查看轮播图列表', async () => {
await test.step('导航到轮播图管理页面', async () => {
await bannerPage.goto();
});
await test.step('验证表格加载', async () => {
await expect(bannerPage.table).toBeVisible({ timeout: 10000 });
await bannerPage.waitForTableReady();
const rowCount = await bannerPage.getRowCount();
console.log(`轮播图列表包含 ${rowCount} 条记录`);
expect(rowCount).toBeGreaterThanOrEqual(0);
});
});
});