Add about internal page

This commit is contained in:
2026-05-08 00:29:29 -04:00
parent 5196aff6a3
commit b4aedad593
8 changed files with 341 additions and 3 deletions
+36
View File
@@ -81,6 +81,21 @@ fn open_history_command_opens_history_page() -> Result<(), Box<dyn Error>> {
Ok(())
}
#[test]
fn open_about_command_opens_about_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_command_query(">about");
let intent = core.submit_command()?;
let active_tab = core.active_tab()?;
assert_eq!(intent, Some(CommandIntent::Command("about".to_string())));
assert_eq!(active_tab.title(), "About ELY Browser");
assert_eq!(active_tab.url().as_str(), "ely://about");
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}
#[test]
fn open_settings_command_opens_settings_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
@@ -111,6 +126,27 @@ fn open_sync_status_command_opens_sync_status_page() -> Result<(), Box<dyn Error
Ok(())
}
#[test]
fn settings_scoped_search_opens_about_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_command_query("@settings about");
let intent = core.submit_command()?;
let active_tab = core.active_tab()?;
assert_eq!(
intent,
Some(CommandIntent::ScopedSearch {
scope: CommandScope::Settings,
query: "about".to_string()
})
);
assert_eq!(active_tab.title(), "About ELY Browser");
assert_eq!(active_tab.url().as_str(), "ely://about");
assert_eq!(core.snapshot()?.command_query, "");
Ok(())
}
#[test]
fn settings_scoped_search_opens_matching_settings_page() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;