fix: update selectors to .matrix-toolbar__nav/range after layout refactor
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -94,7 +94,7 @@ test.describe('排课双视图切换(阿难账号)', () => {
|
||||
await page.waitForTimeout(1500);
|
||||
|
||||
// Nav buttons should exist
|
||||
const nav = page.locator('.view-toolbar__nav');
|
||||
const nav = page.locator('.matrix-toolbar__nav');
|
||||
await expect(nav).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
// Click "本周" to reset to current week
|
||||
@@ -102,7 +102,7 @@ test.describe('排课双视图切换(阿难账号)', () => {
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// Should show date range
|
||||
const range = page.locator('.view-toolbar__range');
|
||||
const range = page.locator('.matrix-toolbar__range');
|
||||
await expect(range).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -205,7 +205,7 @@ test.describe('排课双视图切换(阿难账号)', () => {
|
||||
await expect(page.locator('.matrix-container')).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
// 矩阵的日期范围应以周一开头
|
||||
const rangeText = await page.locator('.view-toolbar__range').textContent();
|
||||
const rangeText = await page.locator('.matrix-toolbar__range').textContent();
|
||||
expect(rangeText).toBeTruthy();
|
||||
const startDate = rangeText?.split('~')[0]?.trim();
|
||||
expect(startDate).toBeTruthy();
|
||||
@@ -251,7 +251,7 @@ test.describe('排课双视图切换(阿难账号)', () => {
|
||||
expect(matrixSecond).toBeGreaterThanOrEqual(0);
|
||||
|
||||
// 导航到下一周再回来
|
||||
await page.locator('.view-toolbar__nav button', { hasText: '›' }).click();
|
||||
await page.locator('.matrix-toolbar__nav button', { hasText: '›' }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// 切回日历
|
||||
@@ -261,7 +261,7 @@ test.describe('排课双视图切换(阿难账号)', () => {
|
||||
// 再切回矩阵,回到本周
|
||||
await page.locator('.view-toolbar button', { hasText: '矩阵' }).click();
|
||||
await page.waitForTimeout(1500);
|
||||
await page.locator('.view-toolbar__nav button', { hasText: '本周' }).click();
|
||||
await page.locator('.matrix-toolbar__nav button', { hasText: '本周' }).click();
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// 回到本周后应有事件
|
||||
|
||||
Reference in New Issue
Block a user