Skip to content

Commit

Permalink
Merge pull request #2531 from GuillaumeGomez/regression-test-2529
Browse files Browse the repository at this point in the history
Add GUI regression test for #2529
  • Loading branch information
ehuss authored Jan 23, 2025
2 parents 629c2ad + ce63cc3 commit 0b51a74
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
merge_group:

env:
BROWSER_UI_TEST_VERSION: '0.18.2'
BROWSER_UI_TEST_VERSION: '0.19.0'

jobs:
test:
Expand Down
1 change: 0 additions & 1 deletion tests/gui/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ fn main() {
let mut command = Command::new("npx");
command
.arg("browser-ui-test")
.arg("--no-sandbox")
.args(["--variable", "DOC_PATH", book_dir.as_str()])
.args(["--test-folder", "tests/gui"]);
if std::env::args().any(|arg| arg == "--disable-headless-test") {
Expand Down
16 changes: 16 additions & 0 deletions tests/gui/sidebar-nojs.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This GUI test checks that the sidebar takes the whole height when it's inside
// an iframe (because of JS disabled).
// Regression test for <https://github.com/rust-lang/mdBook/issues/2528>.

// We disable the requests checks because `searchindex.json` will always fail
// locally.
fail-on-request-error: false
// We disable javascript
javascript: false
go-to: |DOC_PATH| + "index.html"
store-value: (height, 1000)
set-window-size: (1000, |height|)

within-iframe: (".sidebar-iframe-outer", block {
assert-size: (" body", {"height": |height|})
})

0 comments on commit 0b51a74

Please sign in to comment.