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

Function assertTextFontColors

test/jasmine/tests/bar_test.js:1245–1260  ·  view source on GitHub ↗
(expFontColors, label)

Source from the content-addressed store, hash-verified

1243 }
1244
1245 function assertTextFontColors(expFontColors, label) {
1246 return function() {
1247 var selection = d3SelectAll(BAR_TEXT_SELECTOR);
1248 expect(selection.size()).toBe(expFontColors.length);
1249
1250 selection.each(function(d, i) {
1251 var expFontColor = expFontColors[i];
1252 var isArray = Array.isArray(expFontColor);
1253
1254 expect(this.style.fill).toBe(isArray ? rgb(expFontColor[0]) : rgb(expFontColor),
1255 (label || '') + ', fill for element ' + i);
1256 expect(this.style.fillOpacity).toBe(isArray ? expFontColor[1] : '1',
1257 (label || '') + ', fillOpacity for element ' + i);
1258 });
1259 };
1260 }
1261
1262 function assertTextFontFamilies(expFontFamilies) {
1263 return function() {

Callers 3

bar_test.jsFile · 0.70
assertSelectionModeStyleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…