@@ -40,20 +40,23 @@ public void AlwaysFillsVisibleCapacity_Sync()
40
40
// Wait until items have been rendered.
41
41
Browser . True ( ( ) => ( initialItemCount = GetItemCount ( ) ) > 0 ) ;
42
42
Browser . Equal ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
43
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
43
44
44
45
// Scroll halfway.
45
46
Browser . ExecuteJavaScript ( "const container = document.getElementById('sync-container');container.scrollTop = container.scrollHeight * 0.5;" ) ;
46
47
47
48
// Validate that we get the same item count after scrolling halfway.
48
49
Browser . Equal ( initialItemCount , GetItemCount ) ;
49
50
Browser . NotEqual ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
51
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
50
52
51
53
// Scroll to the bottom.
52
54
Browser . ExecuteJavaScript ( "const container = document.getElementById('sync-container');container.scrollTop = container.scrollHeight;" ) ;
53
55
54
56
// Validate that we get the same item count after scrolling to the bottom.
55
57
Browser . Equal ( initialItemCount , GetItemCount ) ;
56
58
Browser . NotEqual ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
59
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
57
60
58
61
int GetItemCount ( ) => Browser . FindElements ( By . Id ( "sync-item" ) ) . Count ;
59
62
}
@@ -200,6 +203,7 @@ public void CanUseViewportAsContainer()
200
203
201
204
// Validate that the top spacer has a height of zero.
202
205
Browser . Equal ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
206
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
203
207
204
208
Browser . ExecuteJavaScript ( "window.scrollTo(0, document.body.scrollHeight);" ) ;
205
209
@@ -209,6 +213,7 @@ public void CanUseViewportAsContainer()
209
213
210
214
// Validate that the top spacer has expanded.
211
215
Browser . NotEqual ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
216
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
212
217
}
213
218
214
219
[ Fact ]
@@ -221,6 +226,7 @@ public async Task ToleratesIncorrectItemSize()
221
226
// Wait until items have been rendered.
222
227
Browser . True ( ( ) => GetItemCount ( ) > 0 ) ;
223
228
Browser . Equal ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
229
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
224
230
225
231
// Scroll slowly, in increments of 50px at a time. At one point this would trigger a bug
226
232
// due to the incorrect item size, whereby it would not realise it's necessary to show more
@@ -234,6 +240,7 @@ public async Task ToleratesIncorrectItemSize()
234
240
235
241
// Validate that the top spacer did change
236
242
Browser . NotEqual ( expectedInitialSpacerStyle , ( ) => topSpacer . GetDomAttribute ( "style" ) ) ;
243
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
237
244
238
245
int GetItemCount ( ) => Browser . FindElements ( By . ClassName ( "incorrect-size-item" ) ) . Count ;
239
246
}
@@ -250,6 +257,8 @@ public void CanRenderHtmlTable()
250
257
Assert . Equal ( "tr" , topSpacer . TagName . ToLowerInvariant ( ) ) ;
251
258
Assert . Equal ( "tr" , bottomSpacer . TagName . ToLowerInvariant ( ) ) ;
252
259
Assert . Contains ( expectedInitialSpacerStyle , topSpacer . GetDomAttribute ( "style" ) ) ;
260
+ Assert . Contains ( "true" , topSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
261
+ Assert . Contains ( "true" , bottomSpacer . GetDomAttribute ( "aria-hidden" ) ) ;
253
262
254
263
// Check scrolling document element works
255
264
Browser . DoesNotExist ( By . Id ( "row-999" ) ) ;
0 commit comments