gitlab-org--gitlab-foss/spec/features/projects/branches/user_views_branches_spec.rb
Lin Jen-Shin b502d90a9f Adapt that diverging commits could be just one bar
refactors the ui for diverging commits so that it's only a single
bar instead of two separate bars
2019-02-11 10:44:06 -08:00

36 lines
837 B
Ruby

require "spec_helper"
describe "User views branches" do
set(:project) { create(:project, :repository) }
set(:user) { project.owner }
before do
sign_in(user)
end
context "all branches" do
before do
visit(project_branches_path(project))
end
it "shows branches" do
expect(page).to have_content("Branches").and have_content("master")
expect(page.all(".graph-side")).to all( have_content(/\d+/) )
end
end
context "protected branches" do
set(:protected_branch) { create(:protected_branch, project: project) }
before do
visit(project_protected_branches_path(project))
end
it "shows branches" do
page.within(".protected-branches-list") do
expect(page).to have_content(protected_branch.name).and have_no_content("master")
end
end
end
end