summaryrefslogtreecommitdiffstats
path: root/pkg/integration/tests/worktree
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-07-29 17:30:40 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-07-30 18:35:36 +1000
commit91909331b54b953ae64d030942a4787794713b9e (patch)
tree4b9257cf54167d454a1dcb10cc99a544bfba7680 /pkg/integration/tests/worktree
parentf31e213edc3e15b080efc13ec86aa2b3fe74e68e (diff)
Fix flakey worktree tests
In the presentation layer, when showing branches, we'll show worktrees against branches if they're associated. But there was a race condition: if the worktree model was refreshed after the branches model, it wouldn't be used in the presentation layer when it came time to render the branches. A better solution would be to have some way of signalling that a particular context needs to be refreshed and after all the models are done being refreshed, we then refresh the contexts. This will prevent double-renders
Diffstat (limited to 'pkg/integration/tests/worktree')
-rw-r--r--pkg/integration/tests/worktree/detach_worktree_from_branch.go2
-rw-r--r--pkg/integration/tests/worktree/remove_worktree_from_branch.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/integration/tests/worktree/detach_worktree_from_branch.go b/pkg/integration/tests/worktree/detach_worktree_from_branch.go
index 4dd3c23fd..09b3146e5 100644
--- a/pkg/integration/tests/worktree/detach_worktree_from_branch.go
+++ b/pkg/integration/tests/worktree/detach_worktree_from_branch.go
@@ -35,7 +35,7 @@ var DetachWorktreeFromBranch = NewIntegrationTest(NewIntegrationTestArgs{
}).
Lines(
Contains("mybranch"),
- Contains("newbranch").DoesNotContain("(worktree").IsSelected(),
+ Contains("newbranch").DoesNotContain("(worktree)").IsSelected(),
)
t.Views().Worktrees().
diff --git a/pkg/integration/tests/worktree/remove_worktree_from_branch.go b/pkg/integration/tests/worktree/remove_worktree_from_branch.go
index 06c729edb..2885f5669 100644
--- a/pkg/integration/tests/worktree/remove_worktree_from_branch.go
+++ b/pkg/integration/tests/worktree/remove_worktree_from_branch.go
@@ -46,7 +46,7 @@ var RemoveWorktreeFromBranch = NewIntegrationTest(NewIntegrationTestArgs{
}).
Lines(
Contains("mybranch"),
- Contains("newbranch").DoesNotContain("(worktree").IsSelected(),
+ Contains("newbranch").DoesNotContain("(worktree)").IsSelected(),
)
t.Views().Worktrees().