Skip to content

Commit 0b51a74

Browse files
authored
Merge pull request #2531 from GuillaumeGomez/regression-test-2529
Add GUI regression test for #2529
2 parents 629c2ad + ce63cc3 commit 0b51a74

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
merge_group:
55

66
env:
7-
BROWSER_UI_TEST_VERSION: '0.18.2'
7+
BROWSER_UI_TEST_VERSION: '0.19.0'
88

99
jobs:
1010
test:

tests/gui/runner.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ fn main() {
7575
let mut command = Command::new("npx");
7676
command
7777
.arg("browser-ui-test")
78-
.arg("--no-sandbox")
7978
.args(["--variable", "DOC_PATH", book_dir.as_str()])
8079
.args(["--test-folder", "tests/gui"]);
8180
if std::env::args().any(|arg| arg == "--disable-headless-test") {

tests/gui/sidebar-nojs.goml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This GUI test checks that the sidebar takes the whole height when it's inside
2+
// an iframe (because of JS disabled).
3+
// Regression test for <https://github.com/rust-lang/mdBook/issues/2528>.
4+
5+
// We disable the requests checks because `searchindex.json` will always fail
6+
// locally.
7+
fail-on-request-error: false
8+
// We disable javascript
9+
javascript: false
10+
go-to: |DOC_PATH| + "index.html"
11+
store-value: (height, 1000)
12+
set-window-size: (1000, |height|)
13+
14+
within-iframe: (".sidebar-iframe-outer", block {
15+
assert-size: (" body", {"height": |height|})
16+
})

0 commit comments

Comments
 (0)