Skip to content

Commit

Permalink
ci(examples): fix portal test (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Nov 21, 2023
1 parent 453911e commit 1cd6603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/portal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
8 changes: 6 additions & 2 deletions examples/portal/tests/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -24,7 +28,7 @@ fn portal() {

show_button.click();

// next_tick().await;
next_tick().await;

// check HTML
assert_eq!(
Expand Down

0 comments on commit 1cd6603

Please sign in to comment.