refactor(settings): remove the Updates page until an updater exists
This commit is contained in:
@@ -4,7 +4,7 @@ use ely_browser_core::{BrowserCore, InitialBrowserConfig};
|
||||
use ely_domain::{
|
||||
ArchivePolicy, DEFAULT_SIDEBAR_WIDTH_PX, DiagnosticsReportingPolicy, DownloadPolicy,
|
||||
FavoriteLimit, HistoryRecordingPolicy, NewTabDestination, ProfileKind, ProfileSyncPolicy,
|
||||
SearchEngine, SyncObjectKind, SyncObjectPolicy, UpdatePolicy,
|
||||
SearchEngine, SyncObjectKind, SyncObjectPolicy,
|
||||
};
|
||||
|
||||
#[test]
|
||||
@@ -51,9 +51,6 @@ fn section_resets_restore_settings_defaults() -> Result<(), Box<dyn Error>> {
|
||||
core.reset_sync_settings();
|
||||
assert_eq!(core.sync_object_policy(SyncObjectKind::Tabs), SyncObjectPolicy::Enabled);
|
||||
|
||||
core.set_update_policy(UpdatePolicy::Manual);
|
||||
core.reset_update_settings();
|
||||
assert_eq!(core.snapshot()?.update_policy, UpdatePolicy::Automatic);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -213,32 +213,11 @@ fn settings_scoped_search_opens_site_permissions_page() -> Result<(), Box<dyn Er
|
||||
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(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn settings_scoped_search_matches_setting_description_terms() -> Result<(), Box<dyn Error>> {
|
||||
let mut core = BrowserCore::new(InitialBrowserConfig::ely_defaults()?)?;
|
||||
|
||||
core.set_command_query("@settings build identity");
|
||||
core.set_command_query("@settings sync object scope");
|
||||
let intent = core.submit_command()?;
|
||||
let active_tab = core.active_tab()?;
|
||||
|
||||
@@ -246,11 +225,11 @@ fn settings_scoped_search_matches_setting_description_terms() -> Result<(), Box<
|
||||
intent,
|
||||
Some(CommandIntent::ScopedSearch {
|
||||
scope: CommandScope::Settings,
|
||||
query: "build identity".to_string(),
|
||||
query: "sync object scope".to_string(),
|
||||
})
|
||||
);
|
||||
assert_eq!(active_tab.title(), "Update Settings");
|
||||
assert_eq!(active_tab.url().as_str(), "ely://settings/updates");
|
||||
assert_eq!(active_tab.title(), "Sync Settings");
|
||||
assert_eq!(active_tab.url().as_str(), "ely://settings/sync");
|
||||
assert_eq!(core.snapshot()?.command_query, "");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user