@@ -54,7 +54,7 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
5454 test ( 'it renders with a thumb size proportional to content ratio' , async function ( assert ) {
5555 await this . render ( EXAMPLE_1_HBS ) ;
5656 this . simulateCallback ( true , 100 ) ;
57- assert . equal ( thumbSize ( ) , 233 ) ;
57+ assert . equal ( thumbSize ( ) , 234 ) ;
5858 assert . equal ( thumbPosition ( ) , 48 ) ;
5959 assert . equal ( find ( THUMB ) . style . opacity , "1" ) ;
6060 } ) ;
@@ -64,7 +64,7 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
6464 await this . render ( EXAMPLE_1_HBS ) ;
6565 this . simulateCallback ( true , 5 ) ;
6666 this . simulateCallback ( true , 0 ) ;
67- assert . equal ( thumbSize ( ) , 480 ) ;
67+ assert . equal ( thumbSize ( ) , 481 ) ;
6868 assert . equal ( thumbPosition ( ) , 0 ) ;
6969 assert . equal ( find ( THUMB ) . style . opacity , "1" ) ;
7070 } ) ;
@@ -78,7 +78,7 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
7878 this . set ( 'contentHeight' , 100000 ) ;
7979 await this . render ( EXAMPLE_1_HBS ) ;
8080 this . simulateCallback ( true , 100 ) ;
81- assert . equal ( thumbSize ( ) , 16 ) ;
81+ assert . equal ( thumbSize ( ) , 17 ) ;
8282 } ) ;
8383
8484 test ( 'thumb is visible when isScrolling is true' , async function ( assert ) {
@@ -95,13 +95,13 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
9595 await this . render ( EXAMPLE_1_HBS ) ;
9696 this . simulateCallback ( true , - 100 ) ;
9797 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
98- assert . equal ( thumbSize ( ) , 193 , 'thumb height is compressed' ) ;
98+ assert . equal ( thumbSize ( ) , 195 , 'thumb height is compressed' ) ;
9999 } ) ;
100100
101101 test ( 'compresses scrollbar when overscrolled at bottom' , async function ( assert ) {
102102 await this . render ( EXAMPLE_1_HBS ) ;
103103 this . simulateCallback ( true , 650 ) ;
104- assert . equal ( thumbSize ( ) , 182 , 'thumb height is compressed' ) ;
104+ assert . equal ( thumbSize ( ) , 184 , 'thumb height is compressed' ) ;
105105 assert . equal ( thumbPosition ( ) , 298 , 'thumb is at bottom' ) ;
106106 } ) ;
107107
@@ -110,14 +110,14 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
110110 await this . render ( EXAMPLE_1_HBS ) ;
111111 this . simulateCallback ( true , - 100 ) ;
112112 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
113- assert . equal ( thumbSize ( ) , 397 , 'thumb height is compressed' ) ;
113+ assert . equal ( thumbSize ( ) , 399 , 'thumb height is compressed' ) ;
114114 } ) ;
115115
116116 test ( 'compresses scrollbar when overscrolled at bottom, short content' , async function ( assert ) {
117117 this . set ( 'contentHeight' , 300 ) ;
118118 await this . render ( EXAMPLE_1_HBS ) ;
119119 this . simulateCallback ( true , 400 ) ;
120- assert . equal ( thumbSize ( ) , 263 , 'thumb height is compressed' ) ;
120+ assert . equal ( thumbSize ( ) , 265 , 'thumb height is compressed' ) ;
121121 assert . equal ( thumbPosition ( ) , 217 , 'thumb is at bottom' ) ;
122122 } ) ;
123123
@@ -130,22 +130,22 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
130130 // when scrolled past bottom by 5
131131 this . simulateCallback ( true , 105 ) ;
132132 assert . equal ( thumbPosition ( ) , 95 , 'thumb is at bottom' ) ;
133- assert . equal ( thumbSize ( ) , 905 , 'thumb is slightly compressed' ) ;
133+ assert . equal ( thumbSize ( ) , 907 , 'thumb is slightly compressed' ) ;
134134
135135 // when scrolled past top by 5
136136 this . simulateCallback ( true , - 5 ) ;
137137 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
138- assert . equal ( thumbSize ( ) , 995 , 'thumb is slightly compressed' ) ;
138+ assert . equal ( thumbSize ( ) , 996 , 'thumb is slightly compressed' ) ;
139139
140140 // when scrolled past bottom by 100
141141 this . simulateCallback ( true , 100 ) ;
142142 assert . equal ( thumbPosition ( ) , 90 , 'thumb is at bottom' ) ;
143- assert . equal ( thumbSize ( ) , 910 , 'thumb is slightly compressed' ) ;
143+ assert . equal ( thumbSize ( ) , 911 , 'thumb is slightly compressed' ) ;
144144
145145 // when scrolled past top by 100
146146 this . simulateCallback ( true , - 100 ) ;
147147 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
148- assert . equal ( thumbSize ( ) , 909 , 'thumb is slightly compressed' ) ;
148+ assert . equal ( thumbSize ( ) , 910 , 'thumb is slightly compressed' ) ;
149149 } ) ;
150150
151151 test ( 'behavior when content is equal to scrollview height' , async function ( assert ) {
@@ -157,22 +157,22 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
157157 // when scrolled past bottom by 5
158158 this . simulateCallback ( true , 5 ) ;
159159 assert . equal ( thumbPosition ( ) , 4 , 'thumb is at bottom' ) ;
160- assert . equal ( thumbSize ( ) , 996 , 'thumb is slightly compressed' ) ;
160+ assert . equal ( thumbSize ( ) , 997 , 'thumb is slightly compressed' ) ;
161161
162162 // when scrolled past top by 5
163163 this . simulateCallback ( true , - 5 ) ;
164164 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
165- assert . equal ( thumbSize ( ) , 995 , 'thumb is slightly compressed' ) ;
165+ assert . equal ( thumbSize ( ) , 996 , 'thumb is slightly compressed' ) ;
166166
167167 // when scrolled past bottom by 100
168168 this . simulateCallback ( true , 100 ) ;
169169 assert . equal ( thumbPosition ( ) , 90 , 'thumb is at bottom' ) ;
170- assert . equal ( thumbSize ( ) , 910 , 'thumb is slightly compressed' ) ;
170+ assert . equal ( thumbSize ( ) , 911 , 'thumb is slightly compressed' ) ;
171171
172172 // when scrolled past top by 100
173173 this . simulateCallback ( true , - 100 ) ;
174174 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
175- assert . equal ( thumbSize ( ) , 909 , 'thumb is slightly compressed' ) ;
175+ assert . equal ( thumbSize ( ) , 910 , 'thumb is slightly compressed' ) ;
176176 } ) ;
177177
178178 test ( 'behavior when content is slightly more than scrollview height' , async function ( assert ) {
@@ -184,27 +184,27 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
184184 // when scrolled past bottom by 1
185185 this . simulateCallback ( true , 101 ) ;
186186 assert . equal ( thumbPosition ( ) , 90 , 'thumb is at bottom' ) ;
187- assert . equal ( thumbSize ( ) , 810 , 'thumb is slightly compressed' ) ;
187+ assert . equal ( thumbSize ( ) , 811 , 'thumb is slightly compressed' ) ;
188188
189189 // when scrolled past top by 1
190190 this . simulateCallback ( true , - 1 ) ;
191191 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
192- assert . equal ( thumbSize ( ) , 810 , 'thumb is slightly compressed' ) ;
192+ assert . equal ( thumbSize ( ) , 811 , 'thumb is slightly compressed' ) ;
193193
194194 // when scrolled to center
195195 this . simulateCallback ( true , 50 ) ;
196196 assert . equal ( thumbPosition ( ) , 45 , 'thumb is in center' ) ;
197- assert . equal ( thumbSize ( ) , 811 , 'thumb height is not compressed' ) ;
197+ assert . equal ( thumbSize ( ) , 812 , 'thumb height is not compressed' ) ;
198198
199199 // when scrolled past bottom by 200
200200 this . simulateCallback ( true , 300 ) ;
201201 assert . equal ( thumbPosition ( ) , 237 , 'thumb is at bottom' ) ;
202- assert . equal ( thumbSize ( ) , 663 , 'thumb is heavily compressed' ) ;
202+ assert . equal ( thumbSize ( ) , 665 , 'thumb is heavily compressed' ) ;
203203
204204 // when scrolled past top by 200
205205 this . simulateCallback ( true , - 200 ) ;
206206 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
207- assert . equal ( thumbSize ( ) , 663 , 'thumb is heavily compressed' ) ;
207+ assert . equal ( thumbSize ( ) , 665 , 'thumb is heavily compressed' ) ;
208208 } ) ;
209209
210210 test ( 'behavior when content is a lot more than scrollview height' , async function ( assert ) {
@@ -216,37 +216,37 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
216216 // when scrolled past bottom by 5
217217 this . simulateCallback ( true , 1505 ) ;
218218 assert . equal ( thumbPosition ( ) , 376 , 'thumb is at bottom' ) ;
219- assert . equal ( thumbSize ( ) , 124 , 'thumb is slightly compressed' ) ;
219+ assert . equal ( thumbSize ( ) , 126 , 'thumb is slightly compressed' ) ;
220220
221221 // when scrolled past top by 5
222222 this . simulateCallback ( true , - 5 ) ;
223223 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
224- assert . equal ( thumbSize ( ) , 124 , 'thumb is slightly compressed' ) ;
224+ assert . equal ( thumbSize ( ) , 126 , 'thumb is slightly compressed' ) ;
225225
226226 // when scrolled to center
227227 this . simulateCallback ( true , 750 ) ;
228228 assert . equal ( thumbPosition ( ) , 187 , 'thumb is in center' ) ;
229- assert . equal ( thumbSize ( ) , 126 , 'thumb height is not compressed' ) ;
229+ assert . equal ( thumbSize ( ) , 127 , 'thumb height is not compressed' ) ;
230230
231231 // when scrolled past bottom by 100
232232 this . simulateCallback ( true , 1600 ) ;
233233 assert . equal ( thumbPosition ( ) , 395 , 'thumb is at bottom' ) ;
234- assert . equal ( thumbSize ( ) , 105 , 'thumb is heavily compressed' ) ;
234+ assert . equal ( thumbSize ( ) , 106 , 'thumb is heavily compressed' ) ;
235235
236236 // when scrolled past top by 100
237237 this . simulateCallback ( true , - 100 ) ;
238238 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
239- assert . equal ( thumbSize ( ) , 105 , 'thumb is heavily compressed' ) ;
239+ assert . equal ( thumbSize ( ) , 106 , 'thumb is heavily compressed' ) ;
240240
241241 // when scrolled past bottom by 500
242242 this . simulateCallback ( true , 2000 ) ;
243243 assert . equal ( thumbPosition ( ) , 437 , 'thumb is at bottom' ) ;
244- assert . equal ( thumbSize ( ) , 63 , 'thumb is small' ) ;
244+ assert . equal ( thumbSize ( ) , 65 , 'thumb is small' ) ;
245245
246246 // when scrolled past top by 500
247247 this . simulateCallback ( true , - 500 ) ;
248248 assert . equal ( thumbPosition ( ) , 0 , 'thumb is at top' ) ;
249- assert . equal ( thumbSize ( ) , 63 , 'thumb is small' ) ;
249+ assert . equal ( thumbSize ( ) , 65 , 'thumb is small' ) ;
250250 } ) ;
251251
252252 test ( 'calculations update when scrollerHeight changes' , async function ( assert ) {
@@ -257,12 +257,12 @@ module('Integration | Component | vertical-scroll-bar', function(hooks) {
257257
258258 this . simulateCallback ( true , 750 ) ;
259259 assert . equal ( thumbPosition ( ) , 187 , 'thumb is in center' ) ;
260- assert . equal ( thumbSize ( ) , 126 , 'thumb height is not compressed' ) ;
260+ assert . equal ( thumbSize ( ) , 127 , 'thumb height is not compressed' ) ;
261261
262262 this . set ( 'scrollerHeight' , 1000 ) ;
263263
264264 this . simulateCallback ( true , 750 ) ;
265265 assert . equal ( thumbPosition ( ) , 375 , 'thumb is in center' ) ;
266- assert . equal ( thumbSize ( ) , 501 , 'thumb height is not compressed' ) ;
266+ assert . equal ( thumbSize ( ) , 502 , 'thumb height is not compressed' ) ;
267267 } ) ;
268268} ) ;
0 commit comments