Skip to content

Commit 4d56890

Browse files
committed
Fix test
1 parent 238cfa7 commit 4d56890

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/integration/components/scroll-indicators-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,15 @@ module('Integration | scroll indicators', function() {
134134
},
135135
});
136136

137+
// not necessarily 100px wide because of integer division
138+
let lastHeader = table.headers.objectAt(table.headers.length - 1);
139+
137140
assert.equal(
138141
table.isScrollIndicatorRendered('right'),
139142
true,
140143
'right scroll indicator is initially shown'
141144
);
142-
assert.ok(isOffset('right', 100), 'right scroll indicator is offset');
145+
assert.ok(isOffset('right', lastHeader.width), 'right scroll indicator is offset');
143146
assert.equal(
144147
table.isScrollIndicatorRendered('left'),
145148
false,
@@ -154,7 +157,7 @@ module('Integration | scroll indicators', function() {
154157
true,
155158
'right scroll indicator is shown during partial scroll'
156159
);
157-
assert.ok(isOffset('right', 100), 'right scroll indicator is offset');
160+
assert.ok(isOffset('right', lastHeader.width), 'right scroll indicator is offset');
158161
assert.equal(
159162
table.isScrollIndicatorRendered('left'),
160163
true,

0 commit comments

Comments
 (0)