MCPcopy
hub / github.com/plotly/plotly.js / checkIfEditable

Function checkIfEditable

test/jasmine/tests/config_test.js:283–300  ·  view source on GitHub ↗
(elClass, text)

Source from the content-addressed store, hash-verified

281 }
282
283 function checkIfEditable(elClass, text) {
284 return function() {
285 var label = document.getElementsByClassName(elClass)[0];
286
287 expect(label.textContent).toBe(text);
288
289 var labelBox = label.getBoundingClientRect();
290 var labelX = labelBox.left + labelBox.width / 2;
291 var labelY = labelBox.top + labelBox.height / 2;
292
293 mouseEvent('click', labelX, labelY);
294
295 var editBox = document.getElementsByClassName('plugin-editable editable')[0];
296 expect(editBox).toBeDefined();
297 expect(editBox.textContent).toBe(text);
298 expect(editBox.getAttribute('contenteditable')).toBe('true');
299 };
300 }
301
302 function checkIfDraggable(elClass) {
303 return function() {

Callers 1

config_test.jsFile · 0.85

Calls 1

mouseEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…