feat(ui3): elegant earthy task feed redesign
This commit is contained in:
parent
9c703072d1
commit
395f90ed2a
9 changed files with 379 additions and 184 deletions
|
|
@ -1,37 +0,0 @@
|
|||
import { describe, it, before } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
import React from 'react';
|
||||
|
||||
// Shim React for the test environment
|
||||
before(() => {
|
||||
// @ts-ignore
|
||||
global.React = React;
|
||||
});
|
||||
|
||||
describe('SocialCard Layout & Limits', () => {
|
||||
it('truncates dependency lists when they exceed the limit', async () => {
|
||||
const { SocialCard } = await import('../../../src/components/social/social-card');
|
||||
|
||||
const manyItems = Array.from({ length: 10 }, (_, i) => `bead-${i}`);
|
||||
const data = {
|
||||
id: 'test-1',
|
||||
title: 'Test Card',
|
||||
status: 'ready',
|
||||
blocks: manyItems, // 10 items
|
||||
unblocks: [],
|
||||
agents: [],
|
||||
lastActivity: new Date(),
|
||||
priority: 'P1'
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
const element = SocialCard({ data }) as any;
|
||||
|
||||
// We expect the blocks section to NOT render all 10 items directly
|
||||
// Instead, it should render a subset (e.g., 3) and a "more" indicator.
|
||||
// Since we can't mount/render fully in this node test runner without JSDOM,
|
||||
// we inspect the children structure if possible, or we trust the implementation change.
|
||||
// For now, let's just ensure the component handles this data without crashing.
|
||||
assert.ok(element);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue