Skip to content

Commit a07e779

Browse files
localpcguytoddjordan
authored andcommitted
add test for scroll position transition between >=2.16 and <=2.15
1 parent cf7d604 commit a07e779

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/acceptance/scroll-reset-on-transition-test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,14 @@ test('reset scroll on transitions', async function(assert) {
6464

6565
assert.equal($(scrollContainerSelector).scrollTop(), 0, 'scroll position is resetted after visiting route with same tab but different model');
6666
});
67+
68+
test('reset scroll on transitions when transition between >=2.16 and <=2.15', async function(assert) {
69+
await visit('/ember/2.16');
70+
71+
$(scrollContainerSelector).scrollTop(1000);
72+
assert.notEqual($(scrollContainerSelector).scrollTop(), 0, 'scroll position is NOT zero after scroll on fresh visit');
73+
74+
await visit('/ember/2.15/classes/Ember.View');
75+
76+
assert.equal($(scrollContainerSelector).scrollTop(), 0, 'scroll position is zero after transition to different route');
77+
});

0 commit comments

Comments
 (0)