fix(ci): make Emitter import unconditional and update defineExpose test regex

- Move Emitter import out of macos-only cfg so emit() works on Linux
- Update test regex to include scrollCursorIntoView in defineExpose
This commit is contained in:
t8y2 2026-05-28 22:09:54 +08:00
parent 18e5ee35bb
commit e15e99aeb5
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ test("query editor opens search and replace with configurable shortcuts", () =>
assert.match(source, /shortcutToCodeMirrorKey\(shortcuts\.find\)/);
assert.match(source, /shortcutToCodeMirrorKey\(shortcuts\.replace\)/);
assert.match(source, /run:\s*openReplace/);
assert.match(source, /defineExpose\(\{\s*openSearch,\s*openReplace\s*\}\)/);
assert.match(source, /defineExpose\(\{\s*openSearch,\s*openReplace,\s*scrollCursorIntoView\s*\}\)/);
assert.match(searchPanelSource, /showReplace\.value\s*=\s*true/);
assert.match(searchPanelSource, /replaceInputRef\.value\?\.focus\(\)/);
assert.match(searchPanelSource, /defineExpose\(\{\s*openSearch,\s*openReplace,\s*closeSearch\s*\}\)/);

View File

@ -8,13 +8,13 @@ use commands::connection::AppState;
use dbx_core::storage::Storage;
use std::sync::Arc;
use std::time::Instant;
use tauri::Manager;
#[cfg(target_os = "macos")]
use tauri::RunEvent;
use tauri::{
menu::MenuBuilder,
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
};
#[cfg(target_os = "macos")]
use tauri::{Emitter, RunEvent};
use tauri::{Emitter, Manager};
#[cfg(any(windows, target_os = "linux"))]
use tauri_plugin_deep_link::DeepLinkExt;