Add tests for default-settings

This commit is contained in:
Guillaume Gomez 2021-07-21 17:56:41 +02:00
parent 3bafcf87aa
commit 174728d045
9 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// This test ensures that the default settings are correctly applied.
//
// The "settings" crate uses "ayu" as default setting, which is what we will
// check.
goto: file://|DOC_PATH|/settings/index.html
// Wait a bit to be sure the default theme is applied.
wait-for: 1000
assert-css: ("body", {"background-color": "rgb(15, 20, 25)"})

View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "implementors"
version = "0.1.0"

View File

@ -0,0 +1,14 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "implementors"
version = "0.1.0"
[[package]]
name = "lib2"
version = "0.1.0"
dependencies = [
"implementors",
]

View File

@ -0,0 +1,2 @@
[build]
rustdocflags = ["--default-theme", "ayu"]

View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "settings"
version = "0.1.0"

View File

@ -0,0 +1,7 @@
[package]
name = "settings"
version = "0.1.0"
edition = "2018"
[lib]
path = "lib.rs"

View File

@ -0,0 +1 @@
pub fn foo() {}

View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "test_docs"
version = "0.1.0"

View File

@ -0,0 +1,7 @@
// compile-flags: --default-theme ayu
// @has default_theme/index.html
// @has - '//script[@id="default-settings"]/@data-theme' 'ayu'
// @has - '//script[@id="default-settings"]/@data-use_system_theme' 'false'
pub fn whatever() {}