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:
authorTimothy Andrew <mail@timothyandrew.net>2016-07-25 13:09:15 +0300
committerTimothy Andrew <mail@timothyandrew.net>2016-07-29 12:50:39 +0300
commit88fd401d599f94bc4ea572cd47afa7d12c484db2 (patch)
treef8ee62935444ad5b07ddf3743be14a4303dc2e9f /spec/features/protected_branches_spec.rb
parenta72d4491903ad4f6730565df6391667e8ba8b71f (diff)
Implement review comments from @axil.
1. Align "Allowed to Merge" and "Allowed to Push" dropdowns. 2. Don't display a flash every time a protected branch is updated. Previously, we were using this so the test has something to hook onto before the assertion. Now we're using `wait_for_ajax` instead.
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r--spec/features/protected_branches_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb
index d72b62a4962..dac2bcf9efd 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -1,6 +1,8 @@
require 'spec_helper'
feature 'Projected Branches', feature: true, js: true do
+ include WaitForAjax
+
let(:user) { create(:user, :admin) }
let(:project) { create(:project) }
@@ -109,7 +111,7 @@ feature 'Projected Branches', feature: true, js: true do
within('.dropdown-menu.push') { click_on access_type_name }
end
- expect(page).to have_content "Updated protected branch"
+ wait_for_ajax
expect(ProtectedBranch.last.allowed_to_push).to eq(access_type_id)
end
end
@@ -140,7 +142,7 @@ feature 'Projected Branches', feature: true, js: true do
within('.dropdown-menu.merge') { click_on access_type_name }
end
- expect(page).to have_content "Updated protected branch"
+ wait_for_ajax
expect(ProtectedBranch.last.allowed_to_merge).to eq(access_type_id)
end
end