diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-15 10:21:09 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-02-15 10:21:09 +0000 |
| commit | fc63ee3466ed5088cedb278d2b56a989668f273c (patch) | |
| tree | b40386c2522f08ae2992d0e26ac776636bd4c72d /tests | |
| parent | b7c24559aa2758820039295ac0f6120dfdec550e (diff) | |
fix: improve 'searching for profile updates' msg
it wasn't clear why no results were coming back from relays
or why it is needs (added reference to relay updates)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/init.rs | 2 | ||||
| -rw-r--r-- | tests/login.rs | 18 | ||||
| -rw-r--r-- | tests/push.rs | 2 | ||||
| -rw-r--r-- | tests/send.rs | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/tests/init.rs b/tests/init.rs index 6db2554..1ad3810 100644 --- a/tests/init.rs +++ b/tests/init.rs | |||
| @@ -3,7 +3,7 @@ use serial_test::serial; | |||
| 3 | use test_utils::{git::GitTestRepo, *}; | 3 | use test_utils::{git::GitTestRepo, *}; |
| 4 | 4 | ||
| 5 | fn expect_msgs_first(p: &mut CliTester) -> Result<()> { | 5 | fn expect_msgs_first(p: &mut CliTester) -> Result<()> { |
| 6 | p.expect("searching for your details...\r\n")?; | 6 | p.expect("searching for profile and relay updates...\r\n")?; |
| 7 | p.expect("\r")?; | 7 | p.expect("\r")?; |
| 8 | p.expect("logged in as fred\r\n")?; | 8 | p.expect("logged in as fred\r\n")?; |
| 9 | // // p.expect("searching for existing claims on repository...\r\n")?; | 9 | // // p.expect("searching for existing claims on repository...\r\n")?; |
diff --git a/tests/login.rs b/tests/login.rs index 7fc9356..351d099 100644 --- a/tests/login.rs +++ b/tests/login.rs | |||
| @@ -60,7 +60,7 @@ mod with_relays { | |||
| 60 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? | 60 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? |
| 61 | .succeeds_with(TEST_PASSWORD)?; | 61 | .succeeds_with(TEST_PASSWORD)?; |
| 62 | 62 | ||
| 63 | p.expect("searching for your details...\r\n")?; | 63 | p.expect("searching for profile and relay updates...\r\n")?; |
| 64 | p.expect("\r")?; | 64 | p.expect("\r")?; |
| 65 | 65 | ||
| 66 | // p.expect_end_with( | 66 | // p.expect_end_with( |
| @@ -101,7 +101,7 @@ mod with_relays { | |||
| 101 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? | 101 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? |
| 102 | .succeeds_with(TEST_PASSWORD)?; | 102 | .succeeds_with(TEST_PASSWORD)?; |
| 103 | 103 | ||
| 104 | p.expect("searching for your details...\r\n")?; | 104 | p.expect("searching for profile and relay updates...\r\n")?; |
| 105 | p.expect("\r")?; | 105 | p.expect("\r")?; |
| 106 | 106 | ||
| 107 | p.expect_end_with( | 107 | p.expect_end_with( |
| @@ -418,7 +418,7 @@ mod with_relays { | |||
| 418 | with_fresh_config(|| { | 418 | with_fresh_config(|| { |
| 419 | let mut p = CliTester::new(["login", "--nsec", TEST_KEY_1_NSEC]); | 419 | let mut p = CliTester::new(["login", "--nsec", TEST_KEY_1_NSEC]); |
| 420 | 420 | ||
| 421 | p.expect("searching for your details...\r\n")?; | 421 | p.expect("searching for profile and relay updates...\r\n")?; |
| 422 | p.expect("\r")?; | 422 | p.expect("\r")?; |
| 423 | 423 | ||
| 424 | p.expect_end_with("logged in as fred\r\n")?; | 424 | p.expect_end_with("logged in as fred\r\n")?; |
| @@ -481,7 +481,7 @@ mod with_relays { | |||
| 481 | 481 | ||
| 482 | let mut p = CliTester::new(["login", "--password", TEST_PASSWORD]); | 482 | let mut p = CliTester::new(["login", "--password", TEST_PASSWORD]); |
| 483 | 483 | ||
| 484 | p.expect("searching for your details...\r\n")?; | 484 | p.expect("searching for profile and relay updates...\r\n")?; |
| 485 | p.expect("\r")?; | 485 | p.expect("\r")?; |
| 486 | 486 | ||
| 487 | p.expect_end_with("logged in as fred\r\n")?; | 487 | p.expect_end_with("logged in as fred\r\n")?; |
| @@ -540,7 +540,7 @@ mod with_relays { | |||
| 540 | TEST_PASSWORD, | 540 | TEST_PASSWORD, |
| 541 | ]); | 541 | ]); |
| 542 | 542 | ||
| 543 | p.expect("searching for your details...\r\n")?; | 543 | p.expect("searching for profile and relay updates...\r\n")?; |
| 544 | p.expect("\r")?; | 544 | p.expect("\r")?; |
| 545 | 545 | ||
| 546 | p.expect_end_with("logged in as fred\r\n")?; | 546 | p.expect_end_with("logged in as fred\r\n")?; |
| @@ -589,7 +589,7 @@ mod with_relays { | |||
| 589 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? | 589 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? |
| 590 | .succeeds_with(TEST_PASSWORD)?; | 590 | .succeeds_with(TEST_PASSWORD)?; |
| 591 | 591 | ||
| 592 | p.expect("searching for your details...\r\n")?; | 592 | p.expect("searching for profile and relay updates...\r\n")?; |
| 593 | p.expect("\r")?; | 593 | p.expect("\r")?; |
| 594 | p.expect( | 594 | p.expect( |
| 595 | "cannot find your account metadata (name, etc) on relays\r\n", | 595 | "cannot find your account metadata (name, etc) on relays\r\n", |
| @@ -653,7 +653,7 @@ mod with_relays { | |||
| 653 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? | 653 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? |
| 654 | .succeeds_with(TEST_PASSWORD)?; | 654 | .succeeds_with(TEST_PASSWORD)?; |
| 655 | 655 | ||
| 656 | p.expect("searching for your details...\r\n")?; | 656 | p.expect("searching for profile and relay updates...\r\n")?; |
| 657 | p.expect("\r")?; | 657 | p.expect("\r")?; |
| 658 | p.expect("cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience.\r\n")?; | 658 | p.expect("cannot find your relay list. consider using another nostr client to create one to enhance your nostr experience.\r\n")?; |
| 659 | 659 | ||
| @@ -729,7 +729,7 @@ mod with_relays { | |||
| 729 | 729 | ||
| 730 | let mut p = CliTester::new(["login", "--password", TEST_PASSWORD]); | 730 | let mut p = CliTester::new(["login", "--password", TEST_PASSWORD]); |
| 731 | 731 | ||
| 732 | p.expect("searching for your details...\r\n")?; | 732 | p.expect("searching for profile and relay updates...\r\n")?; |
| 733 | p.expect("\r")?; | 733 | p.expect("\r")?; |
| 734 | 734 | ||
| 735 | p.expect_end_eventually_with("logged in as fred\r\n")?; | 735 | p.expect_end_eventually_with("logged in as fred\r\n")?; |
| @@ -774,7 +774,7 @@ mod with_relays { | |||
| 774 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? | 774 | .with_confirmation(EXPECTED_SET_PASSWORD_CONFIRM_PROMPT)? |
| 775 | .succeeds_with(TEST_PASSWORD)?; | 775 | .succeeds_with(TEST_PASSWORD)?; |
| 776 | 776 | ||
| 777 | p.expect("searching for your details...\r\n")?; | 777 | p.expect("searching for profile and relay updates...\r\n")?; |
| 778 | p.expect("\r")?; | 778 | p.expect("\r")?; |
| 779 | 779 | ||
| 780 | p.expect_end_with("logged in as fred\r\n")?; | 780 | p.expect_end_with("logged in as fred\r\n")?; |
diff --git a/tests/push.rs b/tests/push.rs index 409b36f..07148ae 100644 --- a/tests/push.rs +++ b/tests/push.rs | |||
| @@ -355,7 +355,7 @@ mod when_branch_is_checked_out { | |||
| 355 | p.expect( | 355 | p.expect( |
| 356 | "1 commits ahead. preparing to create creating patch events.\r\n", | 356 | "1 commits ahead. preparing to create creating patch events.\r\n", |
| 357 | )?; | 357 | )?; |
| 358 | p.expect("searching for your details...\r\n")?; | 358 | p.expect("searching for profile and relay updates...\r\n")?; |
| 359 | p.expect("\r")?; | 359 | p.expect("\r")?; |
| 360 | p.expect("logged in as fred\r\n")?; | 360 | p.expect("logged in as fred\r\n")?; |
| 361 | p.expect("pushing 1 commits\r\n")?; | 361 | p.expect("pushing 1 commits\r\n")?; |
diff --git a/tests/send.rs b/tests/send.rs index b202d54..6d3e138 100644 --- a/tests/send.rs +++ b/tests/send.rs | |||
| @@ -185,7 +185,7 @@ fn cli_tester_create_pr(git_repo: &GitTestRepo, include_cover_letter: bool) -> C | |||
| 185 | 185 | ||
| 186 | fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { | 186 | fn expect_msgs_first(p: &mut CliTester, include_cover_letter: bool) -> Result<()> { |
| 187 | p.expect("creating patch for 2 commits from 'head' that can be merged into 'main'\r\n")?; | 187 | p.expect("creating patch for 2 commits from 'head' that can be merged into 'main'\r\n")?; |
| 188 | p.expect("searching for your details...\r\n")?; | 188 | p.expect("searching for profile and relay updates...\r\n")?; |
| 189 | p.expect("\r")?; | 189 | p.expect("\r")?; |
| 190 | p.expect("logged in as fred\r\n")?; | 190 | p.expect("logged in as fred\r\n")?; |
| 191 | p.expect(format!( | 191 | p.expect(format!( |