(t *TestDriver, keys config.KeybindingConfig)
| 21 | } |
| 22 | |
| 23 | func doTheRebaseForAmendTests(t *TestDriver, keys config.KeybindingConfig) { |
| 24 | t.Views().Commits(). |
| 25 | Focus(). |
| 26 | Lines( |
| 27 | Contains("commit three").IsSelected(), |
| 28 | Contains("file1 changed in branch"), |
| 29 | Contains("commit two"), |
| 30 | Contains("base commit"), |
| 31 | ) |
| 32 | t.Views().Branches(). |
| 33 | Focus(). |
| 34 | NavigateToLine(Contains("master")). |
| 35 | Press(keys.Branches.RebaseBranch). |
| 36 | Tap(func() { |
| 37 | t.ExpectPopup().Menu(). |
| 38 | Title(Equals("Rebase 'branch'")). |
| 39 | Select(Contains("Simple rebase")). |
| 40 | Confirm() |
| 41 | t.Common().AcknowledgeConflicts() |
| 42 | }) |
| 43 | |
| 44 | t.Views().Commits(). |
| 45 | Lines( |
| 46 | Contains("--- Pending rebase todos ---"), |
| 47 | Contains("pick").Contains("commit three"), |
| 48 | Contains("pick").Contains("<-- CONFLICT --- file1 changed in branch"), |
| 49 | Contains("--- Commits ---"), |
| 50 | Contains("commit two"), |
| 51 | Contains("file1 changed in master"), |
| 52 | Contains("base commit"), |
| 53 | ) |
| 54 | |
| 55 | t.Views().Files(). |
| 56 | Focus(). |
| 57 | PressEnter() |
| 58 | |
| 59 | t.Views().MergeConflicts(). |
| 60 | IsFocused(). |
| 61 | SelectNextItem(). // choose "incoming" |
| 62 | PressPrimaryAction() |
| 63 | |
| 64 | t.ExpectPopup().Confirmation(). |
| 65 | Title(Equals("Continue")). |
| 66 | Content(Contains("All merge conflicts resolved. Continue the rebase?")). |
| 67 | Cancel() |
| 68 | } |
| 69 | |
| 70 | func checkCommitContainsChange(t *TestDriver, commitSubject string, change string) { |
| 71 | t.Views().Commits(). |
no test coverage detected