diff options
author | Bryce Johnson <bryce@gitlab.com> | 2017-06-16 19:01:51 -0400 |
---|---|---|
committer | Bryce Johnson <bryce@gitlab.com> | 2017-06-16 19:04:21 -0400 |
commit | 6df66edad9330402a49626c60d8992c6e7b3c3f8 (patch) | |
tree | 6c099489cab3e415d109a024495ca4152d97a8d1 | |
parent | ad521bde1bb556709edd39d8a9aa67ee47605b91 (diff) | |
download | gitlab-ce-convert-dropdown_assignee_spec.tar.gz |
Remove unit tests from dropdown_assignee_spec.rb.convert-dropdown_assignee_spec
[ci-skip]
-rw-r--r-- | spec/features/issues/filtered_search/dropdown_assignee_spec.rb | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb index 44353d880c2..85af05a5122 100644 --- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb @@ -29,45 +29,6 @@ describe 'Dropdown assignee', :feature, :js do visit namespace_project_issues_path(project.namespace, project) end - describe 'behavior' do - it 'opens when the search bar has assignee:' do - filtered_search.set('assignee:') - - expect(page).to have_css(js_dropdown_assignee, visible: true) - end - - it 'closes when the search bar is unfocused' do - find('body').click() - - expect(page).to have_css(js_dropdown_assignee, visible: false) - end - - it 'should show loading indicator when opened' do - filtered_search.set('assignee:') - - expect(page).to have_css('#js-dropdown-assignee .filter-dropdown-loading', visible: true) - end - - it 'should hide loading indicator when loaded' do - filtered_search.set('assignee:') - - expect(find(js_dropdown_assignee)).to have_css('.filter-dropdown-loading') - expect(find(js_dropdown_assignee)).not_to have_css('.filter-dropdown-loading') - end - - it 'should load all the assignees when opened' do - filtered_search.set('assignee:') - - expect(dropdown_assignee_size).to eq(4) - end - - it 'shows current user at top of dropdown' do - filtered_search.set('assignee:') - - expect(filter_dropdown.first('.filter-dropdown-item')).to have_content(user.name) - end - end - describe 'filtering' do before do filtered_search.set('assignee:') @@ -126,82 +87,6 @@ describe 'Dropdown assignee', :feature, :js do end end - describe 'selecting from dropdown' do - before do - filtered_search.set('assignee:') - end - - it 'fills in the assignee username when the assignee has not been filtered' do - click_assignee(user_jacob.name) - - expect(page).to have_css(js_dropdown_assignee, visible: false) - expect_tokens([{ name: 'assignee', value: "@#{user_jacob.username}" }]) - expect_filtered_search_input_empty - end - - it 'fills in the assignee username when the assignee has been filtered' do - filtered_search.send_keys('roo') - click_assignee(user.name) - - expect(page).to have_css(js_dropdown_assignee, visible: false) - expect_tokens([{ name: 'assignee', value: "@#{user.username}" }]) - expect_filtered_search_input_empty - end - - it 'selects `no assignee`' do - find('#js-dropdown-assignee .filter-dropdown-item', text: 'No Assignee').click - - expect(page).to have_css(js_dropdown_assignee, visible: false) - expect_tokens([{ name: 'assignee', value: 'none' }]) - expect_filtered_search_input_empty - end - end - - describe 'selecting from dropdown without Ajax call' do - before do - Gitlab::Testing::RequestBlockerMiddleware.block_requests! - filtered_search.set('assignee:') - end - - after do - Gitlab::Testing::RequestBlockerMiddleware.allow_requests! - end - - it 'selects current user' do - find('#js-dropdown-assignee .filter-dropdown-item', text: user.username).click - - expect(page).to have_css(js_dropdown_assignee, visible: false) - expect_tokens([{ name: 'assignee', value: user.username }]) - expect_filtered_search_input_empty - end - end - - describe 'input has existing content' do - it 'opens assignee dropdown with existing search term' do - filtered_search.set('searchTerm assignee:') - - expect(page).to have_css(js_dropdown_assignee, visible: true) - end - - it 'opens assignee dropdown with existing author' do - filtered_search.set('author:@user assignee:') - - expect(page).to have_css(js_dropdown_assignee, visible: true) - end - - it 'opens assignee dropdown with existing label' do - filtered_search.set('label:~bug assignee:') - - expect(page).to have_css(js_dropdown_assignee, visible: true) - end - - it 'opens assignee dropdown with existing milestone' do - filtered_search.set('milestone:%v1.0 assignee:') - - expect(page).to have_css(js_dropdown_assignee, visible: true) - end - end - describe 'caching requests' do it 'caches requests after the first load' do filtered_search.set('assignee') |