Skip to content

Commit c7b551c

Browse files
committed
try adding delay after first Plotly.plot before gl2d select/lasso tests
1 parent d4aad3f commit c7b551c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

test/jasmine/tests/gl2d_click_test.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,9 @@ describe('Test gl2d lasso/select:', function() {
507507
_mock.layout.dragmode = 'select';
508508
gd = createGraphDiv();
509509

510-
Plotly.plot(gd, _mock).then(function() {
510+
Plotly.plot(gd, _mock)
511+
.then(delay(100))
512+
.then(function() {
511513
expect(countGlObjects()).toBe(1, 'has on gl-scatter2d object');
512514

513515
return select(selectPath);
@@ -531,7 +533,9 @@ describe('Test gl2d lasso/select:', function() {
531533
_mock.layout.dragmode = 'lasso';
532534
gd = createGraphDiv();
533535

534-
Plotly.plot(gd, _mock).then(function() {
536+
Plotly.plot(gd, _mock)
537+
.then(delay(100))
538+
.then(function() {
535539
expect(countGlObjects()).toBe(1);
536540

537541
return select(lassoPath2);
@@ -555,7 +559,9 @@ describe('Test gl2d lasso/select:', function() {
555559
_mock.layout.dragmode = 'select';
556560
gd = createGraphDiv();
557561

558-
Plotly.plot(gd, _mock).then(function() {
562+
Plotly.plot(gd, _mock)
563+
.then(delay(100))
564+
.then(function() {
559565
expect(countGlObjects()).toBe(2, 'has a gl-line2d and a gl-scatter2d-sdf');
560566

561567
return select(selectPath);
@@ -575,7 +581,9 @@ describe('Test gl2d lasso/select:', function() {
575581
_mock.layout.dragmode = 'lasso';
576582
gd = createGraphDiv();
577583

578-
Plotly.plot(gd, _mock).then(function() {
584+
Plotly.plot(gd, _mock)
585+
.then(delay(100))
586+
.then(function() {
579587
expect(countGlObjects()).toBe(2, 'has a gl-line2d and a gl-scatter2d-sdf');
580588

581589
return select(lassoPath);

0 commit comments

Comments
 (0)