Add updates settings surface

This commit is contained in:
2026-05-08 20:53:38 -04:00
parent 277ae8c689
commit 47bfea6c8b
5 changed files with 248 additions and 0 deletions
@@ -41,6 +41,7 @@ fn internal_page_title(url: &str) -> Option<&'static str> {
"ely://settings/plugins" => Some("Plugin Settings"),
"ely://settings/profiles" => Some("Profile Settings"),
"ely://settings/sync" => Some("Sync Settings"),
"ely://settings/updates" => Some("Update Settings"),
"ely://sync/status" => Some("Sync Status"),
_ => None,
}
@@ -259,6 +260,9 @@ fn settings_page_route(query: &str) -> Option<&'static str> {
Some("ely://settings/shortcuts")
}
"sync" | "sync settings" => Some("ely://settings/sync"),
"update" | "updates" | "auto update" | "auto updates" | "release" | "releases" => {
Some("ely://settings/updates")
}
"profile" | "profiles" | "profile settings" | "profiles settings" => {
Some("ely://settings/profiles")
}
@@ -191,3 +191,24 @@ fn settings_scoped_search_opens_site_permissions_page() -> Result<(), Box<dyn Er
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}
#[test]
fn settings_scoped_search_opens_updates_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_command_query("@settings updates");
let intent = core.submit_command()?;
let active_tab = core.active_tab()?;
assert_eq!(
intent,
Some(CommandIntent::ScopedSearch {
scope: CommandScope::Settings,
query: "updates".to_string(),
})
);
assert_eq!(active_tab.title(), "Update Settings");
assert_eq!(active_tab.url().as_str(), "ely://settings/updates");
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}