fix(home): narrow account button without shrinking its contents

This commit is contained in:
鲨鱼辣椒 committed 2026-10-13 14:17:54 +08:00
1 parent a9fa221d7a
commit 430233f825
4 files changed
+17 -7

No files matched your search

+9 -3
View File
@@ -106,11 +106,17 @@ test.describe('Makelore module navigation without setup flow', () => {
const visible = (await surface.boundingBox())!;
const target = (await trigger.boundingBox())!;
const avatar = (await surface.locator('span').first().boundingBox())!;
// Opening the menu rotates the arrow; compare its final visual size.
await expect.poll(async () => (await surface.locator('svg').boundingBox())!.width).toBeCloseTo(16, 1);
const chevron = (await surface.locator('svg').boundingBox())!;
const panel = (await menu.boundingBox())!;
expect(visible.width).toBeCloseTo(128, 1);
expect(visible.height).toBeCloseTo(25, 1);
expect(avatar.width).toBeCloseTo(16, 1);
expect(avatar.height).toBeCloseTo(16, 1);
expect(visible.height).toBeCloseTo(50, 1);
expect(avatar.width).toBeCloseTo(32, 1);
expect(avatar.height).toBeCloseTo(32, 1);
await expect(surface).toHaveCSS('font-size', '14px');
expect(chevron.width).toBeCloseTo(16, 1);
expect(chevron.height).toBeCloseTo(16, 1);
expect(target.width).toBeCloseTo(128, 1);
expect(target.height).toBeCloseTo(50, 1);
expect(visible.x).toBeGreaterThanOrEqual(16);