refactor(settings): fold the read-only Advanced page into its owning sections
This commit is contained in:
@@ -31,7 +31,6 @@ fn internal_page_title(url: &str) -> Option<&'static str> {
|
||||
url if SiteOrigin::from_site_route(url).ok().flatten().is_some() => Some("Site Settings"),
|
||||
"ely://about" => Some("About ELY Browser"),
|
||||
"ely://settings" => Some("Settings"),
|
||||
"ely://settings/advanced" => Some("Advanced Settings"),
|
||||
"ely://settings/general" => Some("General Settings"),
|
||||
"ely://settings/appearance" => Some("Appearance Settings"),
|
||||
"ely://settings/sidebar-tabs" => Some("Sidebar & Tabs Settings"),
|
||||
@@ -266,26 +265,6 @@ const SETTINGS_ROUTE_MATCHES: &[SettingsRouteMatch] = &[
|
||||
exact_terms: &["settings"],
|
||||
search_terms: &["Settings center", "all browser settings"],
|
||||
},
|
||||
SettingsRouteMatch {
|
||||
route: "ely://settings/advanced",
|
||||
exact_terms: &[
|
||||
"advanced",
|
||||
"advanced settings",
|
||||
"runtime",
|
||||
"diagnostics",
|
||||
"diagnostic",
|
||||
"compatibility",
|
||||
"site compatibility",
|
||||
],
|
||||
search_terms: &[
|
||||
"Advanced",
|
||||
"Local runtime policies and audit counters.",
|
||||
"runtime policy",
|
||||
"audit counters",
|
||||
"diagnostics",
|
||||
"site compatibility",
|
||||
],
|
||||
},
|
||||
SettingsRouteMatch {
|
||||
route: "ely://settings/general",
|
||||
exact_terms: &["general", "browser", "new tab", "new-tab", "startup"],
|
||||
|
||||
@@ -66,27 +66,6 @@ fn settings_scoped_search_opens_appearance_page() -> Result<(), Box<dyn Error>>
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_scoped_search_opens_advanced_page() -> Result<(), Box<dyn Error>> {
|
||||
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
|
||||
|
||||
core.set_command_query("@settings advanced");
|
||||
let intent = core.submit_command()?;
|
||||
let active_tab = core.active_tab()?;
|
||||
|
||||
assert_eq!(
|
||||
intent,
|
||||
Some(CommandIntent::ScopedSearch {
|
||||
scope: CommandScope::Settings,
|
||||
query: "advanced".to_string(),
|
||||
})
|
||||
);
|
||||
assert_eq!(active_tab.title(), "Advanced Settings");
|
||||
assert_eq!(active_tab.url().as_str(), "ely://settings/advanced");
|
||||
assert_eq!(core.snapshot()?.command_query, "");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_scoped_search_opens_shortcuts_page() -> Result<(), Box<dyn Error>> {
|
||||
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
|
||||
|
||||
Reference in New Issue
Block a user