fix window creation

This commit is contained in:
Jonas Kruckenberg 2023-02-09 11:48:03 +01:00
parent a95a8a3c78
commit 347dd0aca7
3 changed files with 53 additions and 12 deletions

View file

@ -185,7 +185,7 @@ fn main() {
InteractiveTest(name="notification::show_notification",test=notification::show_notification())
InteractiveTest(name="global_shortcut::register_all",test=global_shortcut::register_all())
// Test(name="window::WebviewWindow::new",test=window::create_window())
Test(name="window::WebviewWindow::new",test=window::create_window())
Terminate
// }

View file

@ -2,10 +2,12 @@ use anyhow::ensure;
use tauri_sys::window;
pub async fn create_window() -> anyhow::Result<()> {
let win = window::WebviewWindowBuilder::new("foo").build()?;
let win = window::WebviewWindowBuilder::new("foo-win")
.set_url("/")
.build()
.await?;
ensure!(win.is_visible().await?);
// ensure!(win.label() == "foo".to_string());
win.close().await?;