Merge pull request #2744 from GuillaumeGomez/sidebar-text-test

Add check that text in collapsed sidebar cannot be found
This commit is contained in:
Eric Huss 2025-07-07 20:39:03 +00:00 committed by GitHub
commit ec6f26e652
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"dependencies": {
"browser-ui-test": "0.21.0",
"browser-ui-test": "0.21.1",
"eslint": "^8.57.1"
},
"scripts": {

View file

@ -43,8 +43,14 @@ define-function: (
},
)
// Since the sidebar is visible, we should be able to find this text.
assert-find-text: ("3.9. Links and Horizontal Rule", {"case-sensitive": true})
call-function: ("hide-sidebar", {})
// Text should not be findeable anymore since the sidebar is collapsed.
assert-find-text-false: ("3.9. Links and Horizontal Rule", {"case-sensitive": true})
call-function: ("show-sidebar", {})
// We should be able to find this text again.
assert-find-text: ("3.9. Links and Horizontal Rule", {"case-sensitive": true})
// We now test on smaller width to ensure that the sidebar is collapsed by default.
set-window-size: (900, 600)