@@ -7,11 +7,11 @@ assert-property: (".sidebar-scrollbox", {"scrollTop": 0})
77
88click: ".chapter a[href='chapter_2.html']"
99assert-text: ("title", "Chapter 2 - sidebar-scroll")
10- assert -property: (".sidebar-scrollbox", {"scrollTop": 0})
10+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": 0})
1111
1212click: ".chapter a[href='chapter_10.html']"
1313assert-text: ("title", "Chapter 10 - sidebar-scroll")
14- assert -property: (".sidebar-scrollbox", {"scrollTop": 0})
14+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": 0})
1515
1616// Check that heading nav of chapter 10 pushes 11 off the bottom.
1717store-position: (".chapter a[href='chapter_11.html']", {"y": chapter_y})
@@ -21,7 +21,7 @@ assert: |chapter_y| > |windowHeight|
2121// in position since there are only a few lines above.
2222click: ".chapter a[href='chapter_11.html']"
2323assert-text: ("title", "Chapter 11 - sidebar-scroll")
24- assert -property: (".sidebar-scrollbox", {"scrollTop": 0})
24+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": 0})
2525
2626// Scroll down a little, and click on a chapter that can stay in place when
2727// clicked.
@@ -30,11 +30,12 @@ store-property: (".sidebar-scrollbox", {"scrollTop": sidebarScrollTop})
3030assert: |sidebarScrollTop| > 0
3131click: ".chapter a[href='chapter_35.html']"
3232assert-text: ("title", "Chapter 35 - sidebar-scroll")
33- assert -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
33+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
3434
3535// Go to the next chapter, and verify that it scrolls to the middle.
3636press-key: "ArrowRight"
3737assert-text: ("title", "Chapter 36 - sidebar-scroll")
38+ wait-for: ".chapter a.active"
3839// The active link should be roughly in the middle of the screen.
3940store-position: (".chapter a.active", {"y": active_y})
4041// Approximate check just in case the browser has slight rendering differences.
@@ -45,7 +46,7 @@ assert: |active_y| < 450
4546store-property: (".sidebar-scrollbox", {"scrollTop": sidebarScrollTop})
4647click: ".chapter a[href='chapter_24.html']"
4748assert-text: ("title", "Chapter 24 - sidebar-scroll")
48- assert -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
49+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
4950
5051// Go to the last chapter, and verify it is scrolled to the bottom.
5152go-to: |DOC_PATH| + "sidebar-scroll/chapter_100.html"
@@ -57,9 +58,9 @@ assert: |scrollTop| >= |scrollHeight| - |clientHeight| - 1
5758store-property: (".sidebar-scrollbox", {"scrollTop": sidebarScrollTop})
5859click: ".chapter a[href='chapter_97.html']"
5960assert-text: ("title", "Chapter 97 - sidebar-scroll")
60- assert -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
61+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
6162
6263store-property: (".sidebar-scrollbox", {"scrollTop": sidebarScrollTop})
6364click: ".chapter a[href='chapter_76.html']"
6465assert-text: ("title", "Chapter 76 - sidebar-scroll")
65- assert -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
66+ wait-for -property: (".sidebar-scrollbox", {"scrollTop": |sidebarScrollTop|})
0 commit comments