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:
authorClement Ho <ClemMakesApps@gmail.com>2017-05-16 22:51:15 +0300
committerClement Ho <ClemMakesApps@gmail.com>2017-05-16 22:51:15 +0300
commit7d07012994be8014da1ce9e4d1857b220322ba41 (patch)
treea5559378fd9de842e65c2516a7971e7ac07ef37f /spec/features/issues/form_spec.rb
parent872777936790205b139e60868f1b530144be9844 (diff)
Fix form spec
Diffstat (limited to 'spec/features/issues/form_spec.rb')
-rw-r--r--spec/features/issues/form_spec.rb20
1 files changed, 8 insertions, 12 deletions
diff --git a/spec/features/issues/form_spec.rb b/spec/features/issues/form_spec.rb
index 7bac9d6db74..5c0907e26df 100644
--- a/spec/features/issues/form_spec.rb
+++ b/spec/features/issues/form_spec.rb
@@ -25,7 +25,7 @@ describe 'New/edit issue', :feature, :js do
end
describe 'single assignee' do
- it 'hides assignee after selection' do
+ before do
click_button 'Unassigned'
wait_for_ajax
@@ -36,14 +36,12 @@ describe 'New/edit issue', :feature, :js do
click_link user2.name
end
+ click_button user2.name
+
page.within '.dropdown-menu-user' do
click_link 'Unassigned'
end
- page.within '.js-assignee-search' do
- expect(page).to have_content 'Unassigned'
- end
-
expect(find('input[name="issue[assignee_ids][]"]', visible: false).value).to match('0')
end
@@ -54,6 +52,8 @@ describe 'New/edit issue', :feature, :js do
expect(find('a', text: 'Assign to me', visible: false)).not_to be_visible
+ click_button user.name
+
page.within('.dropdown-menu-user') do
click_link user.name
end
@@ -161,18 +161,14 @@ describe 'New/edit issue', :feature, :js do
click_link user.name
end
- expect(find('input[name="issue[assignee_ids][]"]', visible: false).value).to match(user.id.to_s)
- expect(find('.dropdown-menu-user a.is-active').first(:xpath, '..')['data-user-id']).to eq(user.id.to_s)
- # check the ::before pseudo element to ensure checkmark icon is present
- expect(before_for_selector('.dropdown-menu-selectable a.is-active')).not_to eq('')
- expect(before_for_selector('.dropdown-menu-selectable a:not(.is-active)')).to eq('')
+ expect(find('.js-assignee-search')).to have_content(user.name)
+ click_button user.name
page.within '.dropdown-menu-user' do
click_link user2.name
end
- expect(find('input[name="issue[assignee_ids][]"]', visible: false).value).to match(user2.id.to_s)
- expect(find('.dropdown-menu-user a.is-active').first(:xpath, '..')['data-user-id']).to eq(user2.id.to_s)
+ expect(find('.js-assignee-search')).to have_content(user2.name)
end
end