Skip to content

Commit 20d4b3c

Browse files
committed
improve tests for aspectmode in relayouts
1 parent c50559a commit 20d4b3c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jasmine/tests/gl3d_plot_interact_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,8 @@ describe('Test gl3d drag and wheel interactions', function() {
12181218
expect(aspectratio.x).toBeCloseTo(0.909, 3, 'aspectratio.x');
12191219
expect(aspectratio.y).toBeCloseTo(0.909, 3, 'aspectratio.y');
12201220
expect(aspectratio.z).toBeCloseTo(0.909, 3, 'aspectratio.z');
1221+
1222+
expect(relayoutEvent['scene.aspectmode']).toBe('manual');
12211223
})
12221224
.then(function() {
12231225
return scroll(sceneTarget2);
@@ -1229,6 +1231,8 @@ describe('Test gl3d drag and wheel interactions', function() {
12291231
expect(aspectratio.x).toBeCloseTo(2.727, 3, 'aspectratio.x');
12301232
expect(aspectratio.y).toBeCloseTo(1.818, 3, 'aspectratio.y');
12311233
expect(aspectratio.z).toBeCloseTo(0.909, 3, 'aspectratio.z');
1234+
1235+
expect(relayoutEvent['scene.aspectmode']).not.toBe('manual');
12321236
})
12331237
.catch(failTest)
12341238
.then(done);
@@ -1279,6 +1283,7 @@ describe('Test gl3d drag and wheel interactions', function() {
12791283
Object.keys(relayoutEvent).sort().forEach(function(key) {
12801284
expect(Object.keys(events[0])).toContain(key);
12811285
expect(key).not.toBe('scene.aspectratio');
1286+
expect(key).not.toBe('scene.aspectmode');
12821287
});
12831288
})
12841289
.catch(failTest)
@@ -1329,6 +1334,7 @@ describe('Test gl3d drag and wheel interactions', function() {
13291334
Object.keys(relayoutEvent).sort().forEach(function(key) {
13301335
expect(Object.keys(events[0])).toContain(key);
13311336
expect(key).not.toBe('scene.aspectratio');
1337+
expect(key).not.toBe('scene.aspectmode');
13321338
});
13331339
})
13341340
.catch(failTest)
@@ -1456,6 +1462,8 @@ describe('Test gl3d drag and wheel interactions', function() {
14561462
expect(aspectratio.x).toBeCloseTo(0.816, 3, 'aspectratio.x');
14571463
expect(aspectratio.y).toBeCloseTo(0.725, 3, 'aspectratio.y');
14581464
expect(aspectratio.z).toBeCloseTo(1.269, 3, 'aspectratio.z');
1465+
1466+
expect(relayoutEvent['scene.aspectmode']).toBe('manual');
14591467
})
14601468
.then(function() {
14611469
// select a point

0 commit comments

Comments
 (0)