Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/branches/show.rb10
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb4
2 files changed, 3 insertions, 11 deletions
diff --git a/qa/qa/page/project/branches/show.rb b/qa/qa/page/project/branches/show.rb
index ba00ecbd535..368e7ac7448 100644
--- a/qa/qa/page/project/branches/show.rb
+++ b/qa/qa/page/project/branches/show.rb
@@ -29,7 +29,7 @@ module QA
def has_no_branch?(branch_name)
within_element(:all_branches) do
- has_no_css?(".js-branch-#{branch_name}")
+ has_no_css?(".js-branch-#{branch_name}", wait: Support::Waiter::DEFAULT_MAX_WAIT_TIME)
end
end
@@ -46,14 +46,6 @@ module QA
click_element(:delete_merged_branches)
end
end
-
- def wait_for_branch_not_present(branch_name)
- branch_not_present = wait(reload: false) do
- has_no_branch?(branch_name)
- end
-
- raise "Expected branch `#{branch_name}` not to be present" unless branch_not_present
- end
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
index ac6458385d9..20793c82d20 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb
@@ -72,7 +72,7 @@ module QA
Page::Project::Branches::Show.perform do |branches_view|
branches_view.delete_branch(third_branch)
- branches_view.wait_for_branch_not_present(third_branch)
+ expect(branches_view).to have_no_branch(third_branch)
end
Page::Project::Branches::Show.perform(&:delete_merged_branches)
@@ -83,7 +83,7 @@ module QA
page.refresh
Page::Project::Branches::Show.perform do |branches_view|
- branches_view.wait_for_branch_not_present(second_branch)
+ expect(branches_view).to have_no_branch(second_branch)
end
end
end