diff options
Diffstat (limited to 'spec/features/tags/maintainer_deletes_protected_tag_spec.rb')
-rw-r--r-- | spec/features/tags/maintainer_deletes_protected_tag_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/features/tags/maintainer_deletes_protected_tag_spec.rb b/spec/features/tags/maintainer_deletes_protected_tag_spec.rb index ce518b962cd..67f6862502c 100644 --- a/spec/features/tags/maintainer_deletes_protected_tag_spec.rb +++ b/spec/features/tags/maintainer_deletes_protected_tag_spec.rb @@ -19,7 +19,10 @@ RSpec.describe 'Maintainer deletes protected tag', :js, feature_category: :sourc it 'deletes the tag' do expect(page).to have_content "#{tag_name} protected" - page.find('.content .flex-row', text: tag_name).find('.js-delete-tag-button').click + page.within('[data-testid="tag-row"]', text: tag_name) do + click_button('Delete tag') + end + assert_modal_content(tag_name) confirm_delete_tag(tag_name) @@ -35,7 +38,7 @@ RSpec.describe 'Maintainer deletes protected tag', :js, feature_category: :sourc it 'deletes the tag' do expect(page).to have_current_path(project_tag_path(project, tag_name), ignore_query: true) - page.find('.js-delete-tag-button').click + click_button('Delete tag') assert_modal_content(tag_name) confirm_delete_tag(tag_name) |