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
|
||||
- uses: Swatinem/rust-cache@v1
|
||||
- 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
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
|
|
@ -13,3 +13,8 @@ license = "MIT/Apache-2.0"
|
|||
|
||||
[dependencies]
|
||||
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 = []
|
||||
mobile = []
|
||||
derive = []
|
||||
wasm_test = []
|
||||
|
||||
[dev-dependencies]
|
||||
console_error_panic_hook = "0.1.7"
|
||||
|
@ -50,3 +51,10 @@ dioxus-web = { path = "../web" }
|
|||
log = "0.4.14"
|
||||
wasm-logger = "0.2.0"
|
||||
wasm-bindgen-test = "0.3"
|
||||
gloo-utils = "0.1.2"
|
||||
|
||||
[dev-dependencies.web-sys]
|
||||
version = "0.3"
|
||||
features = [
|
||||
"Document",
|
||||
]
|
|
@ -1,10 +1,10 @@
|
|||
[tasks.test]
|
||||
extend = "core::wasm-pack-base"
|
||||
command = "wasm-pack"
|
||||
args = [
|
||||
"test",
|
||||
"@@split(DIOXUS_TEST_FLAGS, )",
|
||||
"--",
|
||||
"--features",
|
||||
"${DIOXUS_TEST_FEATURES}",
|
||||
]
|
||||
command = "wasm-pack"
|
||||
extend = "core::wasm-pack-base"
|
||||
]
|
|
@ -52,17 +52,12 @@ fn simple_test() {
|
|||
|
||||
cx.render(rsx! {
|
||||
div {
|
||||
id: "test1",
|
||||
id
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
let element = gloo_utils::document()
|
||||
.get_element_by_id("test1")
|
||||
.expect("No result found. Most likely, the application crashed")
|
||||
.inner_html();
|
||||
assert!(element, "");
|
||||
let element = gloo_utils::document();
|
||||
}
|
||||
|
|
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