2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
require "spec_helper"
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe "User deletes branch", :js do
|
2020-04-08 14:13:33 +05:30
|
|
|
let_it_be(:user) { create(:user) }
|
2020-03-13 15:44:24 +05:30
|
|
|
let(:project) { create(:project, :repository) }
|
2018-10-15 14:42:47 +05:30
|
|
|
|
|
|
|
before do
|
|
|
|
project.add_developer(user)
|
|
|
|
sign_in(user)
|
|
|
|
|
|
|
|
visit(project_branches_path(project))
|
|
|
|
end
|
|
|
|
|
|
|
|
it "deletes branch" do
|
|
|
|
fill_in("branch-search", with: "improve/awesome").native.send_keys(:enter)
|
|
|
|
|
|
|
|
page.within(".js-branch-improve\\/awesome") do
|
2021-01-03 14:25:43 +05:30
|
|
|
accept_alert { find(".btn-danger").click }
|
2018-10-15 14:42:47 +05:30
|
|
|
end
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
wait_for_requests
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
expect(page).to have_css(".js-branch-improve\\/awesome", visible: :hidden)
|
|
|
|
end
|
|
|
|
end
|