From 8de147768c2de3221d0a119278e76c013d20b0f1 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 29 Feb 2024 12:44:06 +0000 Subject: feat(send): add proposal revision cli msg before cover letter prompt primarily this is to make it clearer that a proposal update is being sent when using `ngit push --force` instead of a new proposal --- tests/push.rs | 4 ++++ tests/send.rs | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) (limited to 'tests') diff --git a/tests/push.rs b/tests/push.rs index 0705174..d295c01 100644 --- a/tests/push.rs +++ b/tests/push.rs @@ -592,6 +592,10 @@ mod when_branch_is_checked_out { // standard output from `ngit send` p.expect(format!("creating patch for 2 commits from '{FEATURE_BRANCH_NAME_1}' that can be merged into 'main'\r\n"))?; + p.expect("as a revision to proposal: ")?; + // proposal id will be printed in this gap + p.expect_eventually("\r\n")?; + p.expect("searching for profile and relay updates...\r\n")?; p.expect("\r")?; p.expect("logged in as fred\r\n")?; diff --git a/tests/send.rs b/tests/send.rs index 2c86566..4b68821 100644 --- a/tests/send.rs +++ b/tests/send.rs @@ -1416,6 +1416,22 @@ mod specify_in_reply_to { ]; CliTester::new_from_dir(&git_repo.dir, args) } + fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { + p.expect("creating patch for 2 commits from 'feature' that can be merged into 'main'\r\n")?; + p.expect("as a revision to proposal: nevent1qqsypm62fzw7qynvlc4gjl3tr0jw4vmh659nvr2cc5qyhdg92a5yy0qzypumuen7l8wthtz45p3ftn58pvrs9xlumvkuu2xet8egzkcklqtesxygzam\r\n")?; + p.expect("searching for profile and relay updates...\r\n")?; + p.expect("\r")?; + p.expect("logged in as fred\r\n")?; + p.expect(format!( + "posting 2 patches {} a covering letter...\r\n", + if include_cover_letter { + "with" + } else { + "without" + } + ))?; + Ok(()) + } async fn prep_run_create_proposal() -> Result<( Relay<'static>, -- cgit v1.2.3