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:
authorStan Hu <stanhu@gmail.com>2017-08-13 07:49:56 +0300
committerStan Hu <stanhu@gmail.com>2017-08-13 07:49:56 +0300
commit2901fc1390370a38944cd2c1ea88bf0fd3839a5a (patch)
tree65f54ea2da465a23963b8bef6374ba0b9bb1dda0 /spec/features/projects/branches_spec.rb
parent0d6133b98ded73f6fe4c33e04473bb3f03015ea7 (diff)
Make protected branches spec work in headless Chrome
This needs two patches in Capybara: * https://github.com/teamcapybara/capybara/pull/1902 * https://github.com/teamcapybara/capybara/pull/1903
Diffstat (limited to 'spec/features/projects/branches_spec.rb')
-rw-r--r--spec/features/projects/branches_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb
index b7ceac79c40..26902589c33 100644
--- a/spec/features/projects/branches_spec.rb
+++ b/spec/features/projects/branches_spec.rb
@@ -93,7 +93,11 @@ describe 'Branches' do
expect(page).to have_content('fix')
expect(find('.all-branches')).to have_selector('li', count: 1)
- find('.js-branch-fix .btn-remove').click
+ # To work with Chrome headless, this needs an updated version of
+ # Capybara with two bug fixes:
+ # * https://github.com/teamcapybara/capybara/pull/1902/
+ # * https://github.com/teamcapybara/capybara/pull/1903/
+ accept_alert { find('.js-branch-fix .btn-remove').click }
expect(page).not_to have_content('fix')
expect(find('.all-branches')).to have_selector('li', count: 0)