From c841ba82377a06b1ee562c377c2c7ac9319aa6e5 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Mon, 26 Dec 2022 16:49:54 +1100 Subject: add switch-to-view methods --- pkg/integration/tests/cherry_pick/cherry_pick.go | 8 ++++---- pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'pkg/integration/tests/cherry_pick') diff --git a/pkg/integration/tests/cherry_pick/cherry_pick.go b/pkg/integration/tests/cherry_pick/cherry_pick.go index 7ca89f402..e306a016e 100644 --- a/pkg/integration/tests/cherry_pick/cherry_pick.go +++ b/pkg/integration/tests/cherry_pick/cherry_pick.go @@ -24,9 +24,9 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{ Checkout("first-branch") }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { - input.SwitchToBranchesWindow() + input.SwitchToBranchesView() - assert.CurrentView().Name("localBranches").Lines( + assert.CurrentView().Lines( Contains("first-branch"), Contains("second-branch"), Contains("master"), @@ -49,9 +49,9 @@ var CherryPick = NewIntegrationTest(NewIntegrationTestArgs{ input.Press(keys.Commits.CherryPickCopy) assert.View("information").Content(Contains("2 commits copied")) - input.SwitchToCommitsWindow() + input.SwitchToCommitsView() - assert.CurrentView().Name("commits").Lines( + assert.CurrentView().Lines( Contains("two"), Contains("one"), Contains("base"), diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go index 3dfb995e2..2aed02334 100644 --- a/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go +++ b/pkg/integration/tests/cherry_pick/cherry_pick_conflicts.go @@ -15,8 +15,8 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{ shared.MergeConflictsSetup(shell) }, Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { - input.SwitchToBranchesWindow() - assert.CurrentView().Name("localBranches").Lines( + input.SwitchToBranchesView() + assert.CurrentView().Lines( Contains("first-change-branch"), Contains("second-change-branch"), Contains("original-branch"), @@ -38,9 +38,9 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{ input.Press(keys.Commits.CherryPickCopy) assert.View("information").Content(Contains("2 commits copied")) - input.SwitchToCommitsWindow() + input.SwitchToCommitsView() - assert.CurrentView().Name("commits").TopLines( + assert.CurrentView().TopLines( Contains("first change"), ) @@ -66,9 +66,9 @@ var CherryPickConflicts = NewIntegrationTest(NewIntegrationTestArgs{ assert.CurrentView().Name("files") assert.WorkingTreeFileCount(0) - input.SwitchToCommitsWindow() + input.SwitchToCommitsView() - assert.CurrentView().Name("commits").TopLines( + assert.CurrentView().TopLines( Contains("second-change-branch unrelated change"), Contains("second change"), Contains("first change"), -- cgit v1.2.3