ci(examples): fix portal test (#2051)
This commit is contained in:
parent
453911e6fc
commit
1cd6603da0
|
@ -13,3 +13,4 @@ console_error_panic_hook = "0.1.7"
|
||||||
wasm-bindgen-test = "0.3.0"
|
wasm-bindgen-test = "0.3.0"
|
||||||
wasm-bindgen = "0.2"
|
wasm-bindgen = "0.2"
|
||||||
web-sys = "0.3"
|
web-sys = "0.3"
|
||||||
|
gloo-timers = { version = "0.3", features = ["futures"] }
|
||||||
|
|
|
@ -6,8 +6,12 @@ use leptos::*;
|
||||||
use portal::App;
|
use portal::App;
|
||||||
use web_sys::HtmlButtonElement;
|
use web_sys::HtmlButtonElement;
|
||||||
|
|
||||||
|
async fn next_tick() {
|
||||||
|
gloo_timers::future::TimeoutFuture::new(25).await;
|
||||||
|
}
|
||||||
|
|
||||||
#[wasm_bindgen_test]
|
#[wasm_bindgen_test]
|
||||||
fn portal() {
|
async fn portal() {
|
||||||
let document = leptos::document();
|
let document = leptos::document();
|
||||||
let body = document.body().unwrap();
|
let body = document.body().unwrap();
|
||||||
|
|
||||||
|
@ -24,7 +28,7 @@ fn portal() {
|
||||||
|
|
||||||
show_button.click();
|
show_button.click();
|
||||||
|
|
||||||
// next_tick().await;
|
next_tick().await;
|
||||||
|
|
||||||
// check HTML
|
// check HTML
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|
Loading…
Reference in New Issue