Skip to content

Commit

Permalink
improve tests for aspectmode in relayouts
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Feb 13, 2020
1 parent c50559a commit 20d4b3c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/jasmine/tests/gl3d_plot_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,8 @@ describe('Test gl3d drag and wheel interactions', function() {
expect(aspectratio.x).toBeCloseTo(0.909, 3, 'aspectratio.x');
expect(aspectratio.y).toBeCloseTo(0.909, 3, 'aspectratio.y');
expect(aspectratio.z).toBeCloseTo(0.909, 3, 'aspectratio.z');

expect(relayoutEvent['scene.aspectmode']).toBe('manual');
})
.then(function() {
return scroll(sceneTarget2);
Expand All @@ -1229,6 +1231,8 @@ describe('Test gl3d drag and wheel interactions', function() {
expect(aspectratio.x).toBeCloseTo(2.727, 3, 'aspectratio.x');
expect(aspectratio.y).toBeCloseTo(1.818, 3, 'aspectratio.y');
expect(aspectratio.z).toBeCloseTo(0.909, 3, 'aspectratio.z');

expect(relayoutEvent['scene.aspectmode']).not.toBe('manual');
})
.catch(failTest)
.then(done);
Expand Down Expand Up @@ -1279,6 +1283,7 @@ describe('Test gl3d drag and wheel interactions', function() {
Object.keys(relayoutEvent).sort().forEach(function(key) {
expect(Object.keys(events[0])).toContain(key);
expect(key).not.toBe('scene.aspectratio');
expect(key).not.toBe('scene.aspectmode');
});
})
.catch(failTest)
Expand Down Expand Up @@ -1329,6 +1334,7 @@ describe('Test gl3d drag and wheel interactions', function() {
Object.keys(relayoutEvent).sort().forEach(function(key) {
expect(Object.keys(events[0])).toContain(key);
expect(key).not.toBe('scene.aspectratio');
expect(key).not.toBe('scene.aspectmode');
});
})
.catch(failTest)
Expand Down Expand Up @@ -1456,6 +1462,8 @@ describe('Test gl3d drag and wheel interactions', function() {
expect(aspectratio.x).toBeCloseTo(0.816, 3, 'aspectratio.x');
expect(aspectratio.y).toBeCloseTo(0.725, 3, 'aspectratio.y');
expect(aspectratio.z).toBeCloseTo(1.269, 3, 'aspectratio.z');

expect(relayoutEvent['scene.aspectmode']).toBe('manual');
})
.then(function() {
// select a point
Expand Down

0 comments on commit 20d4b3c

Please sign in to comment.