diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 15:06:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-22 15:06:39 +0000 |
commit | 68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4 (patch) | |
tree | f592f2a5fed915184154ffd05e4e44298a192207 /spec/features | |
parent | 4db9eeb44af5644eb1d080b4ccf4aff8b90656b9 (diff) | |
download | gitlab-ce-68b6846fa6c7b630cc8dab7a8474dcc34e4d67d4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/tags/user_edits_tags_spec.rb | 12 | ||||
-rw-r--r-- | spec/features/tags/developer_deletes_tag_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/tags/developer_updates_tag_spec.rb | 4 |
3 files changed, 10 insertions, 14 deletions
diff --git a/spec/features/projects/tags/user_edits_tags_spec.rb b/spec/features/projects/tags/user_edits_tags_spec.rb index 63f97eeb4e0..b1cb7685f63 100644 --- a/spec/features/projects/tags/user_edits_tags_spec.rb +++ b/spec/features/projects/tags/user_edits_tags_spec.rb @@ -21,23 +21,21 @@ describe 'Project > Tags', :js do context 'page with tags list' do it 'shows tag name' do - page.within first('.tags > .content-list > li') do - expect(page.find('.row-main-content')).to have_content 'v1.1.0 Version 1.1.0' - end + expect(page).to have_content 'v1.1.0 Version 1.1.0' end it 'shows tag edit button' do - page.within first('.tags > .content-list > li') do - edit_btn = page.find('.row-fixed-content.controls a.btn-edit') + page.within '.tags > .content-list' do + edit_btn = page.find("li > .row-fixed-content.controls a.btn-edit[href='/#{project.full_path}/-/tags/v1.1.0/release/edit']") - expect(edit_btn['href']).to have_content '/tags/v1.1.0/release/edit' + expect(edit_btn['href']).to end_with("/#{project.full_path}/-/tags/v1.1.0/release/edit") end end end context 'edit tag release notes' do before do - find('.tags > .content-list > li:first-child .row-fixed-content.controls a.btn-edit').click + page.find("li > .row-fixed-content.controls a.btn-edit[href='/#{project.full_path}/-/tags/v1.1.0/release/edit']").click end it 'shows tag name header' do diff --git a/spec/features/tags/developer_deletes_tag_spec.rb b/spec/features/tags/developer_deletes_tag_spec.rb index 0fc62a578f9..50eac8ddaed 100644 --- a/spec/features/tags/developer_deletes_tag_spec.rb +++ b/spec/features/tags/developer_deletes_tag_spec.rb @@ -17,7 +17,7 @@ describe 'Developer deletes tag' do it 'deletes the tag' do expect(page).to have_content 'v1.1.0' - delete_first_tag + delete_tag 'v1.1.0' expect(page).not_to have_content 'v1.1.0' end @@ -46,15 +46,15 @@ describe 'Developer deletes tag' do end it 'shows the error message' do - delete_first_tag + delete_tag 'v1.1.0' expect(page).to have_content('Do not delete tags') end end - def delete_first_tag + def delete_tag(tag) page.within('.content') do - accept_confirm { first('.btn-remove').click } + accept_confirm { find("li > .row-fixed-content.controls a.btn-remove[href='/#{project.full_path}/-/tags/#{tag}']").click } end end end diff --git a/spec/features/tags/developer_updates_tag_spec.rb b/spec/features/tags/developer_updates_tag_spec.rb index 0cdd953b9ae..167079c3f31 100644 --- a/spec/features/tags/developer_updates_tag_spec.rb +++ b/spec/features/tags/developer_updates_tag_spec.rb @@ -15,9 +15,7 @@ describe 'Developer updates tag' do context 'from the tags list page' do it 'updates the release notes' do - page.within(first('.content-list .controls')) do - click_link 'Edit release notes' - end + find("li > .row-fixed-content.controls a.btn-edit[href='/#{project.full_path}/-/tags/v1.1.0/release/edit']").click fill_in 'release_description', with: 'Awesome release notes' click_button 'Save changes' |