first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
@@ -1,37 +1,29 @@
use galaxy::{
features::FeatureFlag,
integration_testing::{
self,
notebook::{
assert_cloud_preference_exists, assert_notebook_contents,
assert_notebook_metadata_revision,
},
step::{new_step_with_default_assertions, new_step_with_default_assertions_for_pane},
tab::assert_pane_title,
terminal::wait_until_bootstrapped_single_pane_for_tab,
view_getters::single_terminal_view_for_tab,
workflow::assert_workflow_metadata_revision,
},
settings::Preference,
settings_view::{SettingsSection, SettingsView},
sqlite_testing::set_user_and_hostname_for_blocks,
terminal::{
model::{session::get_local_hostname, terminal_model::BlockIndex},
shell::ShellType,
History, ShellHost, TerminalView,
},
workspace::Workspace,
};
use galaxyui::{
async_assert_eq,
integration::{AssertionOutcome, TestStep},
SingletonEntity, ViewHandle,
};
use settings::{RespectUserSyncSetting, SyncToCloud};
use crate::util::{get_local_user, tab_title_in_home_dir};
use warp::features::FeatureFlag;
use warp::integration_testing::notebook::{
assert_cloud_preference_exists, assert_notebook_contents, assert_notebook_metadata_revision,
};
use warp::integration_testing::step::{
new_step_with_default_assertions, new_step_with_default_assertions_for_pane,
};
use warp::integration_testing::tab::assert_pane_title;
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
use warp::integration_testing::view_getters::single_terminal_view_for_tab;
use warp::integration_testing::workflow::assert_workflow_metadata_revision;
use warp::integration_testing::{self};
use warp::settings::Preference;
use warp::settings_view::{SettingsSection, SettingsView};
use warp::sqlite_testing::set_user_and_hostname_for_blocks;
use warp::terminal::model::session::get_local_hostname;
use warp::terminal::model::terminal_model::BlockIndex;
use warp::terminal::shell::ShellType;
use warp::terminal::{History, ShellHost, TerminalView};
use warp::workspace::Workspace;
use galaxyui_core::integration::{AssertionOutcome, TestStep};
use galaxyui_core::{async_assert_eq, SingletonEntity, ViewHandle};
use super::{new_builder, Builder, TEST_ONLY_ASSETS};
use crate::util::{get_local_user, tab_title_in_home_dir};
pub fn test_session_restoration() -> Builder {
new_builder()
@@ -40,7 +32,9 @@ pub fn test_session_restoration() -> Builder {
TEST_ONLY_ASSETS,
// Three tabs is a snapshot with three tabs that have the cwd None.
"three_tabs.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
@@ -94,7 +88,9 @@ pub fn test_restored_blocks_on_different_hosts() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_blocks.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
let local_user = get_local_user();
@@ -189,7 +185,9 @@ pub fn test_restore_snapshot_with_deleted_cwd() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"deleted_cwd.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
@@ -220,7 +218,7 @@ pub fn test_restore_snapshot_with_deleted_cwd() -> Builder {
// Note: this test is brittle b/c it depends on sqlite having accurate paths to
// the bash and zsh executables in the test runner. If we have a mechanism for it,
// it would be nice to be able to modify the sqlite template to incldue the proper
// it would be nice to be able to modify the sqlite template to include the proper
// paths, rather than having to hardcode them in advance.
pub fn test_session_restoration_with_multiple_shells() -> Builder {
FeatureFlag::ShellSelector.set_enabled(true);
@@ -229,7 +227,9 @@ pub fn test_session_restoration_with_multiple_shells() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"test_restoring_tabs_with_different_shells.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
@@ -275,7 +275,9 @@ pub fn test_restore_snapshot_with_background_output() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_background_blocks.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
@@ -339,7 +341,9 @@ pub fn test_restore_snapshot_with_notebooks() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_notebooks.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(
@@ -371,7 +375,9 @@ pub fn test_restore_snapshot_with_workflows() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_workflows.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
)
})
.with_step(
@@ -390,7 +396,9 @@ pub fn test_restore_snapshot_with_test_json_object() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"test_json_object.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(
@@ -420,7 +428,9 @@ pub fn test_restore_snapshot_with_common_shareable_metadata_ids() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"test_duplicate_shareable_ids.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(TestStep::new("Verify revision of workflow").add_assertion(
@@ -445,7 +455,9 @@ pub fn test_restore_snapshot_with_markdown_file() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"file_notebook.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
@@ -485,7 +497,9 @@ pub fn test_restore_snapshot_with_code_file() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_code.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
@@ -522,7 +536,9 @@ pub fn test_restore_snapshot_with_settings_page() -> Builder {
integration_testing::create_file_from_assets(
TEST_ONLY_ASSETS,
"restored_settings.sqlite",
&integration_testing::persistence::database_file_path(),
&integration_testing::persistence::database_file_path_for_scope(
&integration_testing::persistence::PersistenceScope::App,
),
);
})
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))