first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,32 +1,34 @@
|
||||
//! Integration tests for text selection and copying functionality in AI blocks.
|
||||
//! This module tests AI blocks with markdown **enabled**.
|
||||
//! There are no tests with markdown disabled because Agent Mode Markdown has been fully rolled out.
|
||||
use std::{collections::HashMap, path::PathBuf, time::Duration};
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use super::new_builder;
|
||||
use crate::{util::skip_if_powershell_core_2303, Builder};
|
||||
use galaxy::{
|
||||
cmd_or_ctrl_shift,
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
clipboard::assert_clipboard_contains_string,
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_view_has_text_selection, clear_blocklist_to_remove_bootstrapped_blocks,
|
||||
execute_echo_str, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::single_terminal_view_for_tab,
|
||||
},
|
||||
settings::SelectionSettings,
|
||||
};
|
||||
use galaxyui::{async_assert, integration::TestStep, text::SelectionType, Event, SingletonEntity};
|
||||
use lazy_static::lazy_static;
|
||||
use pathfinder_geometry::vector::{vec2f, Vector2F};
|
||||
use settings::ToggleableSetting;
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::clipboard::assert_clipboard_contains_string;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_view_has_text_selection, clear_blocklist_to_remove_bootstrapped_blocks,
|
||||
execute_echo_str, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::single_terminal_view_for_tab;
|
||||
use warp::settings::SelectionSettings;
|
||||
use warp_multi_agent_api as api;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::text::SelectionType;
|
||||
use galaxyui_core::{async_assert, Event, SingletonEntity};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
use crate::Builder;
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(target_os = "linux")] {
|
||||
if #[cfg(any(target_os = "linux", target_os = "freebsd"))] {
|
||||
lazy_static! {
|
||||
/// Position directly to the left of the first user query.
|
||||
static ref START_OF_FIRST_BLOCK_POSITION: Vector2F = vec2f(17.0, 239.0);
|
||||
@@ -134,6 +136,7 @@ fn restored_user_query_message(task_id: &str, request_id: &str, directory: &str)
|
||||
})),
|
||||
request_id: request_id.to_string(),
|
||||
timestamp: None,
|
||||
fetched_memories: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +162,7 @@ fn restored_agent_output_message(task_id: &str, request_id: &str) -> api::Messag
|
||||
)),
|
||||
request_id: request_id.to_string(),
|
||||
timestamp: None,
|
||||
fetched_memories: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +326,51 @@ T This is a dummy title
|
||||
builder
|
||||
}
|
||||
|
||||
/// Text we mark as selected within the AI block for the copy regression test.
|
||||
const AI_BLOCK_SELECTED_TEXT: &str = "agent mode and this is my dummy output";
|
||||
|
||||
/// Regression test for copying a selection that lives *entirely within* an AI
|
||||
/// block (select text in an AI response, then copy). This is the case broken by
|
||||
/// #12079's `mouse_down` `if !handled` guard: the AI block's `SelectableArea`
|
||||
/// consumes the mouse-down, so the terminal model selection is never started and
|
||||
/// `selection_to_string` returns nothing on copy.
|
||||
///
|
||||
/// Unlike the `*_through_ai_*` tests, the selection here does NOT start in a
|
||||
/// command block, so there is no point-based model selection to fall back on —
|
||||
/// it exercises the AI-block-only path that the fix repairs.
|
||||
///
|
||||
/// We simulate the in-AI selection the same way the `SelectableArea` does for a
|
||||
/// pure in-block drag (write the block-level selected text and notify the
|
||||
/// terminal view), rather than relying on layout-sensitive pixel coordinates
|
||||
/// (which is why the `*_through_ai_*` tests are currently ignored).
|
||||
pub fn test_copy_selection_within_ai_block() -> Builder {
|
||||
builder_with_setup()
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Select text within the AI block").with_action(
|
||||
|app, _, _| {
|
||||
let window_id = app.window_ids()[0];
|
||||
let terminal_view = single_terminal_view_for_tab(app, window_id, 0);
|
||||
let ai_block = terminal_view
|
||||
.read(app, |view, _| view.last_ai_block())
|
||||
.expect("AI block exists");
|
||||
ai_block.update(app, |block, ctx| {
|
||||
block.simulate_text_selection_for_test(
|
||||
Some(AI_BLOCK_SELECTED_TEXT.to_owned()),
|
||||
ctx,
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Copy the in-AI-block selection")
|
||||
.with_keystrokes(&[cmd_or_ctrl_shift("c")])
|
||||
.add_assertion(assert_clipboard_contains_string(
|
||||
AI_BLOCK_SELECTED_TEXT.to_owned(),
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_selection_first_to_last_through_ai_simple() -> Builder {
|
||||
select_first_to_last_through_ai_simple(false)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
use crate::Builder;
|
||||
use galaxy::integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_selected_block_index_is_last_renderable, execute_command_for_single_terminal_in_tab,
|
||||
util::ExpectedExitStatus, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::ai_assistant_panel_view,
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_selected_block_index_is_last_renderable, execute_command_for_single_terminal_in_tab,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui::async_assert;
|
||||
use warp::integration_testing::view_getters::ai_assistant_panel_view;
|
||||
use galaxyui_core::async_assert;
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
/// Checks if the Ask Warp AI keybinding works correctly when a block is selected.
|
||||
/// This is a regression test: https://linear.app/warpdotdev/issue/WAR-6758/warp-ai-ask-from-block-keybinding-doesnt-work-as-expected.
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use warp::integration_testing::ai_document::{
|
||||
ai_document_overflow_button_position_id, assert_ai_document_overflow_button_position_exists,
|
||||
create_and_open_ai_document,
|
||||
};
|
||||
use warp::integration_testing::clipboard::assert_clipboard_contains_string;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
const PLAN_MARKDOWN: &str = "# Migration Plan\n\n## Steps\n\n1. Audit the call sites\n - Inventory each module\n - Note breaking changes\n2. Land the refactor\n3. Verify with `cargo test`\n\n```rust path=null start=null\nfn migrate() {\n println!(\"done\");\n}\n```";
|
||||
|
||||
const EXPECTED_CLIPBOARD: &str = "# Migration Plan\n\n## Steps\n\n1. Audit the call sites\n * Inventory each module\n * Note breaking changes\n2. Land the refactor\n3. Verify with `cargo test`\n\n```rust\nfn migrate() {\n println!(\"done\");\n}\n```\n";
|
||||
|
||||
pub fn test_copy_ai_document_as_markdown_from_overflow_menu() -> Builder {
|
||||
new_builder()
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(create_and_open_ai_document("Migration Plan", PLAN_MARKDOWN))
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Wait for AI document overflow menu button")
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.add_assertion(assert_ai_document_overflow_button_position_exists()),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Open AI document overflow menu")
|
||||
.with_click_on_saved_position_fn(ai_document_overflow_button_position_id),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Copy AI document as Markdown")
|
||||
.with_click_on_saved_position("Copy as Markdown")
|
||||
.add_assertion(assert_clipboard_contains_string(
|
||||
EXPECTED_CLIPBOARD.to_string(),
|
||||
)),
|
||||
)
|
||||
}
|
||||
@@ -1,38 +1,31 @@
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_context_menu_is_open, initialize_secret_regexes,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::single_terminal_view_for_tab;
|
||||
use warp::settings_view::{PrivacyPageAction, SettingsAction};
|
||||
use warp::terminal::model::index::Point;
|
||||
use warp::terminal::model::terminal_model::{BlockIndex, WithinBlock, WithinModel};
|
||||
use warp::terminal::shell::ShellType;
|
||||
use warp::terminal::GridType;
|
||||
use galaxyui_core::{async_assert, async_assert_eq};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::test::integration_testing::block_filtering::{
|
||||
open_block_filter_editor, open_block_filter_editor_for_long_running_command,
|
||||
open_block_filter_editor_via_keybinding,
|
||||
open_block_filter_editor_via_keybinding_long_running_command,
|
||||
};
|
||||
use crate::test::integration_testing::block_filtering::{
|
||||
LongRunningCommandTestCase, SecretTestCase, SimpleTestCase,
|
||||
open_block_filter_editor_via_keybinding_long_running_command, LongRunningCommandTestCase,
|
||||
SecretTestCase, SimpleTestCase,
|
||||
};
|
||||
use crate::test::integration_testing::secret_redaction::assert_secret_tooltip_open;
|
||||
use crate::test::integration_testing::terminal::{
|
||||
clear_blocklist_to_remove_bootstrapped_blocks, hover_over_block_zero,
|
||||
};
|
||||
use crate::test::new_step_with_default_assertions;
|
||||
use crate::test::toggle_setting;
|
||||
use crate::test::TestStep;
|
||||
use galaxy::cmd_or_ctrl_shift;
|
||||
use galaxy::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use galaxy::integration_testing::terminal::{
|
||||
assert_context_menu_is_open, initialize_secret_regexes,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxy::integration_testing::view_getters::single_terminal_view_for_tab;
|
||||
|
||||
use galaxy::settings_view::PrivacyPageAction;
|
||||
use galaxy::settings_view::SettingsAction;
|
||||
use galaxy::terminal::model::index::Point;
|
||||
use galaxy::terminal::model::terminal_model::{BlockIndex, WithinBlock, WithinModel};
|
||||
use galaxy::terminal::shell::ShellType;
|
||||
use galaxy::terminal::GridType;
|
||||
use galaxyui::{async_assert, async_assert_eq};
|
||||
|
||||
use crate::test::{new_step_with_default_assertions, toggle_setting, TestStep};
|
||||
use crate::Builder;
|
||||
|
||||
use super::new_builder;
|
||||
|
||||
// TODO(CORE-2721): Block count / index Failed b/c of in-band generators
|
||||
pub fn test_block_filtering_keybinding() -> Builder {
|
||||
new_builder()
|
||||
|
||||
@@ -1,36 +1,33 @@
|
||||
//! Integration tests for bootstrapping logic.
|
||||
|
||||
use galaxy::{
|
||||
cmd_or_ctrl_shift,
|
||||
integration_testing::{
|
||||
input::{
|
||||
input_contains_string, input_editor_is_focused, input_editor_is_not_focused,
|
||||
input_is_empty,
|
||||
},
|
||||
step::new_step_with_default_assertions,
|
||||
tab::tab_title_step,
|
||||
terminal::{
|
||||
assert_active_block_command_for_single_terminal_in_tab,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
execute_command_for_single_terminal_in_tab,
|
||||
util::{current_shell_starter_and_version, ExpectedExitStatus},
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::{single_input_view_for_tab, single_terminal_view_for_tab},
|
||||
},
|
||||
terminal::session_settings::HonorPS1,
|
||||
terminal::shell::{self, ShellType},
|
||||
workspace::Workspace,
|
||||
};
|
||||
use galaxyui::{
|
||||
async_assert, async_assert_eq, clipboard::ClipboardContent, integration::TestStep, ViewHandle,
|
||||
};
|
||||
use settings::Setting as _;
|
||||
use version_compare::Cmp;
|
||||
|
||||
use crate::util::{write_all_rc_files_for_test, write_rc_files_for_test, ShellRcType};
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::integration_testing::input::{
|
||||
input_contains_string, input_editor_is_focused, input_editor_is_not_focused, input_is_empty,
|
||||
};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::tab::tab_title_step;
|
||||
use warp::integration_testing::terminal::util::{
|
||||
current_shell_starter_and_version, ExpectedExitStatus,
|
||||
};
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_active_block_command_for_single_terminal_in_tab,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
execute_command_for_single_terminal_in_tab, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::{
|
||||
single_input_view_for_tab, single_terminal_view_for_tab,
|
||||
};
|
||||
use warp::terminal::session_settings::HonorPS1;
|
||||
use warp::terminal::shell::{self, ShellType};
|
||||
use warp::workspace::Workspace;
|
||||
use galaxyui_core::clipboard::ClipboardContent;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert, async_assert_eq, ViewHandle};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::{write_all_rc_files_for_test, write_rc_files_for_test, ShellRcType};
|
||||
|
||||
/// Ensures that config files are only sourced once when bootstrapping a new session.
|
||||
pub fn test_rc_files_only_sourced_once_during_bootstrapping() -> Builder {
|
||||
@@ -91,7 +88,7 @@ pub fn test_paste_and_type_characters_before_bootstrap() -> Builder {
|
||||
// On Ubuntu (and possibly other Linux distros), a message is
|
||||
// printed out during shell initialization telling the user how to
|
||||
// use `sudo`. This interferes with our expected pty contents, so suppress the message.
|
||||
if cfg!(target_os = "linux") {
|
||||
if cfg!(any(target_os = "linux", target_os = "freebsd")) {
|
||||
std::fs::File::create(dir.join(".sudo_as_admin_successful"))
|
||||
.expect("should not fail to create file in home directory");
|
||||
}
|
||||
|
||||
@@ -1,34 +1,24 @@
|
||||
use std::{
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
time::Duration,
|
||||
};
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Duration;
|
||||
|
||||
use command::blocking::Command;
|
||||
|
||||
use galaxy::features::FeatureFlag;
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
code_review::{
|
||||
assert_code_review_anchor, assert_code_review_line_text, assert_code_review_loaded,
|
||||
assert_code_review_scroll_region, scroll_code_review_to_deleted_range,
|
||||
scroll_code_review_to_footer, scroll_code_review_to_header, scroll_code_review_to_line,
|
||||
ScrollRegion,
|
||||
},
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
view_getters::{single_terminal_view_for_tab, workspace_view},
|
||||
},
|
||||
workspace::WorkspaceAction,
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::code_review::{
|
||||
assert_code_review_anchor, assert_code_review_line_text, assert_code_review_loaded,
|
||||
assert_code_review_scroll_region, scroll_code_review_to_deleted_range,
|
||||
scroll_code_review_to_footer, scroll_code_review_to_header, scroll_code_review_to_line,
|
||||
ScrollRegion,
|
||||
};
|
||||
use galaxyui::{
|
||||
async_assert,
|
||||
integration::{AssertionCallback, TestStep},
|
||||
App, WindowId,
|
||||
};
|
||||
|
||||
use crate::{util::write_all_rc_files_for_test, Builder};
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::integration_testing::view_getters::{single_terminal_view_for_tab, workspace_view};
|
||||
use warp::workspace::WorkspaceAction;
|
||||
use galaxyui_core::integration::{AssertionCallback, TestStep};
|
||||
use galaxyui_core::{async_assert, App, WindowId};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::util::write_all_rc_files_for_test;
|
||||
use crate::Builder;
|
||||
|
||||
const TEST_FILE_NAME: &str = "scroll_target.txt";
|
||||
const TARGET_LINE_NUMBER: usize = 70;
|
||||
@@ -112,11 +102,11 @@ fn assert_repo_detected() -> AssertionCallback {
|
||||
}
|
||||
|
||||
fn scroll_code_review_to_target_line() -> TestStep {
|
||||
scroll_code_review_to_line(PathBuf::from(TEST_FILE_NAME), TARGET_LINE_NUMBER)
|
||||
scroll_code_review_to_line(TEST_FILE_NAME, TARGET_LINE_NUMBER)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_anchor(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
TEST_FILE_NAME,
|
||||
modified_line_text(TARGET_LINE_NUMBER),
|
||||
Some(TARGET_LINE_NUMBER),
|
||||
))
|
||||
@@ -195,7 +185,7 @@ fn code_review_scroll_anchor_builder(
|
||||
TestStep::new("Wait for code review to reflect the inserted lines")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_line_text(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
TEST_FILE_NAME,
|
||||
insertion_line_number,
|
||||
inserted_line_text,
|
||||
)),
|
||||
@@ -204,7 +194,7 @@ fn code_review_scroll_anchor_builder(
|
||||
TestStep::new("Wait for code review to preserve the visible anchor text")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_anchor(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
TEST_FILE_NAME,
|
||||
modified_line_text(TARGET_LINE_NUMBER),
|
||||
None,
|
||||
)),
|
||||
@@ -349,21 +339,18 @@ pub fn test_code_review_scroll_preserved_deleted_range() -> Builder {
|
||||
.add_assertion(assert_code_review_loaded()),
|
||||
)
|
||||
.with_step(
|
||||
scroll_code_review_to_deleted_range(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
DELETED_RANGE_NEAR_LINE,
|
||||
)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_scroll_region(ScrollRegion::RemovedLine))
|
||||
.set_post_step_pause(Duration::from_millis(250)),
|
||||
scroll_code_review_to_deleted_range(TEST_FILE_NAME, DELETED_RANGE_NEAR_LINE)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_scroll_region(ScrollRegion::RemovedLine))
|
||||
.set_post_step_pause(Duration::from_millis(250)),
|
||||
)
|
||||
.with_step(mutate_test_file(INSERT_ABOVE_LINE_NUMBER, "above"))
|
||||
.with_step(
|
||||
TestStep::new("Wait for code review to reflect the inserted lines")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_line_text(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
TEST_FILE_NAME,
|
||||
INSERT_ABOVE_LINE_NUMBER,
|
||||
inserted_line_text,
|
||||
))
|
||||
@@ -431,7 +418,7 @@ pub fn test_code_review_scroll_preserved_header_range() -> Builder {
|
||||
.add_assertion(assert_code_review_loaded()),
|
||||
)
|
||||
.with_step(
|
||||
scroll_code_review_to_header(PathBuf::from(TEST_FILE_NAME))
|
||||
scroll_code_review_to_header(TEST_FILE_NAME)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_scroll_region(ScrollRegion::Header))
|
||||
@@ -442,7 +429,7 @@ pub fn test_code_review_scroll_preserved_header_range() -> Builder {
|
||||
TestStep::new("Wait for code review to reflect the inserted lines")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_line_text(
|
||||
PathBuf::from(TEST_FILE_NAME),
|
||||
TEST_FILE_NAME,
|
||||
INSERT_ABOVE_LINE_NUMBER,
|
||||
inserted_line_text,
|
||||
)),
|
||||
@@ -532,7 +519,7 @@ pub fn test_code_review_scroll_preserved_footer_range() -> Builder {
|
||||
.add_assertion(assert_code_review_loaded()),
|
||||
)
|
||||
.with_step(
|
||||
scroll_code_review_to_footer(PathBuf::from(FIRST_FILE_NAME))
|
||||
scroll_code_review_to_footer(FIRST_FILE_NAME)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_scroll_region(ScrollRegion::Footer))
|
||||
@@ -547,7 +534,7 @@ pub fn test_code_review_scroll_preserved_footer_range() -> Builder {
|
||||
TestStep::new("Wait for code review to reflect the inserted lines")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_line_text(
|
||||
PathBuf::from(FIRST_FILE_NAME),
|
||||
FIRST_FILE_NAME,
|
||||
MULTI_FILE_INSERT_LINE,
|
||||
inserted_line_text,
|
||||
)),
|
||||
@@ -628,11 +615,11 @@ pub fn test_code_review_scroll_preserved_second_file() -> Builder {
|
||||
)
|
||||
// Scroll to a target line in the SECOND file (index 1)
|
||||
.with_step(
|
||||
scroll_code_review_to_line(PathBuf::from(SECOND_FILE_NAME), MULTI_FILE_TARGET_LINE)
|
||||
scroll_code_review_to_line(SECOND_FILE_NAME, MULTI_FILE_TARGET_LINE)
|
||||
.set_timeout(Duration::from_secs(10))
|
||||
.set_retries(2)
|
||||
.add_assertion(assert_code_review_anchor(
|
||||
PathBuf::from(SECOND_FILE_NAME),
|
||||
SECOND_FILE_NAME,
|
||||
multi_file_modified_line("second", MULTI_FILE_TARGET_LINE),
|
||||
Some(MULTI_FILE_TARGET_LINE),
|
||||
))
|
||||
@@ -648,7 +635,7 @@ pub fn test_code_review_scroll_preserved_second_file() -> Builder {
|
||||
TestStep::new("Wait for code review to reflect the inserted lines in second file")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_line_text(
|
||||
PathBuf::from(SECOND_FILE_NAME),
|
||||
SECOND_FILE_NAME,
|
||||
MULTI_FILE_INSERT_LINE,
|
||||
inserted_line_text,
|
||||
)),
|
||||
@@ -657,7 +644,7 @@ pub fn test_code_review_scroll_preserved_second_file() -> Builder {
|
||||
TestStep::new("Wait for code review to preserve the visible anchor in second file")
|
||||
.set_timeout(Duration::from_secs(20))
|
||||
.add_assertion(assert_code_review_anchor(
|
||||
PathBuf::from(SECOND_FILE_NAME),
|
||||
SECOND_FILE_NAME,
|
||||
multi_file_modified_line("second", MULTI_FILE_TARGET_LINE),
|
||||
None,
|
||||
)),
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
//! Integration tests for CTRL-D / EOT behaviour.
|
||||
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_active_block_command_for_single_terminal_in_tab, assert_bootstrapping_stage,
|
||||
assert_no_block_executing, assert_terminal_bootstrapped,
|
||||
execute_python_interpreter_in_tab, util::current_shell_starter_and_version,
|
||||
wait_until_bootstrapped_single_pane_for_tab, PYTHON_PROMPT_READY,
|
||||
},
|
||||
view_getters::assert_no_views_of_type,
|
||||
},
|
||||
pane_group::PaneGroup,
|
||||
terminal::{model::bootstrap::BootstrapStage, shell::ShellType, TerminalView},
|
||||
workspace::Workspace,
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_active_block_command_for_single_terminal_in_tab, assert_bootstrapping_stage,
|
||||
assert_no_block_executing, assert_terminal_bootstrapped, execute_python_interpreter_in_tab,
|
||||
wait_until_bootstrapped_single_pane_for_tab, PYTHON_PROMPT_READY,
|
||||
};
|
||||
use galaxyui::integration::TestStep;
|
||||
use warp::integration_testing::view_getters::assert_no_views_of_type;
|
||||
use warp::pane_group::PaneGroup;
|
||||
use warp::terminal::model::bootstrap::BootstrapStage;
|
||||
use warp::terminal::shell::ShellType;
|
||||
use warp::terminal::TerminalView;
|
||||
use warp::workspace::Workspace;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::write_all_rc_files_for_test;
|
||||
@@ -101,7 +99,7 @@ pub fn test_ctrl_d_during_bootstrapping_exits_shell_upon_completion() -> Builder
|
||||
// is to exit upon completion.
|
||||
// However, this differs on Linux where the common behaviour is to
|
||||
// ignore ctrl-d (and the corresponding EOF) while bootstrapping.
|
||||
let final_assertion = if cfg!(target_os = "linux") {
|
||||
let final_assertion = if cfg!(any(target_os = "linux", target_os = "freebsd")) {
|
||||
assert_terminal_bootstrapped(0, 0)
|
||||
} else {
|
||||
// TODO: figure out what the right behaviour is on windows.
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
use super::{new_builder, Builder};
|
||||
use regex::Regex;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
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::{pane_group_view, workspace_view};
|
||||
use warp::workspace::WorkspaceAction;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert, async_assert_eq, App};
|
||||
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
tab::assert_pane_title,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
view_getters::{pane_group_view, workspace_view},
|
||||
},
|
||||
workspace::WorkspaceAction,
|
||||
};
|
||||
use galaxyui::{async_assert, async_assert_eq, integration::TestStep, App};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::write_all_rc_files_for_test;
|
||||
|
||||
fn open_file_tree_panel(app: &mut App) {
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
use super::{new_builder, Builder};
|
||||
use regex::Regex;
|
||||
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
goto_line::{
|
||||
assert_cursor_at_line, assert_cursor_at_line_and_column,
|
||||
assert_goto_line_dialog_is_open, goto_line_confirm, open_goto_line_dialog,
|
||||
},
|
||||
step::new_step_with_default_assertions,
|
||||
tab::assert_pane_title,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
view_getters::{pane_group_view, workspace_view},
|
||||
},
|
||||
workspace::WorkspaceAction,
|
||||
use warp::integration_testing::goto_line::{
|
||||
assert_code_editor_line_numbers, assert_cursor_at_line, assert_cursor_at_line_and_column,
|
||||
assert_goto_line_dialog_is_open, goto_line_confirm, open_goto_line_dialog,
|
||||
set_code_editor_line_number_mode,
|
||||
};
|
||||
use galaxyui::{async_assert_eq, App};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
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::{pane_group_view, workspace_view};
|
||||
use warp::settings::CodeEditorLineNumberMode;
|
||||
use warp::workspace::WorkspaceAction;
|
||||
use galaxyui_core::{async_assert_eq, App};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::write_all_rc_files_for_test;
|
||||
|
||||
fn open_file_tree_panel(app: &mut App) {
|
||||
@@ -140,3 +137,46 @@ pub fn test_goto_line_clamps_out_of_range() -> Builder {
|
||||
.add_assertion(assert_cursor_at_line(20)),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_code_editor_line_numbers_default_to_absolute() -> Builder {
|
||||
file_open_steps(new_builder()).with_step(
|
||||
new_step_with_default_assertions("Verify code editor line numbers are absolute by default")
|
||||
.add_assertion(assert_code_editor_line_numbers(vec![
|
||||
(1, 1),
|
||||
(10, 10),
|
||||
(20, 20),
|
||||
])),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_code_editor_relative_line_numbers_follow_cursor() -> Builder {
|
||||
file_open_steps(new_builder())
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Enable relative line numbers and move to line 10")
|
||||
.with_action(|app, window_id, _| {
|
||||
set_code_editor_line_number_mode(app, CodeEditorLineNumberMode::Relative);
|
||||
goto_line_confirm(app, window_id, "10");
|
||||
})
|
||||
.add_assertion(assert_goto_line_dialog_is_open(false))
|
||||
.add_assertion(assert_cursor_at_line(10))
|
||||
.add_assertion(assert_code_editor_line_numbers(vec![
|
||||
(5, 5),
|
||||
(9, 1),
|
||||
(10, 10),
|
||||
(11, 1),
|
||||
(20, 10),
|
||||
])),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Verify relative line numbers update on cursor move")
|
||||
.with_action(|app, window_id, _| goto_line_confirm(app, window_id, "12"))
|
||||
.add_assertion(assert_cursor_at_line(12))
|
||||
.add_assertion(assert_code_editor_line_numbers(vec![
|
||||
(5, 7),
|
||||
(10, 2),
|
||||
(12, 12),
|
||||
(13, 1),
|
||||
(20, 8),
|
||||
])),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::Builder;
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
self,
|
||||
command_search::{assert_command_search_is_open, assert_history_filter_is_active},
|
||||
input::assert_workflow_info_box_is_open,
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{assert_input_editor_contents, wait_until_bootstrapped_single_pane_for_tab},
|
||||
view_getters::single_input_view,
|
||||
},
|
||||
search::command_search::settings::ShowGlobalWorkflowsInUniversalSearch,
|
||||
sqlite_testing::set_user_and_hostname_for_commands,
|
||||
terminal::{input::Input, model::session::get_local_hostname, shell::ShellType},
|
||||
};
|
||||
use galaxyui::{async_assert, ViewHandle};
|
||||
use settings::Setting as _;
|
||||
|
||||
use crate::util::{get_local_user, write_histfiles_for_test};
|
||||
use warp::integration_testing::command_search::{
|
||||
assert_command_search_has_results, assert_command_search_is_open,
|
||||
assert_history_filter_is_active,
|
||||
};
|
||||
use warp::integration_testing::input::assert_workflow_info_box_is_open;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_input_editor_contents, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::single_input_view;
|
||||
use warp::integration_testing::{self};
|
||||
use warp::search::command_search::settings::ShowGlobalWorkflowsInUniversalSearch;
|
||||
use warp::sqlite_testing::set_user_and_hostname_for_commands;
|
||||
use warp::terminal::input::Input;
|
||||
use warp::terminal::model::session::get_local_hostname;
|
||||
use warp::terminal::shell::ShellType;
|
||||
use galaxyui_core::{async_assert, ViewHandle};
|
||||
|
||||
use super::{new_builder, TEST_ONLY_ASSETS};
|
||||
use crate::util::{get_local_user, write_histfiles_for_test};
|
||||
use crate::Builder;
|
||||
|
||||
/// The `history_with_metadata.sqlite` table looks like the following:
|
||||
///
|
||||
@@ -122,7 +124,9 @@ pub fn test_up_arrow_history_enters_shift_tab_for_workflow() -> Builder {
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
FAKE_HISTORY_SQLITE_FILE,
|
||||
&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();
|
||||
@@ -200,7 +204,9 @@ pub fn test_command_search_loads_history() -> Builder {
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
FAKE_HISTORY_SQLITE_FILE,
|
||||
&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();
|
||||
@@ -234,6 +240,12 @@ pub fn test_command_search_loads_history() -> Builder {
|
||||
assert_history_filter_is_active(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Wait for history results").add_named_assertion(
|
||||
"Command search has history results",
|
||||
assert_command_search_has_results(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Loads history from sqlite")
|
||||
.with_keystrokes(&["up", "up", "enter"])
|
||||
@@ -251,7 +263,9 @@ pub fn test_command_search_loads_history_from_nondefault_histfile_path() -> Buil
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
FAKE_HISTORY_SQLITE_FILE,
|
||||
&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();
|
||||
@@ -282,6 +296,12 @@ pub fn test_command_search_loads_history_from_nondefault_histfile_path() -> Buil
|
||||
assert_history_filter_is_active(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Wait for history results").add_named_assertion(
|
||||
"Command search has history results",
|
||||
assert_command_search_has_results(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Loads history from sqlite")
|
||||
.with_keystrokes(&["up", "up", "enter"])
|
||||
@@ -305,7 +325,9 @@ pub fn test_histfile_left_joined_with_persisted_history() -> Builder {
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
FAKE_HISTORY_SQLITE_FILE,
|
||||
&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();
|
||||
@@ -339,6 +361,12 @@ pub fn test_histfile_left_joined_with_persisted_history() -> Builder {
|
||||
assert_history_filter_is_active(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Wait for history results").add_named_assertion(
|
||||
"Command search has history results",
|
||||
assert_command_search_has_results(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Loads history from sqlite")
|
||||
.with_keystrokes(&["up", "enter"])
|
||||
@@ -355,7 +383,9 @@ pub fn test_history_command_is_linked_to_local_workflow() -> Builder {
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
FAKE_HISTORY_SQLITE_FILE,
|
||||
&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();
|
||||
@@ -393,6 +423,12 @@ pub fn test_history_command_is_linked_to_local_workflow() -> Builder {
|
||||
assert_history_filter_is_active(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Wait for history results").add_named_assertion(
|
||||
"Command search has history results",
|
||||
assert_command_search_has_results(),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Loads history from sqlite")
|
||||
.with_keystrokes(&["up", "enter"])
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxy::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use galaxy::terminal::shell::ShellType;
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
clipboard::write_to_clipboard,
|
||||
input::{
|
||||
assert_autosuggestion_state, input_contains_string, input_is_empty,
|
||||
latest_buffer_operations_are_empty, tab_completions_menu_is_open, AutosuggestionState,
|
||||
},
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
execute_command_for_single_terminal_in_tab, util::ExpectedExitStatus,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::{single_input_view_for_tab, single_terminal_view_for_tab},
|
||||
},
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::clipboard::write_to_clipboard;
|
||||
use warp::integration_testing::input::{
|
||||
assert_autosuggestion_state, input_contains_string, input_is_empty,
|
||||
latest_buffer_operations_are_empty, open_inline_model_selector_from_chip,
|
||||
tab_completions_menu_is_open, toggle_inline_model_selector_from_chip, AutosuggestionState,
|
||||
};
|
||||
use galaxyui::{async_assert_eq, integration::TestStep, Event};
|
||||
|
||||
use crate::Builder;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::{
|
||||
current_shell_starter_and_version, ExpectedExitStatus,
|
||||
};
|
||||
use warp::integration_testing::terminal::{
|
||||
execute_command_for_single_terminal_in_tab, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::{
|
||||
single_input_view_for_tab, single_terminal_view_for_tab,
|
||||
};
|
||||
use warp::terminal::shell::ShellType;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert_eq, Event};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
/// Ensures that tab completions are hidden when the completions menu is opened
|
||||
/// but re-appear when the menu is closed.
|
||||
@@ -87,6 +87,103 @@ pub fn test_autosuggestions_are_hidden_when_opening_tab_completions() -> Builder
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_inline_model_selector_restores_prompt_on_dismissal() -> Builder {
|
||||
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
|
||||
|
||||
let original_prompt = "explain this tricky rust lifetime";
|
||||
new_builder()
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type prompt before opening model selector")
|
||||
.with_typed_characters(&[original_prompt])
|
||||
.add_named_assertion(
|
||||
"Prompt is present before opening selector",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(open_inline_model_selector_from_chip())
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type model search")
|
||||
.with_typed_characters(&["claude"])
|
||||
.add_named_assertion(
|
||||
"Model search text is in the input",
|
||||
input_contains_string(0, "claude".to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Dismiss model selector")
|
||||
.with_keystrokes(&["escape"])
|
||||
.add_named_assertion(
|
||||
"Original prompt is restored after dismissal",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_inline_model_selector_restores_prompt_on_model_selection() -> Builder {
|
||||
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
|
||||
|
||||
let original_prompt = "summarize this output without losing details";
|
||||
new_builder()
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type prompt before opening model selector")
|
||||
.with_typed_characters(&[original_prompt])
|
||||
.add_named_assertion(
|
||||
"Prompt is present before opening selector",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(open_inline_model_selector_from_chip())
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type model search")
|
||||
.with_typed_characters(&["auto"])
|
||||
.add_named_assertion(
|
||||
"Model search text is in the input",
|
||||
input_contains_string(0, "auto".to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Select highlighted model")
|
||||
.with_keystrokes(&["enter"])
|
||||
.add_named_assertion(
|
||||
"Original prompt is restored after model selection",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_inline_model_selector_restores_prompt_on_chip_toggle_close() -> Builder {
|
||||
FeatureFlag::RestorePromptOnInlineModelSelectorSearch.set_enabled(true);
|
||||
|
||||
let original_prompt = "refactor this into smaller modules";
|
||||
new_builder()
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type prompt before opening model selector")
|
||||
.with_typed_characters(&[original_prompt])
|
||||
.add_named_assertion(
|
||||
"Prompt is present before opening selector",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(open_inline_model_selector_from_chip())
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Type model search")
|
||||
.with_typed_characters(&["claude"])
|
||||
.add_named_assertion(
|
||||
"Model search text is in the input",
|
||||
input_contains_string(0, "claude".to_owned()),
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
toggle_inline_model_selector_from_chip().add_named_assertion(
|
||||
"Original prompt is restored after toggling closed",
|
||||
input_contains_string(0, original_prompt.to_owned()),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_latest_buffer_operations() -> Builder {
|
||||
new_builder()
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxy::features::FeatureFlag;
|
||||
use galaxy::integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::single_terminal_view_for_tab,
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui::event::{KeyEventDetails, KeyState};
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::keyboard::KeyCode;
|
||||
use galaxyui::{async_assert, integration::TestStep, Event};
|
||||
|
||||
use crate::Builder;
|
||||
use warp::integration_testing::view_getters::single_terminal_view_for_tab;
|
||||
use galaxyui_core::event::{KeyEventDetails, KeyState};
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::keyboard::KeyCode;
|
||||
use galaxyui_core::{async_assert, Event};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
/// Helper: creates a setup closure that writes a Python script asset to the test directory.
|
||||
macro_rules! setup_python_script {
|
||||
@@ -50,7 +48,8 @@ fn wait_for_protocol_enabled() -> TestStep {
|
||||
fn assert_output_contains(
|
||||
expected: &'static str,
|
||||
description: &'static str,
|
||||
) -> impl FnMut(&mut galaxyui::App, galaxyui::WindowId) -> galaxyui::integration::AssertionOutcome {
|
||||
) -> impl FnMut(&mut galaxyui_core::App, galaxyui_core::WindowId) -> galaxyui_core::integration::AssertionOutcome
|
||||
{
|
||||
move |app, window_id| {
|
||||
let terminal_view = single_terminal_view_for_tab(app, window_id, 0);
|
||||
terminal_view.read(app, |view, _ctx| {
|
||||
|
||||
@@ -1,32 +1,26 @@
|
||||
use std::{path::PathBuf, time::Duration};
|
||||
use std::path::PathBuf;
|
||||
use std::time::Duration;
|
||||
|
||||
use galaxyui::{
|
||||
async_assert,
|
||||
integration::{AssertionOutcome, TestStep},
|
||||
ModelHandle,
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::pane_group::assert_focused_pane_index;
|
||||
use warp::integration_testing::settings::set_window_custom_size;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::{
|
||||
validate_block_output, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::type_getters::get_launch_config_ui_location;
|
||||
use warp::integration_testing::window::assert_num_windows_open;
|
||||
use warp::integration_testing::workspace::{assert_focused_tab_index, assert_tab_count};
|
||||
use warp::integration_testing::{self};
|
||||
use warp::search::command_palette::launch_config;
|
||||
use warp::search::data_source::Query;
|
||||
use warp::search::SyncDataSource;
|
||||
use warp::workspace::NEW_TAB_BUTTON_POSITION_ID;
|
||||
use galaxyui_core::integration::{AssertionOutcome, TestStep};
|
||||
use galaxyui_core::{async_assert, ModelHandle};
|
||||
|
||||
use super::{assert_approx_eq, new_builder, TEST_ONLY_ASSETS};
|
||||
use crate::Builder;
|
||||
use galaxy::integration_testing::{
|
||||
pane_group::assert_focused_pane_index,
|
||||
window::assert_num_windows_open,
|
||||
workspace::{assert_focused_tab_index, assert_tab_count},
|
||||
};
|
||||
use galaxy::integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{validate_block_output, wait_until_bootstrapped_single_pane_for_tab},
|
||||
};
|
||||
use galaxy::search::command_palette::launch_config;
|
||||
use galaxy::workspace::NEW_TAB_BUTTON_POSITION_ID;
|
||||
use galaxy::{features::FeatureFlag, integration_testing::settings::set_window_custom_size};
|
||||
use galaxy::{
|
||||
integration_testing::type_getters::get_launch_config_ui_location, search::SyncDataSource,
|
||||
};
|
||||
use galaxy::{
|
||||
integration_testing::{self},
|
||||
search::data_source::Query,
|
||||
};
|
||||
|
||||
/// Adds a launch config to the mocked out warp config directory and verifies that
|
||||
/// the launch config appears in the launch config palette.
|
||||
@@ -167,7 +161,7 @@ pub fn test_launch_config_single_child_branch() -> Builder {
|
||||
use galaxy::launch_configs::launch_config::{
|
||||
LaunchConfig, PaneMode, PaneTemplateType, SplitDirection, TabTemplate, WindowTemplate,
|
||||
};
|
||||
use galaxyui::actions::StandardAction;
|
||||
use galaxyui_core::actions::StandardAction;
|
||||
|
||||
/// Create a launch config that has a branch with a single child
|
||||
fn create_launch_config() -> LaunchConfig {
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
use galaxy::{
|
||||
cmd_or_ctrl_shift,
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
command_palette::open_command_palette_and_run_action,
|
||||
notebook::{
|
||||
assert_notebook_contents, assert_notebook_id, assert_notebook_not_open,
|
||||
assert_notebook_open, assert_notebook_renders_mermaid_diagram,
|
||||
assert_open_in_warp_banner_open, create_a_personal_notebook,
|
||||
enter_notebook_edit_mode_and_set_markdown, move_notebook_cursor_to_offset,
|
||||
open_notebook,
|
||||
},
|
||||
step::new_step_with_default_assertions,
|
||||
tab::{assert_pane_title, assert_tab_title},
|
||||
terminal::{
|
||||
assert_single_terminal_in_tab_bootstrapped, execute_command_for_single_terminal_in_tab,
|
||||
util::ExpectedExitStatus, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::terminal_view,
|
||||
window::{add_and_save_window, close_window, save_active_window_id},
|
||||
},
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::command_palette::open_command_palette_and_run_action;
|
||||
use warp::integration_testing::notebook::{
|
||||
assert_notebook_contents, assert_notebook_id, assert_notebook_not_open, assert_notebook_open,
|
||||
assert_open_in_warp_banner_open, create_a_personal_notebook,
|
||||
enter_notebook_edit_mode_and_set_markdown, move_notebook_cursor_to_offset, open_notebook,
|
||||
};
|
||||
use galaxyui::integration::TestStep;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::tab::{assert_pane_title, assert_tab_title};
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_single_terminal_in_tab_bootstrapped, execute_command_for_single_terminal_in_tab,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::terminal_view;
|
||||
use warp::integration_testing::window::{add_and_save_window, close_window, save_active_window_id};
|
||||
use galaxyui_core::integration::TestStep;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
@@ -177,14 +172,11 @@ pub fn test_open_in_warp_banner() -> Builder {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn test_backspace_inside_rendered_mermaid_block_is_atomic() -> Builder {
|
||||
pub fn test_backspace_inside_raw_mermaid_block_edits_text_without_removing_block() -> Builder {
|
||||
FeatureFlag::MarkdownMermaid.set_enabled(true);
|
||||
FeatureFlag::EditableMarkdownMermaid.set_enabled(true);
|
||||
|
||||
let markdown = "Before\n```mermaid\ngraph TD\nA --> B\n```\nAfter";
|
||||
let mermaid_block_start = markdown
|
||||
.find("```mermaid")
|
||||
.expect("Mermaid block should exist");
|
||||
let cursor_offset = markdown
|
||||
.find("graph TD")
|
||||
.expect("Mermaid source should exist")
|
||||
@@ -203,18 +195,20 @@ pub fn test_backspace_inside_rendered_mermaid_block_is_atomic() -> Builder {
|
||||
),
|
||||
)
|
||||
.with_step(
|
||||
// Mermaid blocks now default to Raw mode; diagram rendering requires
|
||||
// the user to click the Rendered toggle. This step only verifies the
|
||||
// markdown content was set correctly.
|
||||
enter_notebook_edit_mode_and_set_markdown(0, 0, markdown)
|
||||
.add_assertion(assert_notebook_contents(0, 0, markdown))
|
||||
.add_assertion(assert_notebook_renders_mermaid_diagram(
|
||||
0,
|
||||
0,
|
||||
mermaid_block_start,
|
||||
)),
|
||||
.add_assertion(assert_notebook_contents(0, 0, markdown)),
|
||||
)
|
||||
.with_step(move_notebook_cursor_to_offset(0, 0, cursor_offset))
|
||||
.with_step(
|
||||
TestStep::new("Backspace from inside rendered Mermaid")
|
||||
TestStep::new("Backspace from inside raw Mermaid")
|
||||
.with_keystrokes(&["backspace"])
|
||||
.add_assertion(assert_notebook_contents(0, 0, "Before\nAfter")),
|
||||
.add_assertion(assert_notebook_contents(
|
||||
0,
|
||||
0,
|
||||
"Before\n```mermaid\ngraph TD\nA -> B\n```\nAfter",
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
//! Integration tests for pane restoration functionality.
|
||||
//! Tests the ability to restore closed panes using cmd+shift+t.
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use galaxy::{
|
||||
cmd_or_ctrl_shift,
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
pane_group::assert_focused_pane_index,
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
execute_command, util::ExpectedExitStatus, validate_block_output_on_finished_block,
|
||||
wait_until_bootstrapped_pane, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
workspace::{assert_tab_count, trigger_undo_close},
|
||||
},
|
||||
use std::collections::HashMap;
|
||||
use std::time::Duration;
|
||||
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::pane_group::assert_focused_pane_index;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
execute_command, validate_block_output_on_finished_block, wait_until_bootstrapped_pane,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use std::{collections::HashMap, time::Duration};
|
||||
use warp::integration_testing::workspace::{assert_tab_count, trigger_undo_close};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
/// Tests the basic pane restoration workflow:
|
||||
/// 1. Split off a pane
|
||||
@@ -206,7 +206,7 @@ pub fn test_undo_close_grace_period_cleanup() -> Builder {
|
||||
let pane_group_view = workspace.get_pane_group_view(0).expect("should have tab 0");
|
||||
pane_group_view.read(ctx, |pane_group, _| pane_group.pane_count())
|
||||
});
|
||||
galaxyui::async_assert_eq!(initial_pane_count, 1, "Should have exactly one pane after grace period expires - closed pane should be cleaned up")
|
||||
galaxyui_core::async_assert_eq!(initial_pane_count, 1, "Should have exactly one pane after grace period expires - closed pane should be cleaned up")
|
||||
}),
|
||||
)
|
||||
.with_step(trigger_undo_close()
|
||||
@@ -217,7 +217,7 @@ pub fn test_undo_close_grace_period_cleanup() -> Builder {
|
||||
workspace_view.read(app, |workspace, ctx| {
|
||||
let pane_group_view = workspace.get_pane_group_view(0).expect("should have tab 0");
|
||||
let pane_count = pane_group_view.read(ctx, |pane_group, _| pane_group.pane_count());
|
||||
galaxyui::async_assert_eq!(pane_count, 1, "Should still have only one pane after attempted restore - no pane should be restored")
|
||||
galaxyui_core::async_assert_eq!(pane_count, 1, "Should still have only one pane after attempted restore - no pane should be restored")
|
||||
})
|
||||
}),
|
||||
)
|
||||
@@ -287,9 +287,9 @@ pub fn test_closed_panes_cleared_on_rearrangement() -> Builder {
|
||||
(pane_group.visible_pane_count(), pane_group.pane_count())
|
||||
});
|
||||
if visible_pane_count != 2 {
|
||||
galaxyui::integration::AssertionOutcome::failure(format!("Should have 2 visible panes after closing one (got {visible_pane_count} visible, {total_pane_count} total)"))
|
||||
galaxyui_core::integration::AssertionOutcome::failure(format!("Should have 2 visible panes after closing one (got {visible_pane_count} visible, {total_pane_count} total)"))
|
||||
} else {
|
||||
galaxyui::integration::AssertionOutcome::Success
|
||||
galaxyui_core::integration::AssertionOutcome::Success
|
||||
}
|
||||
})
|
||||
}),
|
||||
@@ -317,9 +317,9 @@ pub fn test_closed_panes_cleared_on_rearrangement() -> Builder {
|
||||
// After rearrangement, we should still have the same visible panes (no restoration)
|
||||
// The exact count might vary based on how the move operation affects the layout
|
||||
if visible_pane_count < 1 {
|
||||
galaxyui::integration::AssertionOutcome::failure(format!("Should have at least 1 visible pane after undo close attempt, got {visible_pane_count}"))
|
||||
galaxyui_core::integration::AssertionOutcome::failure(format!("Should have at least 1 visible pane after undo close attempt, got {visible_pane_count}"))
|
||||
} else {
|
||||
galaxyui::integration::AssertionOutcome::Success
|
||||
galaxyui_core::integration::AssertionOutcome::Success
|
||||
}
|
||||
})
|
||||
}),
|
||||
@@ -332,9 +332,9 @@ pub fn test_closed_panes_cleared_on_rearrangement() -> Builder {
|
||||
let visible_pane_count = pane_group_view.read(ctx, |pane_group, _| pane_group.visible_pane_count());
|
||||
// Should still have the same panes, no restoration should occur
|
||||
if visible_pane_count < 1 {
|
||||
galaxyui::integration::AssertionOutcome::failure(format!("Should have at least 1 visible pane after second undo close attempt, got {visible_pane_count}"))
|
||||
galaxyui_core::integration::AssertionOutcome::failure(format!("Should have at least 1 visible pane after second undo close attempt, got {visible_pane_count}"))
|
||||
} else {
|
||||
galaxyui::integration::AssertionOutcome::Success
|
||||
galaxyui_core::integration::AssertionOutcome::Success
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -367,13 +367,13 @@ pub fn test_closed_panes_cleared_on_rearrangement() -> Builder {
|
||||
0, 0, window_id, app,
|
||||
);
|
||||
match (original_result, third_result) {
|
||||
(galaxyui::integration::AssertionOutcome::Success, galaxyui::integration::AssertionOutcome::Success) => {
|
||||
galaxyui::integration::AssertionOutcome::Success
|
||||
(galaxyui_core::integration::AssertionOutcome::Success, galaxyui_core::integration::AssertionOutcome::Success) => {
|
||||
galaxyui_core::integration::AssertionOutcome::Success
|
||||
}
|
||||
_ => galaxyui::integration::AssertionOutcome::failure("Expected to find both original_pane and third_pane content".to_string())
|
||||
_ => galaxyui_core::integration::AssertionOutcome::failure("Expected to find both original_pane and third_pane content".to_string())
|
||||
}
|
||||
} else {
|
||||
galaxyui::integration::AssertionOutcome::failure(format!("Unexpected pane count: {visible_pane_count}"))
|
||||
galaxyui_core::integration::AssertionOutcome::failure(format!("Unexpected pane count: {visible_pane_count}"))
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use galaxyui::integration::{AssertionOutcome, TestStep};
|
||||
|
||||
use crate::Builder;
|
||||
use galaxyui_core::integration::{AssertionOutcome, TestStep};
|
||||
|
||||
use super::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use crate::Builder;
|
||||
|
||||
/// Returns the current `$HOME` as a [`PathBuf`].
|
||||
/// In integration tests, `HOME` is overridden to a hermetic temp directory.
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
use std::collections::HashMap;
|
||||
use std::time::Duration;
|
||||
|
||||
use settings::Setting as _;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::remote_server::{
|
||||
assert_command_executor_is_remote_server, assert_remote_server_connected,
|
||||
assert_remote_server_has_navigated, assert_remote_server_loaded_repo_metadata_directory,
|
||||
load_repo_metadata_directory_via_remote_server, record_remote_server_lazy_load_events,
|
||||
record_remote_server_navigation_events, wait_for_remote_server_ready,
|
||||
write_file_via_remote_server,
|
||||
};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::subshell::{
|
||||
enter_remote_server_ssh_command, enter_ssh_password, setup_gcloud_sdk,
|
||||
wait_for_remote_server_password_prompt,
|
||||
};
|
||||
use warp::integration_testing::terminal::util::{
|
||||
current_shell_starter_and_version, ExpectedExitStatus,
|
||||
};
|
||||
use warp::integration_testing::terminal::{
|
||||
execute_command_for_single_terminal_in_tab, run_completer,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::terminal::shell::ShellType;
|
||||
use warp::terminal::warpify::settings::{SshExtensionInstallMode, SshExtensionInstallModeSetting};
|
||||
use galaxyui_core::integration::TestStep;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
/// Common builder configuration for remote server tests: enables the
|
||||
/// `SshRemoteServer` feature flag for these tests and sets the install mode to
|
||||
/// `AlwaysInstall` so the binary check → connect flow runs without user
|
||||
/// interaction.
|
||||
fn remote_server_builder() -> Builder {
|
||||
FeatureFlag::SshRemoteServer.set_enabled(true);
|
||||
new_builder()
|
||||
.set_should_run_test(|| {
|
||||
if !cfg!(target_os = "linux") {
|
||||
return false;
|
||||
}
|
||||
let (starter, _) = current_shell_starter_and_version();
|
||||
starter.shell_type() != ShellType::PowerShell
|
||||
})
|
||||
.with_user_defaults(HashMap::from([(
|
||||
SshExtensionInstallModeSetting::storage_key().to_owned(),
|
||||
serde_json::to_string(&SshExtensionInstallMode::AlwaysInstall)
|
||||
.expect("Can serialize SshExtensionInstallMode"),
|
||||
)]))
|
||||
}
|
||||
|
||||
/// Appends the common SSH → remote server connection steps to a builder.
|
||||
fn with_ssh_connect_steps(builder: Builder, shell: &'static str) -> Builder {
|
||||
builder
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(setup_gcloud_sdk())
|
||||
.with_step(enter_remote_server_ssh_command(shell))
|
||||
.with_step(wait_for_remote_server_password_prompt(0, shell))
|
||||
.with_step(enter_ssh_password().set_post_step_pause(Duration::from_millis(250)))
|
||||
.with_step(wait_for_remote_server_ready(0))
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test A — Connection and handshake
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
macro_rules! generate_remote_server_connect_test {
|
||||
($fn_name:ident, $shell:literal) => {
|
||||
/// Validates SSH → binary check → proto handshake → executor wiring.
|
||||
pub fn $fn_name() -> Builder {
|
||||
let builder = with_ssh_connect_steps(remote_server_builder(), $shell);
|
||||
builder
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Assert remote server session is connected")
|
||||
.add_assertion(assert_remote_server_connected(0)),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert command executor is RemoteServerCommandExecutor",
|
||||
)
|
||||
.add_assertion(assert_command_executor_is_remote_server(0)),
|
||||
)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
generate_remote_server_connect_test!(test_remote_server_connect_bash, "bash");
|
||||
generate_remote_server_connect_test!(test_remote_server_connect_zsh, "zsh");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test B — Repo metadata (navigate to a git repo)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Validates the full navigate-to-directory flow:
|
||||
/// SSH → create git repo on remote → cd into it → NavigatedToDirectory response
|
||||
/// received → RepoMetadataSnapshot pushed with non-empty tree.
|
||||
pub fn test_remote_server_navigate_to_repo() -> Builder {
|
||||
let builder = with_ssh_connect_steps(remote_server_builder(), "bash");
|
||||
builder
|
||||
.with_step(record_remote_server_navigation_events())
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"mkdir -p /tmp/warp-test-repo && cd /tmp/warp-test-repo && git init -b main && git config user.email test@test.com && git config user.name TestUser && touch file && git add file && git commit -m init".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"cd /tmp/warp-test-repo".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
// Assert the remote server received a successful navigation response
|
||||
// for the expected repo path.
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert remote server has navigated to directory",
|
||||
)
|
||||
.set_timeout(Duration::from_secs(15))
|
||||
.add_named_assertion_with_data_from_prior_step(
|
||||
"remote server navigated to expected repo path",
|
||||
assert_remote_server_has_navigated(0, "/tmp/warp-test-repo"),
|
||||
),
|
||||
)
|
||||
// Verify the connection is still healthy after navigation.
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert host has tracked sessions after navigation",
|
||||
)
|
||||
.add_assertion(assert_remote_server_connected(0)),
|
||||
)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test C — Completions routing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Validates that completions are routed through the `RemoteServerCommandExecutor`
|
||||
/// (the `RunCommand` proto path) rather than falling back to the legacy
|
||||
/// `RemoteCommandExecutor`.
|
||||
pub fn test_remote_server_completions() -> Builder {
|
||||
let builder = with_ssh_connect_steps(remote_server_builder(), "bash");
|
||||
builder
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"touch /tmp/warp-rs-completion-target".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
// Trigger the actual tab-completion request path for a remote file.
|
||||
.with_step(
|
||||
run_completer(0, "cat /tmp/warp-rs-completion-t").set_timeout(Duration::from_secs(15)),
|
||||
)
|
||||
// Verify the executor is still the remote server executor after
|
||||
// completions have been triggered.
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert command executor is RemoteServerCommandExecutor after completions",
|
||||
)
|
||||
.add_assertion(assert_command_executor_is_remote_server(0)),
|
||||
)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test D — File read/write/delete via proto client API
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test E — Lazy loading repo metadata directory
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Validates the `LoadRepoMetadataDirectory` proto round-trip:
|
||||
/// navigate to a git repo → create a subdirectory → call
|
||||
/// `load_remote_repo_metadata_directory` for that subdirectory → verify
|
||||
/// the request completes without error (the response flows through the
|
||||
/// manager's `RepoMetadataDirectoryLoaded` event).
|
||||
pub fn test_remote_server_lazy_load_directory() -> Builder {
|
||||
let builder = with_ssh_connect_steps(remote_server_builder(), "bash");
|
||||
builder
|
||||
.with_step(record_remote_server_navigation_events())
|
||||
.with_step(record_remote_server_lazy_load_events())
|
||||
// Create a git repo with a subdirectory on the remote.
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"rm -rf /tmp/warp-lazy-repo && mkdir -p /tmp/warp-lazy-repo/subdir && cd /tmp/warp-lazy-repo && git init -b main && git config user.email test@test.com && git config user.name TestUser && touch file subdir/nested && git add . && git commit -m init".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
// Navigate into the repo so NavigatedToDirectory fires and the
|
||||
// server indexes it.
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"cd /tmp/warp-lazy-repo".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Wait for navigation to complete",
|
||||
)
|
||||
.set_timeout(Duration::from_secs(15))
|
||||
.add_named_assertion_with_data_from_prior_step(
|
||||
"remote server navigated to expected lazy-load repo path",
|
||||
assert_remote_server_has_navigated(0, "/tmp/warp-lazy-repo"),
|
||||
),
|
||||
)
|
||||
// Trigger lazy-load of the subdirectory via the proto API.
|
||||
.with_step(
|
||||
TestStep::new("Load subdirectory via LoadRepoMetadataDirectory")
|
||||
.with_action(load_repo_metadata_directory_via_remote_server(
|
||||
0,
|
||||
"/tmp/warp-lazy-repo".to_string(),
|
||||
"/tmp/warp-lazy-repo/subdir".to_string(),
|
||||
))
|
||||
// Give the async request a moment to complete.
|
||||
.set_post_step_pause(Duration::from_secs(2)),
|
||||
)
|
||||
.with_step(
|
||||
new_step_with_default_assertions("Assert lazy-load directory response succeeded")
|
||||
.set_timeout(Duration::from_secs(15))
|
||||
.add_named_assertion_with_data_from_prior_step(
|
||||
"remote server loaded repo metadata directory",
|
||||
assert_remote_server_loaded_repo_metadata_directory(0),
|
||||
),
|
||||
)
|
||||
// Verify the connection is still healthy after the lazy-load.
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert remote server still connected after lazy load",
|
||||
)
|
||||
.add_assertion(assert_remote_server_connected(0)),
|
||||
)
|
||||
// Verify the subdirectory content is accessible by reading
|
||||
// the nested file through the remote server executor.
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"cat /tmp/warp-lazy-repo/subdir/nested && echo 'file exists'".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
"file exists",
|
||||
))
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Test F — File write via proto client API
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Validates `WriteFile` through the `RemoteServerClient` proto API.
|
||||
/// Uses `write_file_via_remote_server` helper to write a file on the remote
|
||||
/// host, then reads it back via a shell command (which goes through
|
||||
/// `RemoteServerCommandExecutor::run_command`) to confirm the content.
|
||||
pub fn test_remote_server_file_operations() -> Builder {
|
||||
let builder = with_ssh_connect_steps(remote_server_builder(), "bash");
|
||||
builder
|
||||
// Step 1: Write a file using RemoteServerClient::write_file proto API
|
||||
.with_step(
|
||||
TestStep::new("Write file via RemoteServerClient proto API")
|
||||
.with_action(write_file_via_remote_server(
|
||||
0,
|
||||
"/tmp/warp-rs-test-file.txt".to_string(),
|
||||
"hello from proto".to_string(),
|
||||
))
|
||||
// Give the async write a moment to complete
|
||||
.set_post_step_pause(Duration::from_secs(2)),
|
||||
)
|
||||
// Step 2: Verify the file was written by reading it via shell command
|
||||
// (which goes through RemoteServerCommandExecutor::run_command).
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"cat /tmp/warp-rs-test-file.txt".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
"hello from proto",
|
||||
))
|
||||
// Step 3: Clean up
|
||||
.with_step(execute_command_for_single_terminal_in_tab(
|
||||
0,
|
||||
"rm -f /tmp/warp-rs-test-file.txt".into(),
|
||||
ExpectedExitStatus::Success,
|
||||
(),
|
||||
))
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert command executor is still RemoteServerCommandExecutor after file ops",
|
||||
)
|
||||
.add_assertion(assert_command_executor_is_remote_server(0)),
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
//! Integration tests for the Rich Input Ctrl+Enter submit toggle (issue #11588).
|
||||
//!
|
||||
//! These tests drive the full keystroke-dispatch path and complement the unit
|
||||
//! tests in `app/src/terminal/input_tests.rs`.
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use settings::Setting as _;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::input::{
|
||||
open_cli_agent_rich_input, rich_input_buffer_contains_newline,
|
||||
rich_input_buffer_does_not_contain_newline, rich_input_buffer_text_is_empty,
|
||||
};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::settings::SubmitRichInputOnCtrlEnter;
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Setting = true: end-to-end wiring guard
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// With `submit_on_ctrl_enter = true`, Enter inserts a newline and Ctrl+Enter
|
||||
/// submits (buffer cleared). This is the full-stack wiring guard for the
|
||||
/// toggle: it proves that the setting actually propagates to editor behaviour
|
||||
/// (issue #11588).
|
||||
pub fn test_rich_input_toggle_on_enter_inserts_newline_and_ctrl_enter_submits() -> Builder {
|
||||
FeatureFlag::CLIAgentRichInput.set_enabled(true);
|
||||
|
||||
new_builder()
|
||||
.with_user_defaults(HashMap::from([(
|
||||
SubmitRichInputOnCtrlEnter::storage_key().to_string(),
|
||||
true.to_string(),
|
||||
)]))
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(open_cli_agent_rich_input(0))
|
||||
// Enter inserts a newline (not a submit).
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Type 'line1', press Enter — buffer should contain newline (no submit)",
|
||||
)
|
||||
.with_typed_characters(&["line1"])
|
||||
.with_keystrokes(&["enter"])
|
||||
.add_assertion(rich_input_buffer_contains_newline(0)),
|
||||
)
|
||||
// Ctrl+Enter submits: buffer is cleared.
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Type 'line2', press Ctrl+Enter — buffer cleared (submit fired)",
|
||||
)
|
||||
.with_typed_characters(&["line2"])
|
||||
.with_keystrokes(&["ctrl-enter"])
|
||||
.add_assertion(rich_input_buffer_text_is_empty(0)),
|
||||
)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Setting = true: Enter while slash-commands menu is open accepts the menu
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// Regression (#11588): with toggle ON, typing `/` opens the slash-commands
|
||||
/// menu and pressing Enter must route to menu acceptance, not newline insertion.
|
||||
pub fn test_rich_input_enter_accepts_menu_item_when_toggle_is_true() -> Builder {
|
||||
FeatureFlag::CLIAgentRichInput.set_enabled(true);
|
||||
|
||||
new_builder()
|
||||
.with_user_defaults(HashMap::from([(
|
||||
SubmitRichInputOnCtrlEnter::storage_key().to_string(),
|
||||
true.to_string(),
|
||||
)]))
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(open_cli_agent_rich_input(0))
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Type '/', press Enter — buffer must NOT contain a newline (menu branch taken)",
|
||||
)
|
||||
.with_typed_characters(&["/"])
|
||||
.with_keystrokes(&["enter"])
|
||||
.add_assertion(rich_input_buffer_does_not_contain_newline(0)),
|
||||
)
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
use galaxy::integration_testing::{
|
||||
rules::{
|
||||
assert_rule_count, assert_rule_exists, assert_rule_pane_open, create_a_personal_rule,
|
||||
open_rule_pane, update_rule_content,
|
||||
},
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
window::save_active_window_id,
|
||||
use warp::integration_testing::rules::{
|
||||
assert_rule_count, assert_rule_exists, assert_rule_pane_open, create_a_personal_rule,
|
||||
open_rule_pane, update_rule_content,
|
||||
};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::integration_testing::window::save_active_window_id;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
|
||||
@@ -1,27 +1,24 @@
|
||||
use galaxy::integration_testing::terminal::{
|
||||
initialize_secret_regexes, open_context_menu_for_selected_block,
|
||||
use warp::integration_testing::clipboard::assert_clipboard_contains_string;
|
||||
use warp::integration_testing::secret_redaction::{
|
||||
assert_secret_tooltip_open, assert_secrets_redacted_for_ai,
|
||||
};
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
clipboard::assert_clipboard_contains_string,
|
||||
secret_redaction::{assert_secret_tooltip_open, assert_secrets_redacted_for_ai},
|
||||
settings::toggle_setting,
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_selected_block_index_is_last_renderable,
|
||||
execute_command_for_single_terminal_in_tab, run_alt_grid_program,
|
||||
util::ExpectedExitStatus, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::single_terminal_view,
|
||||
},
|
||||
settings_view::{PrivacyPageAction, SettingsAction},
|
||||
terminal::model::{index::Point, terminal_model::WithinModel},
|
||||
use warp::integration_testing::settings::toggle_setting;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_selected_block_index_is_last_renderable, execute_command_for_single_terminal_in_tab,
|
||||
initialize_secret_regexes, open_context_menu_for_selected_block, run_alt_grid_program,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui::{async_assert, integration::TestStep};
|
||||
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
use warp::integration_testing::view_getters::single_terminal_view;
|
||||
use warp::settings_view::{PrivacyPageAction, SettingsAction};
|
||||
use warp::terminal::model::index::Point;
|
||||
use warp::terminal::model::terminal_model::WithinModel;
|
||||
use galaxyui_core::async_assert;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
|
||||
pub fn test_secret_is_obfuscated_on_copy() -> Builder {
|
||||
let phone_number = "123-456-7890";
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
//! or individual setting values are invalid — and that the banner clears
|
||||
//! when the file is fixed.
|
||||
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab, view_getters::workspace_view,
|
||||
},
|
||||
};
|
||||
use galaxyui::{async_assert, integration::TestStep};
|
||||
use std::time::Duration;
|
||||
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::integration_testing::view_getters::workspace_view;
|
||||
use galaxyui_core::async_assert;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
/// Helper: returns the path to the TOML settings file.
|
||||
|
||||
@@ -4,18 +4,16 @@
|
||||
//! filesystem watcher and pushed into the in-memory setting models, on every
|
||||
//! platform where Warp watches `config_local_dir()`.
|
||||
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
settings::FontSettings,
|
||||
};
|
||||
use galaxyui::{async_assert_eq, integration::TestStep, SingletonEntity};
|
||||
use settings::Setting as _;
|
||||
use std::time::Duration;
|
||||
|
||||
use settings::Setting as _;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::settings::FontSettings;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert_eq, SingletonEntity};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
/// Helper: returns the path to the TOML settings file.
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
settings::{BlockVisibilitySettings, ScrollSettings},
|
||||
};
|
||||
use galaxyui::{async_assert, async_assert_eq, integration::AssertionOutcome, SingletonEntity};
|
||||
use settings::Setting as _;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::settings::{BlockVisibilitySettings, ScrollSettings};
|
||||
use galaxyui_core::integration::AssertionOutcome;
|
||||
use galaxyui_core::{async_assert, async_assert_eq, SingletonEntity};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
|
||||
@@ -5,16 +5,13 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
settings::{CodeSettings, DebugSettings, FontSettings},
|
||||
};
|
||||
use galaxyui::{async_assert, async_assert_eq, integration::TestStep, SingletonEntity};
|
||||
use settings::Setting as _;
|
||||
use warp::features::FeatureFlag;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::settings::{CodeSettings, DebugSettings, FontSettings};
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert, async_assert_eq, SingletonEntity};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
|
||||
|
||||
@@ -1,39 +1,29 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::Builder;
|
||||
use galaxy::{
|
||||
features::FeatureFlag,
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
subshell::{
|
||||
accept_tmux_install, assert_subshell_banner_is_showing,
|
||||
assert_subshell_is_bootstrapped, enter_ssh_command, enter_ssh_password,
|
||||
run_exit_command, setup_gcloud_sdk, trigger_subshell_bootstrap,
|
||||
wait_for_password_prompt,
|
||||
},
|
||||
terminal::{
|
||||
assert_active_block_output_for_single_terminal_in_tab,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
execute_command_for_single_terminal_in_tab,
|
||||
util::{current_shell_starter_and_version, nonce, ExactLine, ExpectedExitStatus},
|
||||
validate_block_output, wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::{single_terminal_view, single_terminal_view_for_tab},
|
||||
},
|
||||
terminal::{
|
||||
model::bootstrap::BootstrapStage,
|
||||
session_settings::{StartupShell, StartupShellOverride},
|
||||
shell::ShellType,
|
||||
},
|
||||
};
|
||||
use galaxyui::{
|
||||
async_assert, async_assert_eq,
|
||||
integration::{AssertionCallback, AssertionOutcome, TestStep},
|
||||
};
|
||||
use regex::Regex;
|
||||
use settings::Setting as _;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::subshell::{
|
||||
enter_ssh_command, enter_ssh_password, setup_gcloud_sdk, wait_for_password_prompt,
|
||||
};
|
||||
use warp::integration_testing::terminal::util::{
|
||||
current_shell_starter_and_version, nonce, ExactLine, ExpectedExitStatus,
|
||||
};
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_active_block_output_for_single_terminal_in_tab,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
execute_command_for_single_terminal_in_tab, validate_block_output,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::view_getters::{single_terminal_view, single_terminal_view_for_tab};
|
||||
use warp::terminal::model::bootstrap::BootstrapStage;
|
||||
use warp::terminal::session_settings::{StartupShell, StartupShellOverride};
|
||||
use warp::terminal::shell::ShellType;
|
||||
use galaxyui_core::integration::{AssertionCallback, AssertionOutcome, TestStep};
|
||||
use galaxyui_core::{async_assert, async_assert_eq};
|
||||
|
||||
use super::new_builder;
|
||||
use crate::Builder;
|
||||
|
||||
/// Verifies that the active block is part of a remote session.
|
||||
fn assert_active_block_is_remote(user: &'static str, host: &'static str) -> AssertionCallback {
|
||||
@@ -157,7 +147,7 @@ fn verify_login_shell(shell: &str) -> TestStep {
|
||||
|
||||
/// A macro to generate a test function to validate that we are able to
|
||||
/// bootstrap a given remote shell when using ssh.
|
||||
macro_rules! generate_can_bootstrap_legacy_ssh_test_for_shell {
|
||||
macro_rules! generate_can_bootstrap_ssh_wrapper_test_for_shell {
|
||||
($fn_name:ident, $shell:literal) => {
|
||||
/// Ensure we can successfully ssh into a $shell remote shell and bootstrap it
|
||||
/// successfully.
|
||||
@@ -165,9 +155,6 @@ macro_rules! generate_can_bootstrap_legacy_ssh_test_for_shell {
|
||||
new_builder()
|
||||
// TODO(CORE-2333) PowerShell has no SSH wrapper.
|
||||
.set_should_run_test(|| {
|
||||
if FeatureFlag::SSHTmuxWrapper.is_enabled() {
|
||||
return false;
|
||||
}
|
||||
let (starter, _) = current_shell_starter_and_version();
|
||||
starter.shell_type() != ShellType::PowerShell
|
||||
})
|
||||
@@ -190,62 +177,6 @@ macro_rules! generate_can_bootstrap_legacy_ssh_test_for_shell {
|
||||
};
|
||||
}
|
||||
|
||||
/// A macro to generate a test function to validate that we are able to
|
||||
/// bootstrap a given remote shell when using ssh.
|
||||
macro_rules! generate_can_bootstrap_tmux_ssh_test_for_shell {
|
||||
($fn_name:ident, $shell:literal, $install_tmux:literal) => {
|
||||
/// Ensure we can successfully ssh into a $shell remote shell and bootstrap it
|
||||
/// successfully.
|
||||
pub fn $fn_name() -> Builder {
|
||||
fn warpify(builder: Builder) -> Builder {
|
||||
builder
|
||||
.with_step(enter_ssh_command($shell))
|
||||
.with_step(wait_for_password_prompt(0 /*tab_idx*/, $shell))
|
||||
.with_step(
|
||||
enter_ssh_password()
|
||||
.set_post_step_pause(std::time::Duration::from_millis(250)),
|
||||
)
|
||||
.with_step(assert_subshell_banner_is_showing())
|
||||
.with_step(trigger_subshell_bootstrap())
|
||||
}
|
||||
|
||||
fn assert_warpification(builder: Builder) -> Builder {
|
||||
builder
|
||||
.with_step(assert_subshell_is_bootstrapped(0, 0))
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(
|
||||
new_step_with_default_assertions(
|
||||
"Assert active block is part of a remote session",
|
||||
)
|
||||
.add_assertion(assert_active_block_is_remote($shell, "ubuntu-14-04")),
|
||||
)
|
||||
.with_step(verify_login_shell($shell))
|
||||
}
|
||||
|
||||
let builder = new_builder()
|
||||
// TODO(CORE-2333) PowerShell has no SSH wrapper.
|
||||
.set_should_run_test(|| {
|
||||
if !FeatureFlag::SSHTmuxWrapper.is_enabled() {
|
||||
return false;
|
||||
}
|
||||
let (starter, _) = current_shell_starter_and_version();
|
||||
starter.shell_type() != ShellType::PowerShell
|
||||
})
|
||||
.with_step(wait_until_bootstrapped_single_pane_for_tab(0))
|
||||
.with_step(setup_gcloud_sdk());
|
||||
// Install Tmux
|
||||
let builder = warpify(builder).with_step(
|
||||
accept_tmux_install().set_post_step_pause(std::time::Duration::from_secs(3)),
|
||||
);
|
||||
// Quit SSH Session once we validate warpificaiton works with Tmux Install
|
||||
let builder = assert_warpification(builder).with_step(run_exit_command());
|
||||
|
||||
// Validate we can Warpify when Tmux is already installed
|
||||
assert_warpification(warpify(builder))
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// A macro to generate a test function to validate that we are able to
|
||||
/// successfully start (but not bootstrap) an ssh connection with the given
|
||||
/// remote shell. Verifies that the ssh connection worked by asserting that
|
||||
@@ -289,12 +220,8 @@ macro_rules! generate_long_running_block_ssh_test_for_shell {
|
||||
|
||||
// Generate test methods to validate expected ssh behavior for a variety of
|
||||
// remote shells.
|
||||
generate_can_bootstrap_legacy_ssh_test_for_shell!(test_legacy_ssh_into_bash, "bash");
|
||||
generate_can_bootstrap_legacy_ssh_test_for_shell!(test_legacy_ssh_into_zsh, "zsh");
|
||||
generate_can_bootstrap_tmux_ssh_test_for_shell!(test_tmux_ssh_into_bash, "bash", false);
|
||||
generate_can_bootstrap_tmux_ssh_test_for_shell!(test_tmux_ssh_into_zsh, "zsh", false);
|
||||
generate_can_bootstrap_tmux_ssh_test_for_shell!(test_install_tmux_ssh_into_bash, "bash", true);
|
||||
generate_can_bootstrap_tmux_ssh_test_for_shell!(test_install_tmux_ssh_into_zsh, "zsh", true);
|
||||
generate_can_bootstrap_ssh_wrapper_test_for_shell!(test_ssh_wrapper_into_bash, "bash");
|
||||
generate_can_bootstrap_ssh_wrapper_test_for_shell!(test_ssh_wrapper_into_zsh, "zsh");
|
||||
generate_long_running_block_ssh_test_for_shell!(test_ssh_into_fish, "fish", prompt_regex: r"\nfish@ubuntu-14-04 ~>$");
|
||||
generate_long_running_block_ssh_test_for_shell!(test_ssh_into_sh, "sh", prompt_regex: r"\n\$ $");
|
||||
generate_long_running_block_ssh_test_for_shell!(test_ssh_into_ash, "ash", prompt_regex: r"\n\$ $");
|
||||
|
||||
@@ -1,31 +1,26 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use galaxy::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use galaxy::integration_testing::view_getters::single_input_view_for_tab;
|
||||
use galaxy::root_view::SubshellCommandArg;
|
||||
use galaxy::terminal::shell::ShellType;
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
subshell::{
|
||||
assert_subshell_banner_is_showing, assert_subshell_is_bootstrapped,
|
||||
enter_local_subshell_command, enter_remote_subshell_command, enter_ssh_password,
|
||||
setup_gcloud_sdk, trigger_subshell_bootstrap, util::ssh_command,
|
||||
wait_for_password_prompt,
|
||||
},
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
terminal::warpify::settings::AddedSubshellCommands,
|
||||
};
|
||||
use galaxyui::integration::{AssertionOutcome, TestStep};
|
||||
use galaxyui::windowing::state::ApplicationStage;
|
||||
use galaxyui::windowing::WindowManager;
|
||||
use galaxyui::{async_assert, UpdateModel};
|
||||
use settings::Setting as _;
|
||||
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::subshell::util::ssh_command;
|
||||
use warp::integration_testing::subshell::{
|
||||
assert_subshell_banner_is_showing, assert_subshell_is_bootstrapped,
|
||||
enter_local_subshell_command, enter_remote_subshell_command, enter_ssh_password,
|
||||
setup_gcloud_sdk, trigger_subshell_bootstrap, wait_for_password_prompt,
|
||||
};
|
||||
use warp::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::integration_testing::view_getters::single_input_view_for_tab;
|
||||
use warp::root_view::SubshellCommandArg;
|
||||
use warp::terminal::shell::ShellType;
|
||||
use warp::terminal::warpify::settings::AddedSubshellCommands;
|
||||
use galaxyui_core::integration::{AssertionOutcome, TestStep};
|
||||
use galaxyui_core::windowing::state::ApplicationStage;
|
||||
use galaxyui_core::windowing::WindowManager;
|
||||
use galaxyui_core::{async_assert, UpdateModel};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
|
||||
/// Generates an integration test that asserts that a local subshell of the given shell type can be
|
||||
/// successfully bootstrapped.
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
use galaxy::{
|
||||
cmd_or_ctrl_shift,
|
||||
integration_testing::{
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_active_block_output, assert_command_executed,
|
||||
assert_long_running_block_executing, assert_no_block_executing, execute_command,
|
||||
run_alt_grid_program, util::ExpectedExitStatus, wait_until_bootstrapped_pane,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::{terminal_view, workspace_view},
|
||||
},
|
||||
workspace::WorkspaceAction,
|
||||
use warp::cmd_or_ctrl_shift;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_active_block_output, assert_command_executed, assert_long_running_block_executing,
|
||||
assert_no_block_executing, execute_command, run_alt_grid_program, wait_until_bootstrapped_pane,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui::{async_assert, async_assert_eq, integration::TestStep};
|
||||
|
||||
use crate::util::{get_input_buffer, skip_if_powershell_core_2303};
|
||||
use warp::integration_testing::view_getters::{terminal_view, workspace_view};
|
||||
use warp::workspace::WorkspaceAction;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert, async_assert_eq};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::{get_input_buffer, skip_if_powershell_core_2303};
|
||||
|
||||
pub fn test_input_syncing_is_off_by_default() -> Builder {
|
||||
new_builder()
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
agent_mode::AgentViewState,
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
assert_active_block_output_for_single_terminal_in_tab, assert_input_editor_contents,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
assert_no_visible_background_blocks, util::current_shell_starter_and_version,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_getters::single_terminal_view_for_tab,
|
||||
},
|
||||
terminal::{
|
||||
model::terminal_model::BlockIndex,
|
||||
shell::{Shell, ShellType},
|
||||
},
|
||||
use warp::integration_testing::agent_mode::AgentViewState;
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::current_shell_starter_and_version;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_active_block_output_for_single_terminal_in_tab, assert_input_editor_contents,
|
||||
assert_long_running_block_executing_for_single_terminal_in_tab,
|
||||
assert_no_visible_background_blocks, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui::{
|
||||
async_assert, async_assert_eq,
|
||||
integration::{AssertionCallback, AssertionOutcome, TestStep},
|
||||
};
|
||||
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
use warp::integration_testing::view_getters::single_terminal_view_for_tab;
|
||||
use warp::terminal::model::terminal_model::BlockIndex;
|
||||
use warp::terminal::shell::{Shell, ShellType};
|
||||
use galaxyui_core::integration::{AssertionCallback, AssertionOutcome, TestStep};
|
||||
use galaxyui_core::{async_assert, async_assert_eq};
|
||||
|
||||
use super::{new_builder, Builder};
|
||||
use crate::util::skip_if_powershell_core_2303;
|
||||
|
||||
pub fn test_typeahead() -> Builder {
|
||||
new_builder()
|
||||
@@ -210,12 +201,14 @@ pub fn test_input_reporting_powershell() -> Builder {
|
||||
/// This tests UNIX-specific signal handling.
|
||||
#[cfg(not(windows))]
|
||||
pub fn test_background_output() -> Builder {
|
||||
use galaxy::integration_testing::{
|
||||
block::assert_background_output,
|
||||
terminal::{execute_command_for_single_terminal_in_tab, util::ExpectedExitStatus},
|
||||
};
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
use std::os::unix::prelude::OpenOptionsExt;
|
||||
|
||||
use regex::Regex;
|
||||
use std::{fs::OpenOptions, io::Write, os::unix::prelude::OpenOptionsExt};
|
||||
use warp::integration_testing::block::assert_background_output;
|
||||
use warp::integration_testing::terminal::execute_command_for_single_terminal_in_tab;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
|
||||
let (starter, _) = current_shell_starter_and_version();
|
||||
let (spawn_command, kill_command) = match starter.shell_type() {
|
||||
|
||||
@@ -4,15 +4,17 @@ use std::pin::Pin;
|
||||
use galaxyui::event::{Event, ModifiersState};
|
||||
use galaxyui::integration::{TestStep, ARTIFACTS_DIR_ENV_VAR};
|
||||
use pathfinder_geometry::vector::vec2f;
|
||||
|
||||
use crate::Builder;
|
||||
use galaxy::integration_testing::step::new_step_with_default_assertions;
|
||||
use galaxy::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use galaxy::integration_testing::terminal::{
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
assert_view_has_text_selection, clear_blocklist_to_remove_bootstrapped_blocks,
|
||||
execute_command_for_single_terminal_in_tab, execute_echo_str,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use galaxyui_core::event::{Event, ModifiersState};
|
||||
use galaxyui_core::integration::{TestStep, ARTIFACTS_DIR_ENV_VAR};
|
||||
|
||||
use crate::Builder;
|
||||
|
||||
/// Exercises the video recording, screenshot, and overlay annotation APIs.
|
||||
///
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
use galaxy::integration_testing::{
|
||||
self,
|
||||
assertions::{
|
||||
assert_websocket_has_not_started, assert_websocket_has_started, create_a_personal_workflow,
|
||||
join_a_workspace,
|
||||
},
|
||||
terminal::wait_until_bootstrapped_single_pane_for_tab,
|
||||
use warp::integration_testing::assertions::{
|
||||
assert_websocket_has_not_started, assert_websocket_has_started, create_a_personal_workflow,
|
||||
join_a_workspace,
|
||||
};
|
||||
|
||||
use crate::Builder;
|
||||
use warp::integration_testing::terminal::wait_until_bootstrapped_single_pane_for_tab;
|
||||
use warp::integration_testing::{self};
|
||||
|
||||
use super::{new_builder, TEST_ONLY_ASSETS};
|
||||
use crate::Builder;
|
||||
|
||||
/// With no objects and no teams, the websocket should not begin
|
||||
pub fn test_websocket_does_not_begin_on_startup() -> Builder {
|
||||
@@ -25,7 +22,9 @@ pub fn test_websocket_begins_on_startup() -> Builder {
|
||||
integration_testing::create_file_from_assets(
|
||||
TEST_ONLY_ASSETS,
|
||||
"cloud_objects.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))
|
||||
|
||||
@@ -1,31 +1,27 @@
|
||||
use galaxy::integration_testing::workflow::{
|
||||
assert_no_team_workflow_pane_open, assert_open_team_workflow_pane_count_equals,
|
||||
};
|
||||
use galaxy::{
|
||||
integration_testing::{
|
||||
self,
|
||||
assertions::{go_offline, go_online, join_a_workspace},
|
||||
command_palette::{open_command_palette_and_run_action, TestStepsExt},
|
||||
step::new_step_with_default_assertions,
|
||||
terminal::{
|
||||
execute_command_for_single_terminal_in_tab, util::ExpectedExitStatus,
|
||||
wait_until_bootstrapped_single_pane_for_tab,
|
||||
},
|
||||
view_of_type,
|
||||
window::save_active_window_id,
|
||||
workflow::{
|
||||
assert_no_workflow_pane_open, assert_open_workflow_pane_count_equals,
|
||||
assert_workflow_id, create_a_personal_workflow, open_workflow,
|
||||
},
|
||||
},
|
||||
workflows::CategoriesView,
|
||||
};
|
||||
use galaxyui::{async_assert_eq, integration::TestStep, ViewHandle};
|
||||
use std::time::Duration;
|
||||
|
||||
use crate::Builder;
|
||||
use warp::integration_testing::assertions::{go_offline, go_online, join_a_workspace};
|
||||
use warp::integration_testing::command_palette::{
|
||||
open_command_palette_and_run_action, TestStepsExt,
|
||||
};
|
||||
use warp::integration_testing::step::new_step_with_default_assertions;
|
||||
use warp::integration_testing::terminal::util::ExpectedExitStatus;
|
||||
use warp::integration_testing::terminal::{
|
||||
execute_command_for_single_terminal_in_tab, wait_until_bootstrapped_single_pane_for_tab,
|
||||
};
|
||||
use warp::integration_testing::window::save_active_window_id;
|
||||
use warp::integration_testing::workflow::{
|
||||
assert_no_team_workflow_pane_open, assert_no_workflow_pane_open,
|
||||
assert_open_team_workflow_pane_count_equals, assert_open_workflow_pane_count_equals,
|
||||
assert_workflow_id, create_a_personal_workflow, open_workflow,
|
||||
};
|
||||
use warp::integration_testing::{self, view_of_type};
|
||||
use warp::workflows::CategoriesView;
|
||||
use galaxyui_core::integration::TestStep;
|
||||
use galaxyui_core::{async_assert_eq, ViewHandle};
|
||||
|
||||
use super::{new_builder, TEST_ONLY_ASSETS};
|
||||
use crate::Builder;
|
||||
|
||||
pub fn test_open_workflow_in_pane() -> Builder {
|
||||
new_builder()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user