Skip to content

Commit 82dbfcc

Browse files
committed
Update scroll test to work in ff and chrome
1 parent 20fbf18 commit 82dbfcc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/jasmine/tests/legend_scroll_test.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ describe('The legend', function() {
4242
});
4343

4444
it('should constrain scrolling to the contents', function() {
45-
var scrollBox = legend.getElementsByClassName('scrollbox')[0],
46-
scrollHeight = scrollBox.getBoundingClientRect().height,
47-
legendHeight = legend.getAttribute('height'),
48-
maxHeight = legendHeight - scrollHeight - 12;
45+
var scrollBox = legend.getElementsByClassName('scrollbox')[0];
4946

5047
legend.dispatchEvent(scrollTo(-100));
5148
expect(scrollBox.getAttribute('transform')).toBe('translate(0, 0)');
5249

53-
legend.dispatchEvent(scrollTo(10000));
54-
expect(scrollBox.getAttribute('transform')).toBe('translate(0, ' + maxHeight + ')');
50+
legend.dispatchEvent(scrollTo(100000));
51+
expect(scrollBox.getAttribute('transform')).toBe('translate(0, -179)');
5552
});
5653

5754
it('should scale the scrollbar movement from top to bottom', function() {

0 commit comments

Comments
 (0)