feat(dashboard): enhance appointment table and link to specific dates
This commit is contained in:
@@ -27,6 +27,24 @@ describe('TauriBarChart', () => {
|
||||
expect(screen.queryByText(EMPTY)).not.toBeInTheDocument();
|
||||
expect(screen.getByText('۸ خرداد')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders one bar per day of a full Jalali month', () => {
|
||||
const month: ChartPoint[] = Array.from({ length: 31 }, (_, i) => ({ label: String(i + 1), value: i % 5 }));
|
||||
const { container } = render(<TauriBarChart data={month} />);
|
||||
expect(container.querySelectorAll('.bg-\\[\\#5559CE\\]')).toHaveLength(31);
|
||||
});
|
||||
|
||||
/**
|
||||
* styles.css ships an unlayered legacy `.flex { align-items: center }` that
|
||||
* beats Tailwind's `items-*` utilities and collapses the plot column to zero
|
||||
* height. The frame must pin alignment inline, or the chart renders blank.
|
||||
*/
|
||||
it('pins flex alignment inline so the legacy global .flex cannot collapse it', () => {
|
||||
const { container } = render(<TauriBarChart data={real} />);
|
||||
const frame = container.querySelector('.h-\\[300px\\]') as HTMLElement;
|
||||
expect(frame.style.alignItems).toBe('stretch');
|
||||
expect((frame.firstElementChild as HTMLElement).style.alignItems).toBe('stretch');
|
||||
});
|
||||
});
|
||||
|
||||
describe('TauriLineChart', () => {
|
||||
|
||||
Reference in New Issue
Block a user