test: Split test utilities to improve test times (#2622)

This commit is contained in:
Dermot Duffy
2026-07-26 16:29:53 -07:00
committed by GitHub
parent 8d44fcecf1
commit ad89aa9538
234 changed files with 2730 additions and 2516 deletions
+9 -5
View File
@@ -16,7 +16,9 @@ describe('ExpandManager', () => {
const manager = new ExpandManager(api);
manager.initialize();
expect(api.getConditionStateManager().setState).toBeCalledWith({ expand: false });
expect(api.getConditionStateManager().setState).toHaveBeenCalledWith({
expand: false,
});
});
it('should set expanded', () => {
@@ -29,9 +31,11 @@ describe('ExpandManager', () => {
manager.setExpanded(true);
expect(manager.isExpanded()).toBeTruthy();
expect(api.getFullscreenManager().setFullscreen).toBeCalledWith(false);
expect(api.getConditionStateManager().setState).toBeCalledWith({ expand: true });
expect(api.getCardElementManager().update).toBeCalled();
expect(api.getFullscreenManager().setFullscreen).toHaveBeenCalledWith(false);
expect(api.getConditionStateManager().setState).toHaveBeenCalledWith({
expand: true,
});
expect(api.getCardElementManager().update).toHaveBeenCalled();
expect(element.hasAttribute('expanded')).toBeTruthy();
});
@@ -44,7 +48,7 @@ describe('ExpandManager', () => {
manager.setExpanded(true);
expect(api.getFullscreenManager().setFullscreen).not.toBeCalled();
expect(api.getFullscreenManager().setFullscreen).not.toHaveBeenCalled();
});
it('should toggle expanded', () => {