Clarify teacher prompt button click affordance

This commit is contained in:
鲨鱼辣椒
2026-09-29 20:20:58 +08:00
parent dc8f766a77
commit 79b1dc1892
4 changed files with 29 additions and 7 deletions

View File

@@ -66,6 +66,18 @@ for (const width of [319, 508]) {
expect((await row.boundingBox())!.y + (await row.boundingBox())!.height).toBeLessThan((await composer.boundingBox())!.y);
await shortcuts.first().focus();
await expect(shortcuts.first()).toHaveCSS('outline-style', 'solid');
await expect(shortcuts.first()).toHaveCSS('cursor', 'pointer');
await shortcuts.first().hover();
await expect(shortcuts.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, -1)');
await page.mouse.down();
await expect(shortcuts.first()).toHaveCSS('transform', 'matrix(1, 0, 0, 1, 0, 1)');
await page.mouse.move(0, 0);
await page.mouse.up();
await page.emulateMedia({ reducedMotion: 'reduce' });
await shortcuts.first().hover();
await expect(shortcuts.first()).toHaveCSS('transform', 'none');
await page.mouse.move(0, 0);
await page.emulateMedia({ reducedMotion: 'no-preference' });
const form = (await panel.locator('form').boundingBox())!;
expect(form.y + form.height).toBeLessThanOrEqual(800);
expect(await panel.evaluate(el => el.scrollWidth <= el.clientWidth)).toBe(true);
@@ -130,7 +142,7 @@ for (const width of [319, 508]) {
await expect(hint).toBeEnabled();
await expect(hint).toHaveText('帮我整体看🧠');
expect(await hint.evaluate(el => el.scrollWidth <= el.clientWidth && el.scrollHeight <= el.clientHeight)).toBe(true);
await expect(hint).toHaveCSS('background-color', 'rgb(248, 241, 226)');
await expect(hint).toHaveCSS('background-color', 'rgb(248, 230, 183)');
const initialSend = (await send.boundingBox())!;
const hintBounds = (await hint.boundingBox())!;
expect(hintBounds.x).toBeLessThan(initialSend.x);