Make teacher prompt buttons compact and softly raised
This commit is contained in:
@@ -61,7 +61,8 @@ for (const width of [319, 508]) {
|
||||
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('box-shadow', 'none');
|
||||
await expect(shortcuts.first()).toHaveCSS('border-top-width', '0px');
|
||||
await expect(shortcuts.first()).not.toHaveCSS('box-shadow', 'none');
|
||||
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');
|
||||
@@ -129,11 +130,11 @@ 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(250, 245, 232)');
|
||||
await expect(hint).toHaveCSS('background-color', 'rgb(248, 241, 226)');
|
||||
const initialSend = (await send.boundingBox())!;
|
||||
const hintBounds = (await hint.boundingBox())!;
|
||||
expect(hintBounds.x).toBeLessThan(initialSend.x);
|
||||
expect(hintBounds.height).toBeGreaterThanOrEqual(36);
|
||||
expect(hintBounds.height).toBe(30);
|
||||
expect(hintBounds.y + hintBounds.height).toBeLessThan((await page.locator('.consultation-composer').boundingBox())!.y);
|
||||
await page.getByTestId('teacher-chat-panel').screenshot({ path: test.info().outputPath(`composer-hint-${width}.png`) });
|
||||
expect(await sent()).toEqual([]);
|
||||
|
||||
Reference in New Issue
Block a user