feat(admin): 添加用户管理相关文件
添加用户管理视图、API和状态管理文件
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { AlmanacPage } from './pages/almanac-page';
|
||||
|
||||
test.describe('黄历页面测试', () => {
|
||||
let almanacPage: AlmanacPage;
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
almanacPage = new AlmanacPage(page);
|
||||
await almanacPage.navigate();
|
||||
});
|
||||
|
||||
test('TC-006: 黄历日期切换测试', async ({ page }) => {
|
||||
const initialDateDisplay = await almanacPage.getDateDisplay();
|
||||
console.log('Initial date display:', initialDateDisplay);
|
||||
|
||||
await almanacPage.clickPrevDate();
|
||||
const prevDateDisplay = await almanacPage.getDateDisplay();
|
||||
console.log('Previous date display:', prevDateDisplay);
|
||||
expect(prevDateDisplay).not.toBe(initialDateDisplay);
|
||||
|
||||
await almanacPage.clickNextDate();
|
||||
const nextDateDisplay = await almanacPage.getDateDisplay();
|
||||
console.log('Next date display:', nextDateDisplay);
|
||||
expect(nextDateDisplay).not.toBe(prevDateDisplay);
|
||||
});
|
||||
|
||||
test('TC-007: 黄历信息显示测试', async ({ page }) => {
|
||||
const almanacInfo = await almanacPage.getAllAlmanacInfo();
|
||||
|
||||
console.log('Almanac info:', almanacInfo);
|
||||
|
||||
expect(almanacInfo.title).toBeTruthy();
|
||||
expect(almanacInfo.dateDisplay).toBeTruthy();
|
||||
expect(almanacInfo.lunarDate).toBeTruthy();
|
||||
expect(almanacInfo.lunarDate).toContain('农历');
|
||||
expect(almanacInfo.ganzhi).toBeTruthy();
|
||||
expect(almanacInfo.shuxiang).toBeTruthy();
|
||||
expect(almanacInfo.yi).toBeTruthy();
|
||||
expect(almanacInfo.ji).toBeTruthy();
|
||||
expect(almanacInfo.chongsha).toBeTruthy();
|
||||
expect(almanacInfo.wuxing).toBeTruthy();
|
||||
expect(almanacInfo.taishen).toBeTruthy();
|
||||
expect(almanacInfo.caishen).toBeTruthy();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user