ci(examples): fix portal test (#2051)

This commit is contained in:
Greg Johnston 2023-11-20 20:39:19 -05:00 committed by GitHub
parent 453911e6fc
commit 1cd6603da0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -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"] }

View file

@ -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!(