Skip to content

Commit 6da3cfa

Browse files
committed
remove silently broken and obsolete select box node creation tests
1 parent 1968af7 commit 6da3cfa

File tree

1 file changed

+5
-82
lines changed

1 file changed

+5
-82
lines changed

test/jasmine/tests/select_test.js

+5-82
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ function resetEvents(gd) {
6262

6363
selectedPromise = new Promise(function(resolve) {
6464
gd.on('plotly_selecting', function(data) {
65+
// note that since all of these events test node counts,
66+
// and all of the other tests at some point check that each of
67+
// these event handlers was called (via assertEventCounts),
68+
// we no longer need separate tests that these nodes are created
69+
// and this way *all* subplot variants get the test.
6570
assertSelectionNodes(1, 2);
6671
selectingCnt++;
6772
selectingData = data;
@@ -130,88 +135,6 @@ describe('Test select box and lasso in general:', function() {
130135
});
131136
}
132137

133-
describe('select elements', function() {
134-
var mockCopy = Lib.extendDeep({}, mock);
135-
mockCopy.layout.dragmode = 'select';
136-
137-
var gd;
138-
beforeEach(function(done) {
139-
gd = createGraphDiv();
140-
141-
Plotly.plot(gd, mockCopy.data, mockCopy.layout)
142-
.then(done);
143-
});
144-
145-
it('should be appended to the zoom layer', function(done) {
146-
var x0 = 100,
147-
y0 = 200,
148-
x1 = 150,
149-
y1 = 250,
150-
x2 = 50,
151-
y2 = 50;
152-
153-
gd.once('plotly_selecting', function() {
154-
assertSelectionNodes(1, 2);
155-
});
156-
157-
gd.once('plotly_selected', function() {
158-
assertSelectionNodes(0, 2);
159-
});
160-
161-
gd.once('plotly_deselect', function() {
162-
assertSelectionNodes(0, 0);
163-
});
164-
165-
Lib.clearThrottle();
166-
mouseEvent('mousemove', x0, y0);
167-
assertSelectionNodes(0, 0);
168-
169-
drag([[x0, y0], [x1, y1]]);
170-
doubleClick(x2, y2).then(done);
171-
});
172-
});
173-
174-
describe('lasso elements', function() {
175-
var mockCopy = Lib.extendDeep({}, mock);
176-
mockCopy.layout.dragmode = 'lasso';
177-
178-
var gd;
179-
beforeEach(function(done) {
180-
gd = createGraphDiv();
181-
182-
Plotly.plot(gd, mockCopy.data, mockCopy.layout)
183-
.then(done);
184-
});
185-
186-
it('should be appended to the zoom layer', function(done) {
187-
var x0 = 100,
188-
y0 = 200,
189-
x1 = 150,
190-
y1 = 250,
191-
x2 = 50,
192-
y2 = 50;
193-
194-
gd.once('plotly_selecting', function() {
195-
assertSelectionNodes(1, 2);
196-
});
197-
198-
gd.once('plotly_selected', function() {
199-
assertSelectionNodes(0, 2);
200-
});
201-
202-
gd.once('plotly_deselect', function() {
203-
assertSelectionNodes(0, 0);
204-
});
205-
206-
Lib.clearThrottle();
207-
mouseEvent('mousemove', x0, y0);
208-
assertSelectionNodes(0, 0);
209-
210-
drag([[x0, y0], [x1, y1]]);
211-
doubleClick(x2, y2).then(done);
212-
});
213-
});
214-
215138
describe('select events', function() {
216139
var mockCopy = Lib.extendDeep({}, mock);
217140
mockCopy.layout.dragmode = 'select';

0 commit comments

Comments
 (0)