style: emphasize teacher shortcuts and tighten composer spacing

This commit is contained in:
鲨鱼辣椒
2026-09-30 00:00:20 +08:00
parent fd0b7205d7
commit 83a19fb19f
4 changed files with 19 additions and 7 deletions

View File

@@ -60,7 +60,8 @@ for (const width of [319, 508]) {
const composer = panel.locator('.consultation-composer');
await expect(composer.locator('.consultation-hint')).toHaveCount(0);
await expect(shortcuts.first()).toHaveCSS('font-size', await panel.getByTestId('teacher-reply').first().evaluate(el => getComputedStyle(el).fontSize));
await expect(shortcuts.first()).toHaveCSS('font-weight', '400');
await expect(shortcuts.first()).toHaveCSS('font-weight', '600');
await expect(shortcuts.first()).not.toHaveCSS('text-shadow', 'none');
await expect(shortcuts.first()).toHaveCSS('border-top-width', '0px');
await expect(shortcuts.first()).toHaveCSS('box-shadow', 'none');
await expect(shortcuts.first()).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)');
@@ -153,7 +154,7 @@ for (const width of [319, 508]) {
const hintBounds = (await hint.boundingBox())!;
expect(hintBounds.x).toBeLessThan(initialSend.x);
expect(hintBounds.height).toBe(30);
expect(hintBounds.y + hintBounds.height).toBeLessThan((await page.locator('.consultation-composer').boundingBox())!.y);
expect((await page.locator('.consultation-composer').boundingBox())!.y - hintBounds.y - hintBounds.height).toBe(8);
await page.getByTestId('teacher-chat-panel').screenshot({ path: test.info().outputPath(`composer-hint-${width}.png`) });
expect(await sent()).toEqual([]);
await input.fill('我想先自己说说');