Skip to content

Commit

Permalink
add test case for decreasing Diff Context length to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
LuxxxLucy authored and jesseduffield committed Nov 18, 2024
1 parent 111407d commit dd76580
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkg/integration/tests/staging/diff_context_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ var DiffContextChange = NewIntegrationTest(NewIntegrationTestArgs{
Contains(`+3b`),
Contains(` 4a`),
).
Press(keys.Universal.DecreaseContextInDiffView).
Tap(func() {
t.ExpectToast(Equals("Changed diff context size to 0"))
}).
SelectedLines(
Contains(`@@ -3,1 +3 @@`),
Contains(`-3a`),
Contains(`+3b`),
).
Press(keys.Universal.IncreaseContextInDiffView).
Tap(func() {
t.ExpectToast(Equals("Changed diff context size to 1"))
}).
SelectedLines(
Contains(`@@ -2,3 +2,3 @@`),
Contains(` 2a`),
Contains(`-3a`),
Contains(`+3b`),
Contains(` 4a`),
).
Press(keys.Universal.IncreaseContextInDiffView).
Tap(func() {
t.ExpectToast(Equals("Changed diff context size to 2"))
Expand Down

0 comments on commit dd76580

Please sign in to comment.