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
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/branches/user_views_branches_spec.rb')
-rw-r--r--spec/features/projects/branches/user_views_branches_spec.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/features/projects/branches/user_views_branches_spec.rb b/spec/features/projects/branches/user_views_branches_spec.rb
index 19d96579785..d0c0a0860d9 100644
--- a/spec/features/projects/branches/user_views_branches_spec.rb
+++ b/spec/features/projects/branches/user_views_branches_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User views branches" do
+RSpec.describe "User views branches", :js do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
@@ -10,9 +10,12 @@ RSpec.describe "User views branches" do
sign_in(user)
end
- context "all branches" do
+ context "all branches", :js do
before do
visit(project_branches_path(project))
+ branch_search = find('input[data-testid="branch-search"]')
+ branch_search.set('master')
+ branch_search.native.send_keys(:enter)
end
it "shows branches" do
@@ -20,6 +23,10 @@ RSpec.describe "User views branches" do
expect(page.all(".graph-side")).to all( have_content(/\d+/) )
end
+
+ it "displays a disabled button with a tooltip for the default branch that cannot be deleted", :js do
+ expect(page).to have_button('The default branch cannot be deleted', disabled: true)
+ end
end
context "protected branches" do