()
| 7940 | var testCount = 0; |
| 7941 | |
| 7942 | var zoomOut = function() { |
| 7943 | promise = promise.then(function() { |
| 7944 | getZoomOutButton(gd).click(); |
| 7945 | var xLabels = Axes.calcTicks(gd._fullLayout.xaxis); |
| 7946 | var formatter = getFormatter(Axes.getTickFormat(gd._fullLayout.xaxis)); |
| 7947 | var expectedLabels = xLabels.map(function(d) {return formatter(new Date(d.x));}); |
| 7948 | var actualLabels = xLabels.map(function(d) {return d.text;}); |
| 7949 | expect(expectedLabels).toEqual(actualLabels); |
| 7950 | testCount++; |
| 7951 | |
| 7952 | if(typeof gd._fullLayout.xaxis.dtick === 'number' || |
| 7953 | typeof gd._fullLayout.xaxis.dtick === 'string' && parseInt(gd._fullLayout.xaxis.dtick.replace(/\D/g, '')) < 48) { |
| 7954 | zoomOut(); |
| 7955 | } else { |
| 7956 | // make sure we tested as many levels as we thought we would |
| 7957 | expect(testCount).toBe(5); |
| 7958 | done(); |
| 7959 | } |
| 7960 | }); |
| 7961 | }; |
| 7962 | zoomOut(); |
| 7963 | }); |
| 7964 |
no test coverage detected
searching dependent graphs…