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

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+34 -47
View File
@@ -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,
)),