ui: match Agents entry artwork to module cards

This commit is contained in:
2026-09-14 14:05:52 +08:00
parent da6684b03e
commit 10df9fd740
5 changed files with 79 additions and 6 deletions

View File

@@ -89,6 +89,11 @@ test.describe('Makelore module navigation without setup flow', () => {
await expect(page.getByTestId('ai-module-selection-page')).toBeVisible();
const moduleCards = page.locator('[data-testid^="ai-module-option-"]');
await expect(moduleCards.locator('img')).toHaveCount(4);
await expect.poll(async () => await moduleCards.locator('img').evaluateAll((images) =>
images.every((image) => image.complete && image.naturalWidth > 0),
)).toBe(true);
await page.screenshot({ path: test.info().outputPath('module-entry-artwork.png') });
const readCardMetrics = async () => await moduleCards.evaluateAll((elements) => elements.map((element) => {
const bounds = element.getBoundingClientRect();
const image = element.querySelector('.module-option-card-image')?.getBoundingClientRect();