diff options
author | Nur Rony <pro.nmrony@gmail.com> | 2017-04-21 15:05:38 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2017-04-21 15:05:38 +0000 |
commit | b8a63380324e05b0c46fe1ce216c6602fca0ef99 (patch) | |
tree | b7e5ff7238854fbb8bda8c1bb6253261653afc89 /spec | |
parent | c76812c79ffe3ca35b00faeaaf7fa1c362d1d27d (diff) | |
download | gitlab-ce-b8a63380324e05b0c46fe1ce216c6602fca0ef99.tar.gz |
Adding animation for all dropdown
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/merge_requests/create_new_mr_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/merge_requests/versions_spec.rb | 9 | ||||
-rw-r--r-- | spec/features/projects/issuable_templates_spec.rb | 10 |
4 files changed, 16 insertions, 14 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 362d167befa..55eca187f6c 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -414,7 +414,8 @@ describe 'Issues', feature: true do it 'will not send ajax request when no data is changed' do page.within '.labels' do click_link 'Edit' - first('.dropdown-menu-close').click + + find('.dropdown-menu-close', match: :first).click expect(page).not_to have_selector('.block-loading') end diff --git a/spec/features/merge_requests/create_new_mr_spec.rb b/spec/features/merge_requests/create_new_mr_spec.rb index 3a4ec07b2b0..16b09933bda 100644 --- a/spec/features/merge_requests/create_new_mr_spec.rb +++ b/spec/features/merge_requests/create_new_mr_spec.rb @@ -20,13 +20,13 @@ feature 'Create New Merge Request', feature: true, js: true do expect(page).to have_content('Target branch') first('.js-source-branch').click - first('.dropdown-source-branch .dropdown-content a', text: 'v1.1.0').click + find('.dropdown-source-branch .dropdown-content a', match: :first).click expect(page).to have_content "b83d6e3" end it 'selects the target branch sha when a tag with the same name exists' do - visit namespace_project_merge_requests_path(project.namespace, project) + visit namespace_project_merge_requests_path(project.namespace, project) click_link 'New merge request' @@ -46,8 +46,8 @@ feature 'Create New Merge Request', feature: true, js: true do expect(page).to have_content('Source branch') expect(page).to have_content('Target branch') - first('.js-source-branch').click - first('.dropdown-source-branch .dropdown-content a', text: 'orphaned-branch').click + find('.js-source-branch', match: :first).click + find('.dropdown-source-branch .dropdown-content a', text: 'orphaned-branch', match: :first).click click_button "Compare branches" click_link "Changes" diff --git a/spec/features/merge_requests/versions_spec.rb b/spec/features/merge_requests/versions_spec.rb index 68a68f5d3f3..7a2da623c58 100644 --- a/spec/features/merge_requests/versions_spec.rb +++ b/spec/features/merge_requests/versions_spec.rb @@ -107,14 +107,13 @@ feature 'Merge Request versions', js: true, feature: true do it 'should have 0 chages between versions' do page.within '.mr-version-compare-dropdown' do - expect(page).to have_content 'version 1' + expect(find('.dropdown-toggle')).to have_content 'version 1' end page.within '.mr-version-dropdown' do find('.btn-default').click - find(:link, 'version 1').trigger('click') + click_link 'version 1' end - expect(page).to have_content '0 changed files' end end @@ -129,12 +128,12 @@ feature 'Merge Request versions', js: true, feature: true do it 'should set the compared versions to be the same' do page.within '.mr-version-compare-dropdown' do - expect(page).to have_content 'version 2' + expect(find('.dropdown-toggle')).to have_content 'version 2' end page.within '.mr-version-dropdown' do find('.btn-default').click - find(:link, 'version 1').trigger('click') + click_link 'version 1' end page.within '.mr-version-compare-dropdown' do diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index 62d0aedda48..6cdca0f114b 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -163,12 +163,14 @@ feature 'issuable templates', feature: true, js: true do end def select_template(name) - first('.js-issuable-selector').click - first('.js-issuable-selector-wrap .dropdown-content a', text: name).click + find('.js-issuable-selector').click + + find('.js-issuable-selector-wrap .dropdown-content a', text: name, match: :first).click end def select_option(name) - first('.js-issuable-selector').click - first('.js-issuable-selector-wrap .dropdown-footer-list a', text: name).click + find('.js-issuable-selector').click + + find('.js-issuable-selector-wrap .dropdown-footer-list a', text: name, match: :first).click end end |