Add specs
This commit is contained in:
parent
2264a66241
commit
e75f215838
@ -733,6 +733,7 @@ describe("Test Linear Elements", () => {
|
|||||||
containerId: container.id,
|
containerId: container.id,
|
||||||
width: 30,
|
width: 30,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
verticalAlign: VERTICAL_ALIGN.MIDDLE,
|
||||||
}) as ExcalidrawTextElementWithContainer;
|
}) as ExcalidrawTextElementWithContainer;
|
||||||
|
|
||||||
container = {
|
container = {
|
||||||
@ -1108,9 +1109,17 @@ describe("Test Linear Elements", () => {
|
|||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not render vertical align tool when element selected", () => {
|
it("should render vertical align tool when element selected only for two pointer arrow", () => {
|
||||||
createTwoPointerLinearElement("arrow");
|
let arrow = createTwoPointerLinearElement("arrow");
|
||||||
const arrow = h.elements[0] as ExcalidrawLinearElement;
|
|
||||||
|
createBoundTextElement(DEFAULT_TEXT, arrow);
|
||||||
|
API.setSelectedElements([arrow]);
|
||||||
|
|
||||||
|
expect(queryByTestId(container, "align-top")).not.toBeNull();
|
||||||
|
expect(queryByTestId(container, "align-middle")).not.toBeNull();
|
||||||
|
expect(queryByTestId(container, "align-bottom")).not.toBeNull();
|
||||||
|
|
||||||
|
arrow = createThreePointerLinearElement("arrow");
|
||||||
|
|
||||||
createBoundTextElement(DEFAULT_TEXT, arrow);
|
createBoundTextElement(DEFAULT_TEXT, arrow);
|
||||||
API.setSelectedElements([arrow]);
|
API.setSelectedElements([arrow]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user