diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/features/projects/branches/user_views_branches_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/features/projects/branches/user_views_branches_spec.rb')
-rw-r--r-- | spec/features/projects/branches/user_views_branches_spec.rb | 11 |
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 |