chore: fix tests (#14720)

* chore: fix tests

* windows
This commit is contained in:
Fabian-Lars 2026-01-02 16:02:23 +01:00 committed by GitHub
parent 9b242e40c8
commit dcd1a65889
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 6 additions and 3 deletions

1
Cargo.lock generated
View File

@ -8978,6 +8978,7 @@ dependencies = [
"serial_test", "serial_test",
"serialize-to-javascript", "serialize-to-javascript",
"swift-rs", "swift-rs",
"tauri",
"thiserror 2.0.12", "thiserror 2.0.12",
"toml 0.9.10+spec-1.1.0", "toml 0.9.10+spec-1.1.0",
"url", "url",

View File

@ -165,7 +165,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"windows": { "windows": {
"description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```",
"default": [], "default": [],
"type": "array", "type": "array",
"items": { "items": {

View File

@ -165,7 +165,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"windows": { "windows": {
"description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```", "description": "The app windows configuration.\n\n ## Example:\n\n To create a window at app startup\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n If not specified, the window's label (its identifier) defaults to \"main\",\n you can use this label to get the window through\n `app.get_webview_window` in Rust or `WebviewWindow.getByLabel` in JavaScript\n\n When working with multiple windows, each window will need an unique label\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"label\": \"main\", \"width\": 800, \"height\": 600 },\n { \"label\": \"secondary\", \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n You can also set `create` to false and use this config through the Rust APIs\n\n ```json\n {\n \"app\": {\n \"windows\": [\n { \"create\": false, \"width\": 800, \"height\": 600 }\n ]\n }\n }\n ```\n\n and use it like this\n\n ```rust\n tauri::Builder::default()\n .setup(|app| {\n tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;\n Ok(())\n });\n ```",
"default": [], "default": [],
"type": "array", "type": "array",
"items": { "items": {

View File

@ -57,6 +57,7 @@ swift-rs = { version = "1", optional = true, features = ["build"] }
[dev-dependencies] [dev-dependencies]
getrandom = { version = "0.3", features = ["std"] } getrandom = { version = "0.3", features = ["std"] }
serial_test = "3" serial_test = "3"
tauri = { path = "../tauri" }
[features] [features]
build = [ build = [

View File

@ -2742,7 +2742,7 @@ pub struct AppConfig {
/// ```rust /// ```rust
/// tauri::Builder::default() /// tauri::Builder::default()
/// .setup(|app| { /// .setup(|app| {
/// tauri::WebviewWindowBuilder::from_config(app.handle(), app.config().app.windows[0])?.build()?; /// tauri::WebviewWindowBuilder::from_config(app.handle(), &app.config().app.windows[0])?.build()?;
/// Ok(()) /// Ok(())
/// }); /// });
/// ``` /// ```

View File

@ -3,6 +3,7 @@ source: crates/tests/acl/src/lib.rs
expression: resolved expression: resolved
--- ---
Resolved { Resolved {
has_app_acl: false,
allowed_commands: { allowed_commands: {
"plugin:os|spawn": [ "plugin:os|spawn": [
ResolvedCommand { ResolvedCommand {