diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-08 14:37:56 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-08 14:39:21 +0000 |
| commit | 6b3aecbcbde669859533716225e9c3bbfd2023b2 (patch) | |
| tree | 06258c93893c57ae1ef3b3d709c364f00365fdb5 /tests/push.rs | |
| parent | 5622e384447fba354548aca0e39dcee3d95951c3 (diff) | |
feat(send): select commits from a list
when since_or_range isn't specified
adds resilience as assuming master..HEAD can cause some issues
eg when master is not up-to-date with origin/master
Diffstat (limited to 'tests/push.rs')
| -rw-r--r-- | tests/push.rs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tests/push.rs b/tests/push.rs index db7a8b8..5fe1f15 100644 --- a/tests/push.rs +++ b/tests/push.rs | |||
| @@ -80,6 +80,7 @@ fn cli_tester_create_proposal( | |||
| 80 | TEST_PASSWORD, | 80 | TEST_PASSWORD, |
| 81 | "--disable-cli-spinners", | 81 | "--disable-cli-spinners", |
| 82 | "send", | 82 | "send", |
| 83 | "HEAD~2", | ||
| 83 | "--title", | 84 | "--title", |
| 84 | format!("\"{title}\"").as_str(), | 85 | format!("\"{title}\"").as_str(), |
| 85 | "--description", | 86 | "--description", |
| @@ -571,13 +572,26 @@ mod when_branch_is_checked_out { | |||
| 571 | p.expect("finding proposal root event...\r\n")?; | 572 | p.expect("finding proposal root event...\r\n")?; |
| 572 | p.expect("found proposal root event. finding commits...\r\n")?; | 573 | p.expect("found proposal root event. finding commits...\r\n")?; |
| 573 | p.expect("preparing to force push proposal revision...\r\n")?; | 574 | p.expect("preparing to force push proposal revision...\r\n")?; |
| 574 | |||
| 575 | // standard output from `ngit send` | 575 | // standard output from `ngit send` |
| 576 | p.expect(format!("creating patch for 2 commits from '{FEATURE_BRANCH_NAME_1}' that can be merged into 'main'\r\n"))?; | 576 | p.expect("creating proposal revision for: ")?; |
| 577 | p.expect("as a revision to proposal: ")?; | ||
| 578 | // proposal id will be printed in this gap | 577 | // proposal id will be printed in this gap |
| 579 | p.expect_eventually("\r\n")?; | 578 | p.expect_eventually("\r\n")?; |
| 580 | 579 | let mut selector = p.expect_multi_select( | |
| 580 | "select commits for proposal", | ||
| 581 | vec![ | ||
| 582 | "(Joe Bloggs) add a4.md [feature-example-t] 355bdf1".to_string(), | ||
| 583 | "(Joe Bloggs) add a3.md dbd1115".to_string(), | ||
| 584 | "(Joe Bloggs) commit for rebasing on top of [main] 1aa2cfe" | ||
| 585 | .to_string(), | ||
| 586 | "(Joe Bloggs) add t2.md 431b84e".to_string(), | ||
| 587 | "(Joe Bloggs) add t1.md af474d8".to_string(), | ||
| 588 | "(Joe Bloggs) Initial commit 9ee507f".to_string(), | ||
| 589 | ], | ||
| 590 | )?; | ||
| 591 | selector.succeeds_with(vec![0, 1], false, vec![0, 1])?; | ||
| 592 | p.expect("creating proposal from 2 commits:\r\n")?; | ||
| 593 | p.expect("355bdf1 add a4.md\r\n")?; | ||
| 594 | p.expect("dbd1115 add a3.md\r\n")?; | ||
| 581 | p.expect("searching for profile and relay updates...\r\n")?; | 595 | p.expect("searching for profile and relay updates...\r\n")?; |
| 582 | p.expect("\r")?; | 596 | p.expect("\r")?; |
| 583 | p.expect("logged in as fred\r\n")?; | 597 | p.expect("logged in as fred\r\n")?; |