Visual Console Client: WIP
Former-commit-id: 677dde49e68e8b2f1ebd15fba60a4b99253fa7d5
This commit is contained in:
parent
c58dbf3d33
commit
913a69e99a
|
@ -44,6 +44,25 @@ export interface VisualConsoleItemProps extends Position, Size {
|
|||
aclGroupId: number | null;
|
||||
}
|
||||
|
||||
interface VisualConsoleBoxItemProps extends Position, Size {
|
||||
readonly id: number;
|
||||
readonly type: 12;
|
||||
isOnTop: boolean;
|
||||
borderWidth: string;
|
||||
borderColor: string;
|
||||
fillColor: string;
|
||||
}
|
||||
|
||||
interface VisualConsoleLineItemProps {
|
||||
readonly id: number;
|
||||
readonly type: 13;
|
||||
isOnTop: boolean;
|
||||
startPosition: Position;
|
||||
endPosition: Position;
|
||||
borderWidth: string;
|
||||
borderColor: string;
|
||||
}
|
||||
|
||||
// FIXME: Fix type compatibility.
|
||||
export interface ItemClickEvent<ItemProps extends VisualConsoleItemProps> {
|
||||
// data: ItemProps;
|
||||
|
@ -51,7 +70,7 @@ export interface ItemClickEvent<ItemProps extends VisualConsoleItemProps> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Extract a valid enum value from a raw label position value.
|
||||
* Extract a valid enum value from a raw label positi9on value.
|
||||
* @param labelPosition Raw value.
|
||||
*/
|
||||
const parseLabelPosition = (
|
||||
|
|
|
@ -44,6 +44,18 @@ describe("Color cloud item", () => {
|
|||
})
|
||||
);
|
||||
|
||||
it("should throw when using an invalid color into the props decoder", () => {
|
||||
expect(() =>
|
||||
colorCloudPropsDecoder({
|
||||
...genericRawProps,
|
||||
...positionRawProps,
|
||||
...sizeRawProps,
|
||||
...linkedModuleProps,
|
||||
color: null
|
||||
})
|
||||
).toThrowError(TypeError);
|
||||
});
|
||||
|
||||
it("should have the color-cloud class", () => {
|
||||
expect(
|
||||
colorCloudInstance.elementRef.getElementsByClassName("color-cloud").length
|
||||
|
|
Loading…
Reference in New Issue