Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method call typo #3154

Merged
merged 5 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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