Add pinned tab controls

This commit is contained in:
2026-05-07 19:47:27 -04:00
parent 0f372c5fc0
commit 82df2b4502
8 changed files with 163 additions and 2 deletions
+15
View File
@@ -18,6 +18,21 @@ fn favorite_command_toggles_active_tab() -> Result<(), Box<dyn Error>> {
Ok(())
}
#[test]
fn pin_command_toggles_active_tab() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
core.set_command_query(">pin");
let intent = core.submit_command()?;
let snapshot = core.snapshot()?;
assert_eq!(intent, Some(CommandIntent::Command("pin".to_string())));
assert_eq!(snapshot.pinned_tabs.len(), 1);
assert_eq!(snapshot.pinned_tabs[0].id(), &snapshot.active_tab_id);
assert_eq!(snapshot.command_query, "");
Ok(())
}
#[test]
fn new_tab_command_opens_new_tab() -> Result<(), Box<dyn Error>> {
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;