mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
ci(examples): fix portal test (#2051)
This commit is contained in:
parent
453911e6fc
commit
1cd6603da0
2 changed files with 8 additions and 3 deletions
|
@ -12,4 +12,5 @@ console_error_panic_hook = "0.1.7"
|
|||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.0"
|
||||
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 web_sys::HtmlButtonElement;
|
||||
|
||||
async fn next_tick() {
|
||||
gloo_timers::future::TimeoutFuture::new(25).await;
|
||||
}
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn portal() {
|
||||
async fn portal() {
|
||||
let document = leptos::document();
|
||||
let body = document.body().unwrap();
|
||||
|
||||
|
@ -24,7 +28,7 @@ fn portal() {
|
|||
|
||||
show_button.click();
|
||||
|
||||
// next_tick().await;
|
||||
next_tick().await;
|
||||
|
||||
// check HTML
|
||||
assert_eq!(
|
||||
|
|
Loading…
Reference in a new issue