(expFontColors, label)
| 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() { |
no outgoing calls
no test coverage detected
searching dependent graphs…