fix: Various editor / diagnostic improvements (#2363)
- Closes: #2360 - Closes: #2328
This commit is contained in:
1 parent
6d5a76ac0a
commit
df3614f793
13 files changed
+313
-58
No files matched your search
+11
-1
@@ -24,7 +24,10 @@ import {
|
||||
import { ActionsManager } from '../src/card-controller/actions/actions-manager';
|
||||
import { AutomationsManager } from '../src/card-controller/automations-manager';
|
||||
import { CameraURLManager } from '../src/card-controller/camera-url-manager';
|
||||
import { CardElementManager } from '../src/card-controller/card-element-manager';
|
||||
import {
|
||||
CardElementManager,
|
||||
CardHTMLElement,
|
||||
} from '../src/card-controller/card-element-manager';
|
||||
import { ConfigManager } from '../src/card-controller/config/config-manager';
|
||||
import { CardController } from '../src/card-controller/controller';
|
||||
import { DefaultManager } from '../src/card-controller/default-manager';
|
||||
@@ -626,6 +629,13 @@ export const createParent = (options?: { children?: HTMLElement[] }): HTMLElemen
|
||||
return parent;
|
||||
};
|
||||
|
||||
export const createCardHTMLElement = (): CardHTMLElement => {
|
||||
const element = createLitElement() as CardHTMLElement;
|
||||
element.getCardSize = vi.fn();
|
||||
element.setConfig = vi.fn();
|
||||
return element;
|
||||
};
|
||||
|
||||
export const createLitElement = (): LitElement => {
|
||||
const element = document.createElement('div') as unknown as LitElement;
|
||||
element.addController = vi.fn();
|
||||
|
||||
Reference in new issue
Block a user