|
1 | 1 | var Plotly = require('@lib/index');
|
2 | 2 | var Lib = require('@src/lib');
|
3 | 3 | var Smith = require('@src/plots/smith');
|
4 |
| -var layerNames = require('@src/plots/polar/constants').layerNames; |
5 | 4 |
|
6 | 5 | var basicMock = require('@mocks/zzz_smith_basic.json');
|
7 | 6 |
|
@@ -89,64 +88,6 @@ describe('Test smith plots defaults:', function() {
|
89 | 88 | describe('Test relayout on smith subplots:', function() {
|
90 | 89 | afterEach(destroyGraphDiv);
|
91 | 90 |
|
92 |
| - it('should be able to reorder axis layers when relayout\'ing *layer*', function(done) { |
93 |
| - var gd = createGraphDiv(); |
94 |
| - var fig = Lib.extendDeep({}, basicMock); |
95 |
| - var dflt = layerNames; |
96 |
| - |
97 |
| - function _assert(expected) { |
98 |
| - var actual = d3SelectAll('g.smith > .smithsublayer'); |
99 |
| - |
100 |
| - expect(actual.size()).toBe(expected.length, '# of layer'); |
101 |
| - |
102 |
| - actual.each(function(d, i) { |
103 |
| - var className = d3Select(this) |
104 |
| - .attr('class') |
105 |
| - .split('smithsublayer ')[1]; |
106 |
| - |
107 |
| - expect(className).toBe(expected[i], 'layer ' + i); |
108 |
| - }); |
109 |
| - } |
110 |
| - |
111 |
| - Plotly.newPlot(gd, fig).then(function() { |
112 |
| - _assert(dflt); |
113 |
| - return Plotly.relayout(gd, 'smith.realaxis.layer', 'below traces'); |
114 |
| - }) |
115 |
| - .then(function() { |
116 |
| - _assert([ |
117 |
| - 'draglayer', 'plotbg', 'backplot', 'angular-grid', 'radial-grid', |
118 |
| - 'radial-line', 'radial-axis', |
119 |
| - 'frontplot', |
120 |
| - 'angular-line', 'angular-axis' |
121 |
| - ]); |
122 |
| - return Plotly.relayout(gd, 'smith.imaginaryaxis.layer', 'below traces'); |
123 |
| - }) |
124 |
| - .then(function() { |
125 |
| - _assert([ |
126 |
| - 'draglayer', 'plotbg', 'backplot', 'angular-grid', 'radial-grid', |
127 |
| - 'angular-line', |
128 |
| - 'radial-line', |
129 |
| - 'angular-axis', |
130 |
| - 'radial-axis', |
131 |
| - 'frontplot' |
132 |
| - ]); |
133 |
| - return Plotly.relayout(gd, 'smith.realaxis.layer', 'above traces'); |
134 |
| - }) |
135 |
| - .then(function() { |
136 |
| - _assert([ |
137 |
| - 'draglayer', 'plotbg', 'backplot', 'angular-grid', 'radial-grid', |
138 |
| - 'angular-line', 'angular-axis', |
139 |
| - 'frontplot', |
140 |
| - 'radial-line', 'radial-axis' |
141 |
| - ]); |
142 |
| - return Plotly.relayout(gd, 'smith.imaginaryaxis.layer', null); |
143 |
| - }) |
144 |
| - .then(function() { |
145 |
| - _assert(dflt); |
146 |
| - }) |
147 |
| - .then(done, done.fail); |
148 |
| - }); |
149 |
| - |
150 | 91 | it('should be able to relayout imaginary axis ticks', function(done) {
|
151 | 92 | var gd = createGraphDiv();
|
152 | 93 | var fig = Lib.extendDeep({}, basicMock);
|
|
0 commit comments