summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/submodule/enter.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/integration/tests/submodule/enter.go')
-rw-r--r--pkg/integration/tests/submodule/enter.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/integration/tests/submodule/enter.go b/pkg/integration/tests/submodule/enter.go
index 7b055c2b6..29e983b7f 100644
--- a/pkg/integration/tests/submodule/enter.go
+++ b/pkg/integration/tests/submodule/enter.go
@@ -20,7 +20,7 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
},
SetupRepo: func(shell *Shell) {
shell.EmptyCommit("first commit")
- shell.CloneIntoSubmodule("my_submodule")
+ shell.CloneIntoSubmodule("my_submodule_name", "my_submodule_path")
shell.GitAddAll()
shell.Commit("add submodule")
},
@@ -29,14 +29,18 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Status().Content(Contains("repo"))
}
assertInSubmodule := func() {
- t.Views().Status().Content(Contains("my_submodule"))
+ if t.Git().Version().IsAtLeast(2, 22, 0) {
+ t.Views().Status().Content(Contains("my_submodule_path(my_submodule_name)"))
+ } else {
+ t.Views().Status().Content(Contains("my_submodule_path"))
+ }
}
assertInParentRepo()
t.Views().Submodules().Focus().
Lines(
- Contains("my_submodule").IsSelected(),
+ Contains("my_submodule_name").IsSelected(),
).
// enter the submodule
PressEnter()
@@ -60,7 +64,7 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
t.Views().Files().Focus().
Lines(
- MatchesRegexp(` M.*my_submodule \(submodule\)`).IsSelected(),
+ MatchesRegexp(` M.*my_submodule_path \(submodule\)`).IsSelected(),
).
Tap(func() {
// main view also shows the new commit when we're looking at the submodule within the files view