summaryrefslogtreecommitdiff
path: root/spec/features/protected_branches_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/protected_branches_spec.rb')
-rw-r--r--spec/features/protected_branches_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/protected_branches_spec.rb b/spec/features/protected_branches_spec.rb
index eb099359df9..207b74c990a 100644
--- a/spec/features/protected_branches_spec.rb
+++ b/spec/features/protected_branches_spec.rb
@@ -24,8 +24,8 @@ RSpec.describe 'Protected Branches', :js do
it 'does not allow developer to removes protected branch' do
visit project_branches_path(project)
- fill_in 'branch-search', with: 'fix'
- find('#branch-search').native.send_keys(:enter)
+ find('input[data-testid="branch-search"]').set('fix')
+ find('input[data-testid="branch-search"]').native.send_keys(:enter)
expect(page).to have_css('.btn-danger.disabled')
end
@@ -47,8 +47,8 @@ RSpec.describe 'Protected Branches', :js do
it 'removes branch after modal confirmation' do
visit project_branches_path(project)
- fill_in 'branch-search', with: 'fix'
- find('#branch-search').native.send_keys(:enter)
+ find('input[data-testid="branch-search"]').set('fix')
+ find('input[data-testid="branch-search"]').native.send_keys(:enter)
expect(page).to have_content('fix')
expect(find('.all-branches')).to have_selector('li', count: 1)
@@ -58,8 +58,8 @@ RSpec.describe 'Protected Branches', :js do
fill_in 'delete_branch_input', with: 'fix'
click_link 'Delete protected branch'
- fill_in 'branch-search', with: 'fix'
- find('#branch-search').native.send_keys(:enter)
+ find('input[data-testid="branch-search"]').set('fix')
+ find('input[data-testid="branch-search"]').native.send_keys(:enter)
expect(page).to have_content('No branches to show')
end