fix: show and dismiss teacher introductions as one group
This commit is contained in:
1 parent
a77ddbd681
commit
7458c37fb0
12 files changed
+290
-148
No files matched your search
@@ -79,15 +79,15 @@ for (const width of [375, 768, 1280]) {
|
||||
return !!bubble && !!viewport && viewport.y >= bubble.y + bubble.height;
|
||||
}).toBe(true);
|
||||
await page.screenshot({ path: test.info().outputPath(`teacher-introductions-${width}.png`) });
|
||||
await group.getByRole('button', { name: '收起智能体2的介绍' }).click();
|
||||
await expect(group.locator('.teacher-welcome-card')).toHaveCount(2);
|
||||
await group.getByRole('button', { name: '收起全部老师介绍(智能体2)' }).click();
|
||||
await expect(group).toHaveCount(0);
|
||||
await expect(page.locator('#coding-consultation-dock')).toHaveCount(0);
|
||||
await page.reload();
|
||||
await expect(group.locator('.teacher-welcome-card')).toHaveCount(3);
|
||||
await group.getByRole('button', { name: '和智能体3聊聊' }).click({ position: { x: 8, y: 8 } });
|
||||
await expect(page.getByRole('button', { name: '与智能体3聊天' })).toHaveAttribute('aria-pressed', 'true');
|
||||
await expect(group).toHaveCount(0);
|
||||
await page.getByRole('button', { name: '关闭智能体栏' }).click();
|
||||
await expect(group.locator('.teacher-welcome-card')).toHaveCount(1);
|
||||
while (await group.count()) await group.getByRole('button', { name: /^收起.*的介绍$/ }).first().click();
|
||||
await expect(group).toHaveCount(0);
|
||||
});
|
||||
}
|
||||
@@ -108,8 +108,6 @@ test('many teacher introductions remain scrollable and honor reduced motion', as
|
||||
await page.keyboard.press('Enter');
|
||||
await expect(page.getByRole('button', { name: '与智能体8聊天' })).toHaveAttribute('aria-pressed', 'true');
|
||||
await page.getByRole('button', { name: '关闭智能体栏' }).click();
|
||||
await expect(group.locator('.teacher-welcome-card')).toHaveCount(7);
|
||||
while (await group.count()) await group.getByRole('button', { name: /^收起.*的介绍$/ }).first().click();
|
||||
await expect(group).toHaveCount(0);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user