Rebrand to Galaxy, major improvements to Bedrock support, still needs some TLC though
This commit is contained in:
@@ -6,7 +6,7 @@ use std::{
|
||||
};
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use warpui::{App, SingletonEntity};
|
||||
use galaxyui::{App, SingletonEntity};
|
||||
|
||||
use crate::{
|
||||
auth::auth_state::AuthState,
|
||||
@@ -31,7 +31,7 @@ use crate::{
|
||||
Assets,
|
||||
};
|
||||
|
||||
use warp_core::{
|
||||
use galaxy_core::{
|
||||
settings::{
|
||||
macros::define_settings_group, RespectUserSyncSetting, Setting, SupportedPlatforms,
|
||||
SyncToCloud,
|
||||
@@ -313,7 +313,7 @@ fn test_sync_local_pref_to_cloud_after_initial_sync_creates_prefs_setting() {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// Wait for the syncer to create the preferences and privacy settings.
|
||||
await_spawned_futures(
|
||||
@@ -419,7 +419,7 @@ fn test_sync_local_pref_to_cloud_after_initial_sync() {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
app.update(|ctx| {
|
||||
// And then update all settings forcing the create requests
|
||||
@@ -533,7 +533,7 @@ fn run_initial_sync_test(is_onboarded: bool) {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
let expected_num_spawned_futures = if !is_onboarded { 4 } else { 3 };
|
||||
await_spawned_futures(
|
||||
@@ -553,7 +553,7 @@ fn run_initial_sync_test(is_onboarded: bool) {
|
||||
});
|
||||
});
|
||||
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
assert_eq!(
|
||||
is_onboarded,
|
||||
@@ -645,7 +645,7 @@ fn test_sync_local_pref_to_cloud_updates_existing_pref() {
|
||||
});
|
||||
|
||||
// Give the initial load time to complete
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// complete the create request for the cloud settings and the telemetry/crash reporting settings
|
||||
await_spawned_futures(
|
||||
@@ -667,7 +667,7 @@ fn test_sync_local_pref_to_cloud_updates_existing_pref() {
|
||||
});
|
||||
|
||||
// Give the update time to spawn futures
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
assert_num_spawned_futures(&mut app, 4, "expect the syncer to send an update request");
|
||||
spawned_sync_queue_future_at_index(&mut app, 3).await;
|
||||
@@ -737,7 +737,7 @@ fn test_sync_cloud_pref_to_local_on_initial_load_or_collab_update() {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// complete the create request for the cloud settings and the telemetry/crash reporting settings
|
||||
await_spawned_futures(
|
||||
@@ -896,7 +896,7 @@ fn test_cloud_preferences_setting_initial_load_skipped_when_setting_is_off() {
|
||||
enable_settings_sync(&mut app);
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// complete the create request for the cloud settings and the telemetry/crash reporting settings
|
||||
await_spawned_futures(
|
||||
@@ -961,7 +961,7 @@ fn test_sync_local_pref_to_cloud_doesnt_update_equal_pref() {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// Complete the create request for cloud prefs syncing
|
||||
await_spawned_futures(
|
||||
@@ -1049,7 +1049,7 @@ fn test_cloud_preferences_setting_enabling_setting_syncs_prefs() {
|
||||
});
|
||||
|
||||
// Spend time waiting for the initial load to finish etc.
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
await_spawned_futures(
|
||||
&mut app,
|
||||
@@ -1121,7 +1121,7 @@ fn test_cloud_pref_not_synced_when_current_value_not_syncable() {
|
||||
});
|
||||
|
||||
// Run any spawned futures
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
await_spawned_futures(&mut app, 3, "initial load").await;
|
||||
|
||||
// Verify that the local value remains false and wasn't synced from cloud's true
|
||||
@@ -1200,7 +1200,7 @@ fn test_ensure_no_duplicate_cloud_prefs() {
|
||||
});
|
||||
|
||||
// Give time for the initial load and deduplication to complete
|
||||
warpui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_secs(1)).await;
|
||||
|
||||
// Wait for the initial creation of cloud settings and telemetry settings
|
||||
await_spawned_futures(
|
||||
@@ -1258,7 +1258,7 @@ async fn drain_sync_queue(app: &mut App) {
|
||||
// one can cause others to be spawned (e.g. an update in response
|
||||
// to a cloud change).
|
||||
for _ in 0..5 {
|
||||
warpui::r#async::Timer::after(Duration::from_millis(200)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_millis(200)).await;
|
||||
let num = SyncQueue::handle(app).read(app, |sq, _| sq.spawned_futures().len());
|
||||
if num == 0 {
|
||||
return;
|
||||
@@ -1274,7 +1274,7 @@ async fn drain_sync_queue(app: &mut App) {
|
||||
/// syncer will compare against.
|
||||
fn write_settings_file_with_content(path: &std::path::Path, content: &str) -> String {
|
||||
std::fs::write(path, content).expect("write temp settings file");
|
||||
warpui_extras::user_preferences::toml_backed::TomlBackedUserPreferences::file_content_hash(path)
|
||||
galaxyui_extras::user_preferences::toml_backed::TomlBackedUserPreferences::file_content_hash(path)
|
||||
.expect("hash should be Some for non-empty file")
|
||||
}
|
||||
|
||||
@@ -1696,7 +1696,7 @@ fn test_offline_ui_change_does_not_update_hash_until_sync_succeeds() {
|
||||
|
||||
// Give the syncer a moment to finish handling the setting
|
||||
// change event.
|
||||
warpui::r#async::Timer::after(Duration::from_millis(200)).await;
|
||||
galaxyui::r#async::Timer::after(Duration::from_millis(200)).await;
|
||||
|
||||
// CRITICAL ASSERTION: the stored hash must NOT have been
|
||||
// updated. The upload is enqueued but the SyncQueue is
|
||||
|
||||
Reference in New Issue
Block a user