summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/submodule/enter.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-02-12 18:00:45 +1100
committerJesse Duffield <jessedduffield@gmail.com>2023-02-12 18:12:01 +1100
commit3cfdae41165828f9ecb3f3497efd37651a6193d3 (patch)
treedd213af4be195a739fdeab7cbc3d2c3f0fed2818 /pkg/integration/tests/submodule/enter.go
parentd7956c481d51fbb6820e0e4419c87427bbfd12bb (diff)
migrate submodule reset test
Diffstat (limited to 'pkg/integration/tests/submodule/enter.go')
-rw-r--r--pkg/integration/tests/submodule/enter.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/integration/tests/submodule/enter.go b/pkg/integration/tests/submodule/enter.go
index c97e55a46..8dbbb73b4 100644
--- a/pkg/integration/tests/submodule/enter.go
+++ b/pkg/integration/tests/submodule/enter.go
@@ -26,6 +26,15 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
shell.Commit("add submodule")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
+ assertInParentRepo := func() {
+ t.Views().Status().Content(Contains("repo"))
+ }
+ assertInSubmodule := func() {
+ t.Views().Status().Content(Contains("my_submodule"))
+ }
+
+ assertInParentRepo()
+
t.Views().Submodules().Focus().
Lines(
Contains("my_submodule").IsSelected(),
@@ -33,6 +42,8 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
// enter the submodule
PressEnter()
+ assertInSubmodule()
+
t.Views().Files().IsFocused().
Press("e").
Tap(func() {
@@ -41,6 +52,8 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
// return to the parent repo
PressEscape()
+ assertInParentRepo()
+
t.Views().Submodules().IsFocused()
// we see the new commit in the submodule is ready to be staged in the parent repo