Skip to content

Commit

Permalink
Merge pull request #3154 from OregonDigital/fix_dig_obj_behavior
Browse files Browse the repository at this point in the history
method call typo
  • Loading branch information
wickr authored Sep 4, 2024
2 parents 8fec838 + 5056358 commit c300c8f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def push(ado)
end

def format_result
@result[:errors] = errors
result[:errors] = errors
JSON.generate(@result)
end

Expand Down
18 changes: 8 additions & 10 deletions spec/system/create_audio_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
attach_file('files[]', upload_file_path, visible: false)
end

within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#audio_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'audio_admin_set_id')
within('ul.nav-tabs') do
click_link 'Descriptions' # switch tab
end
Expand All @@ -60,17 +55,20 @@
# select('In Copyright', from: 'Rights statement')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click
within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#audio_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'audio_admin_set_id')
find('#required-metadata').click

choose('audio_visibility_open')
expect(page).to have_content('Make available to all.')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

check('agreement', visible: false)
# Selenium/chrome on CircleCI requires the focus to change after the previous method
check('agreement', visible: false) if find('#agreement').visible?
find('#required-metadata').click

click_on 'Save'
click_on('Save')
expect(page).to have_content('Test Title')
expect(page).to have_content "Your files are being processed by #{I18n.t('hyrax.product_name')} in the background."
expect(page).to be_accessible.skipping('aria-allowed-role').excluding('.label-success')
Expand Down
18 changes: 8 additions & 10 deletions spec/system/create_document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
page.execute_script("$('input[type=file]').css('position','inherit')")
attach_file('files[]', upload_file_path, visible: false)
end
within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#document_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'document_admin_set_id')

within('ul.nav-tabs') do
click_link 'Descriptions' # switch tab
end
Expand All @@ -56,16 +52,18 @@
select('In Copyright', from: 'Rights')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#document_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'document_admin_set_id')
find('#required-metadata').click
choose('document_visibility_open')
expect(page).to have_content('Make available to all.')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

check('agreement', visible: false)
# Selenium/chrome on CircleCI requires the focus to change after the previous method
check('agreement', visible: false) if find('#agreement').visible?
find('#required-metadata').click

click_on 'Save'
expect(page).to have_content('Test Title')
expect(page).to have_content "Your files are being processed by #{I18n.t('hyrax.product_name')} in the background."
Expand Down
17 changes: 7 additions & 10 deletions spec/system/create_generic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
page.execute_script("$('input[type=file]').css('position','inherit')")
attach_file('files[]', upload_file_path, visible: false)
end
within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#generic_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'generic_admin_set_id')
within('ul.nav-tabs') do
click_link 'Descriptions' # switch tab
end
Expand All @@ -57,16 +52,18 @@

# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#generic_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'generic_admin_set_id')
find('#required-metadata').click
choose('generic_visibility_open')
expect(page).to have_content('Make available to all.')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

check('agreement', visible: false)
# Selenium/chrome on CircleCI requires the focus to change after the previous method
check('agreement', visible: false) if find('#agreement').visible?
find('#required-metadata').click

click_on 'Save'
expect(page).to have_content('Test Title')
expect(page).to have_content "Your files are being processed by #{I18n.t('hyrax.product_name')} in the background."
Expand Down
17 changes: 7 additions & 10 deletions spec/system/create_image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
page.execute_script("$('input[type=file]').css('position','inherit')")
attach_file('files[]', upload_file_path, visible: false)
end
within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#image_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'image_admin_set_id')
within('ul.nav-tabs') do
click_link 'Descriptions' # switch tab
end
Expand All @@ -56,16 +51,18 @@
end
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#image_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'image_admin_set_id')
find('#required-metadata').click
choose('image_visibility_open')
expect(page).to have_content('Make available to all.')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

check('agreement', visible: false)
# Selenium/chrome on CircleCI requires the focus to change after the previous method
check('agreement', visible: false) if find('#agreement').visible?
find('#required-metadata').click

click_on 'Save'
expect(page).to have_content('Test Title')
expect(page).to have_content "Your files are being processed by #{I18n.t('hyrax.product_name')} in the background."
Expand Down
17 changes: 7 additions & 10 deletions spec/system/create_video_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
page.execute_script("$('input[type=file]').css('position','inherit')")
attach_file('files[]', upload_file_path, visible: false)
end
within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#video_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'video_admin_set_id')
within('ul.nav-tabs') do
click_link 'Descriptions' # switch tab
end
Expand All @@ -56,16 +51,18 @@
end
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

within('ul.nav-tabs') do
click_link 'Relationships'
end
first_element = find('#video_admin_set_id > option:nth-child(2)').text
select(first_element, from: 'video_admin_set_id')
find('#required-metadata').click
choose('video_visibility_open')
expect(page).to have_content('Make available to all.')
# Selenium/chrome on CircleCI requires the focus to change after the previous method
find('#required-metadata').click

check('agreement', visible: false)
# Selenium/chrome on CircleCI requires the focus to change after the previous method
check('agreement', visible: false) if find('#agreement').visible?
find('#required-metadata').click

click_on 'Save'
expect(page).to have_content('Test Title')
expect(page).to have_content "Your files are being processed by #{I18n.t('hyrax.product_name')} in the background."
Expand Down

0 comments on commit c300c8f

Please sign in to comment.