Prevent events chart on pixel and link boards

This commit is contained in:
Mike Cao committed 2026-03-10 00:23:19 -07:00
1 parent 6629ab598b
commit 54023e3796
3 files changed
+65 -4

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import {
BOARD_ENTITY_TYPES,
isBoardComponentSupported,
} from '../boards';
test('isBoardComponentSupported allows events chart on website boards', () => {
expect(isBoardComponentSupported('EventsChart', BOARD_ENTITY_TYPES.website)).toBe(true);
});
test('isBoardComponentSupported rejects events chart on pixel and link boards', () => {
expect(isBoardComponentSupported('EventsChart', BOARD_ENTITY_TYPES.pixel)).toBe(false);
expect(isBoardComponentSupported('EventsChart', BOARD_ENTITY_TYPES.link)).toBe(false);
});
test('isBoardComponentSupported leaves other components available for all board entities', () => {
expect(isBoardComponentSupported('WebsiteChart', BOARD_ENTITY_TYPES.pixel)).toBe(true);
expect(isBoardComponentSupported('TextBlock', BOARD_ENTITY_TYPES.link)).toBe(true);
});