MCPcopy Index your code
hub / github.com/plotly/plotly.js / assertLayerStyle

Function assertLayerStyle

test/jasmine/tests/map_test.js:572–593  ·  view source on GitHub ↗
(gd, expectations, index)

Source from the content-addressed store, hash-verified

570 }
571
572 function assertLayerStyle(gd, expectations, index) {
573 var mapInfo = getMapInfo(gd);
574 var layers = mapInfo.layers;
575 var layerNames = mapInfo.layoutLayers;
576
577 var layer = layers[layerNames[index]];
578 expect(layer).toBeDefined(layerNames[index]);
579
580 return new Promise(function(resolve) {
581 setTimeout(function() {
582 Object.keys(expectations).forEach(function(k) {
583 try {
584 var obj = layer.paint._values[k].value.value;
585 expect(String(obj)).toBe(String(expectations[k]), k);
586 } catch(e) {
587 fail('could not find paint values in layer');
588 }
589 });
590 resolve();
591 }, TRANSITION_DELAY);
592 });
593 }
594
595 expect(countVisibleLayers(gd)).toEqual(0);
596

Callers 1

map_test.jsFile · 0.85

Calls 1

getMapInfoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…