mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
setup done, local tests work, check workflow
This commit is contained in:
parent
24d78682ad
commit
f1865faef7
7 changed files with 36 additions and 11 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -32,7 +32,7 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
- run: sudo apt-get update
|
- run: sudo apt-get update
|
||||||
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev
|
- run: sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev libgtk-3-dev firefox-csr
|
||||||
- name: Install cargo-make
|
- name: Install cargo-make
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -13,3 +13,8 @@ license = "MIT/Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dioxus-desktop = { path = "../desktop", version = "^0.1.6" }
|
dioxus-desktop = { path = "../desktop", version = "^0.1.6" }
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
doctest = false
|
||||||
|
# tests suspended until package ready
|
||||||
|
test = false
|
7
packages/mobile/Makefile.toml
Normal file
7
packages/mobile/Makefile.toml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[tasks.test]
|
||||||
|
command = "cargo"
|
||||||
|
args = [
|
||||||
|
"test",
|
||||||
|
"--no-run",
|
||||||
|
]
|
||||||
|
|
|
@ -43,6 +43,7 @@ web = ["web-sys", "gloo", "js-sys", "wasm-bindgen"]
|
||||||
desktop = []
|
desktop = []
|
||||||
mobile = []
|
mobile = []
|
||||||
derive = []
|
derive = []
|
||||||
|
wasm_test = []
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
console_error_panic_hook = "0.1.7"
|
console_error_panic_hook = "0.1.7"
|
||||||
|
@ -50,3 +51,10 @@ dioxus-web = { path = "../web" }
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
wasm-logger = "0.2.0"
|
wasm-logger = "0.2.0"
|
||||||
wasm-bindgen-test = "0.3"
|
wasm-bindgen-test = "0.3"
|
||||||
|
gloo-utils = "0.1.2"
|
||||||
|
|
||||||
|
[dev-dependencies.web-sys]
|
||||||
|
version = "0.3"
|
||||||
|
features = [
|
||||||
|
"Document",
|
||||||
|
]
|
|
@ -1,4 +1,6 @@
|
||||||
[tasks.test]
|
[tasks.test]
|
||||||
|
extend = "core::wasm-pack-base"
|
||||||
|
command = "wasm-pack"
|
||||||
args = [
|
args = [
|
||||||
"test",
|
"test",
|
||||||
"@@split(DIOXUS_TEST_FLAGS, )",
|
"@@split(DIOXUS_TEST_FLAGS, )",
|
||||||
|
@ -6,5 +8,3 @@ args = [
|
||||||
"--features",
|
"--features",
|
||||||
"${DIOXUS_TEST_FEATURES}",
|
"${DIOXUS_TEST_FEATURES}",
|
||||||
]
|
]
|
||||||
command = "wasm-pack"
|
|
||||||
extend = "core::wasm-pack-base"
|
|
||||||
|
|
|
@ -52,17 +52,12 @@ fn simple_test() {
|
||||||
|
|
||||||
cx.render(rsx! {
|
cx.render(rsx! {
|
||||||
div {
|
div {
|
||||||
id: "test1",
|
|
||||||
id
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|
||||||
let element = gloo_utils::document()
|
let element = gloo_utils::document();
|
||||||
.get_element_by_id("test1")
|
|
||||||
.expect("No result found. Most likely, the application crashed")
|
|
||||||
.inner_html();
|
|
||||||
assert!(element, "");
|
|
||||||
}
|
}
|
||||||
|
|
10
packages/router/webdriver.json
Normal file
10
packages/router/webdriver.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"moz:firefoxOptions": {
|
||||||
|
"binary": "/usr/bin/firefox",
|
||||||
|
"prefs": {
|
||||||
|
"media.navigator.streams.fake": true,
|
||||||
|
"media.navigator.permission.disabled": true
|
||||||
|
},
|
||||||
|
"args": []
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue