feat(admin): 添加用户管理相关文件

添加用户管理视图、API和状态管理文件
This commit is contained in:
张翔
2026-03-28 14:37:29 +08:00
commit 08ea5fbe98
1643 changed files with 255646 additions and 0 deletions
@@ -0,0 +1,58 @@
import { test, expect } from '@playwright/test';
import { CalendarPage } from './pages/calendar-page';
test.describe('万年历页面测试', () => {
let calendarPage: CalendarPage;
test.beforeEach(async ({ page }) => {
calendarPage = new CalendarPage(page);
await calendarPage.navigate();
});
test('TC-003: 日历月份切换测试', async ({ page }) => {
const initialTitle = await calendarPage.getCalendarTitle();
console.log('Initial calendar title:', initialTitle);
await calendarPage.clickPrevMonth();
const prevMonthTitle = await calendarPage.getCalendarTitle();
console.log('Previous month title:', prevMonthTitle);
expect(prevMonthTitle).not.toBe(initialTitle);
await calendarPage.clickNextMonth();
const nextMonthTitle = await calendarPage.getCalendarTitle();
console.log('Next month title:', nextMonthTitle);
expect(nextMonthTitle).not.toBe(prevMonthTitle);
await calendarPage.clickToday();
const todayTitle = await calendarPage.getCalendarTitle();
console.log('Today title:', todayTitle);
expect(todayTitle).toBeTruthy();
});
test('TC-004: 日期选择测试', async ({ page }) => {
const today = new Date();
const selectedDay = today.getDate();
await calendarPage.clickDay(selectedDay);
const selectedDayElement = await calendarPage.getSelectedDay();
expect(selectedDayElement).toBe(selectedDay);
const isLunarInfoVisible = await calendarPage.isLunarInfoCardVisible();
expect(isLunarInfoVisible).toBe(true);
});
test('TC-005: 农历信息显示测试', async ({ page }) => {
const today = new Date();
const selectedDay = today.getDate();
await calendarPage.clickDay(selectedDay);
const isLunarInfoVisible = await calendarPage.isLunarInfoCardVisible();
expect(isLunarInfoVisible).toBe(true);
const lunarDate = await calendarPage.getLunarDate();
expect(lunarDate).toBeTruthy();
expect(lunarDate).toContain('农历');
});
});