mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Add test demonstrating problem with main view display when pressing e
in a stack of branches
We keep the same commit selected (even though its index changed because of the added update-ref todo), which is nice; however, the main view shows the diff of the wrong commit, which is very confusing. I'm suprised that this hasn't been noticed yet. The reason why this happens is that we first do the refresh, which includes re-rendering the main view diff (with the same commit index as before, so the wrong one), and then we restore the correct commit index but don't render the main view again.
This commit is contained in:
parent
14187c9d15
commit
f20b7ea593
1 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,12 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
|||
Contains("<-- YOU ARE HERE --- commit 02").IsSelected(),
|
||||
Contains("CI commit 01"),
|
||||
).
|
||||
Tap(func() {
|
||||
/* EXPECTED:
|
||||
t.Views().Main().Content(Contains("commit 02"))
|
||||
ACTUAL: */
|
||||
t.Views().Main().Content(Contains("commit 03"))
|
||||
}).
|
||||
NavigateToLine(Contains("commit 06")).
|
||||
Press(keys.Universal.Remove)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue