Merge pull request #2531 from GuillaumeGomez/regression-test-2529
Add GUI regression test for #2529
This commit is contained in:
commit
0b51a74c16
3 changed files with 17 additions and 2 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
||||||
merge_group:
|
merge_group:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BROWSER_UI_TEST_VERSION: '0.18.2'
|
BROWSER_UI_TEST_VERSION: '0.19.0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ fn main() {
|
||||||
let mut command = Command::new("npx");
|
let mut command = Command::new("npx");
|
||||||
command
|
command
|
||||||
.arg("browser-ui-test")
|
.arg("browser-ui-test")
|
||||||
.arg("--no-sandbox")
|
|
||||||
.args(["--variable", "DOC_PATH", book_dir.as_str()])
|
.args(["--variable", "DOC_PATH", book_dir.as_str()])
|
||||||
.args(["--test-folder", "tests/gui"]);
|
.args(["--test-folder", "tests/gui"]);
|
||||||
if std::env::args().any(|arg| arg == "--disable-headless-test") {
|
if std::env::args().any(|arg| arg == "--disable-headless-test") {
|
||||||
|
|
|
||||||
16
tests/gui/sidebar-nojs.goml
Normal file
16
tests/gui/sidebar-nojs.goml
Normal file
|
|
@ -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|})
|
||||||
|
})
|
||||||
Loading…
Add table
Reference in a new issue