fix: design harmonization on last features

This commit is contained in:
fsylvain committed 2026-10-07 18:20:18 +02:00
1 parent 953be7342d
commit 70c8492f4f
23 files changed
+526 -840

No files matched your search

@@ -198,14 +198,16 @@ describe('Home rows, unknown action, failed login and not interactive', () => {
expect(router.currentRoute.value.path).toBe('/home')
})
it('clamps a long sentence to two lines', async () => {
it('truncates a long sentence on one line', async () => {
const items = [makeItem({ id: 1, target: target('article', '8', 'T'.repeat(150)) })]
await mountHome('owner', {
[ACTIVITY_ROUTE]: () => page(items),
[ARTICLES_ROUTE]: () => response(200, articles),
})
expect(rows()[0]!.find('.line-clamp-2').exists()).toBe(true)
expect(rows()[0]!.find('[data-testid="recent-activity-sentence"]').classes()).toContain(
'truncate',
)
expect(rows()[0]!.find('[data-testid="recent-activity-meta"]').classes()).toContain(
'truncate',
)
@@ -322,22 +324,19 @@ describe('Home card and article list are independent', () => {
})
})
describe('Home layout is two columns from lg and stacked below', () => {
it('uses the lg two-column grid with the 420 px column and no max-width cap', async () => {
describe('Home layout puts Recent activity full width below Recently updated', () => {
it('renders the section after the recent list inside the same single column', async () => {
await mountHome('owner', {
[ACTIVITY_ROUTE]: () => page(recentItems(1)),
[ARTICLES_ROUTE]: () => response(200, articles),
})
const grid = card().element.parentElement!
expect(grid.className).toContain('lg:grid-cols-[minmax(0,1fr)_--spacing(105)]')
expect(grid.className).toContain('lg:items-start')
expect(grid.className).toContain('gap-4')
const capped = [grid, grid.parentElement!].some((element) =>
/(^|\s)max-w-/.test(element.className),
)
expect(capped).toBe(false)
expect(card().classes()).toContain('lg:order-2')
const column = card().element.parentElement!
expect(column.className).not.toContain('grid-cols')
const list = column.querySelector('[data-testid="recent-list"]')!
expect(
list.compareDocumentPosition(card().element) & Node.DOCUMENT_POSITION_FOLLOWING,
).toBeTruthy()
})
})