MCPcopy
hub / github.com/palantir/plottable / assertCorrectRendering

Function assertCorrectRendering

test/components/selectionBoxLayerTests.ts:101–108  ·  view source on GitHub ↗
(expectedTL: Plottable.Point, expectedBR: Plottable.Point, msg: string)

Source from the content-addressed store, hash-verified

99 div.remove();
100
101 function assertCorrectRendering(expectedTL: Plottable.Point, expectedBR: Plottable.Point, msg: string) {
102 const selectionBox = div.select(SELECTION_BOX_CLASSNAME);
103 const bbox = Plottable.Utils.DOM.elementBBox(selectionBox);
104 assert.strictEqual(bbox.x, expectedTL.x, msg + " (x-origin)");
105 assert.strictEqual(bbox.x, expectedTL.y, msg + " (y-origin)");
106 assert.strictEqual(bbox.width, expectedBR.x - expectedTL.x, msg + " (width)");
107 assert.strictEqual(bbox.height, expectedBR.y - expectedTL.y, msg + " (height)");
108 }
109 });
110
111 it("throws an error if the bounds have not been set properly before rendering", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected