Skip to content

Commit

Permalink
Fix test user
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Oct 9, 2024
1 parent c434e98 commit e14a27f
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions helpers/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,27 @@ def ensure_test_user_exists

click_on 'Create Account', match: :first

if page.has_text? "Username - Username 'test' is already in use"
visit STAFF_URL

return nil
end

visit "#{STAFF_URL}/users/manage_access"

row = find('tr', text: 'test')
rows = all('tr', text: 'test')
expect(rows.length).to eq 1

within row do
within rows[0] do
click_on 'Edit Groups'
end

check 'repository-advanced-data-entry'
click_on 'Update Account'
unless find('#repository-advanced-data-entry').checked?
check 'repository-advanced-data-entry'
click_on 'Update Account'
end

visit STAFF_URL
end

def find_user_table_row_in_manage_user_access_page(username)
Expand Down

0 comments on commit e14a27f

Please sign in to comment.