Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82dbfcc

Browse filesBrowse files
committed
Update scroll test to work in ff and chrome
1 parent 20fbf18 commit 82dbfcc
Copy full SHA for 82dbfcc

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎test/jasmine/tests/legend_scroll_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/legend_scroll_test.js
+3-6Lines changed: 3 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.