diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-10-16 16:26:01 +0900 |
---|---|---|
committer | Ryooooooga <eial5q265e5@gmail.com> | 2022-10-16 16:26:17 +0900 |
commit | 2ec0b671e660b8a7d505a7ffb24a171cea6d8dde (patch) | |
tree | 5d86b60075193820574850e881ec94373023d255 /pkg | |
parent | 3103398e317d77f7fef4e9b66d87e118cb7b9e52 (diff) |
test: update stash/rename integration test
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/integration/tests/stash/rename.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkg/integration/tests/stash/rename.go b/pkg/integration/tests/stash/rename.go index 97cfae006..761d7135b 100644 --- a/pkg/integration/tests/stash/rename.go +++ b/pkg/integration/tests/stash/rename.go @@ -13,7 +13,9 @@ var Rename = NewIntegrationTest(NewIntegrationTestArgs{ SetupRepo: func(shell *Shell) { shell. EmptyCommit("blah"). - CreateFileAndAdd("foo", "change to stash"). + CreateFileAndAdd("file-1", "change to stash1"). + StashWithMessage("foo"). + CreateFileAndAdd("file-2", "change to stash2"). StashWithMessage("bar") }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { @@ -21,13 +23,15 @@ var Rename = NewIntegrationTest(NewIntegrationTestArgs{ assert.CurrentViewName("stash") assert.MatchSelectedLine(Equals("On master: bar")) + input.NextItem() + assert.MatchSelectedLine(Equals("On master: foo")) input.PressKeys(keys.Stash.RenameStash) assert.InPrompt() - assert.MatchCurrentViewTitle(Equals("Rename stash: stash@{0}")) + assert.MatchCurrentViewTitle(Equals("Rename stash: stash@{1}")) input.Type(" baz") input.Confirm() - assert.MatchSelectedLine(Equals("On master: bar baz")) + assert.MatchSelectedLine(Equals("On master: foo baz")) }, }) |