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

Default chrome fix specs #3337

Merged
merged 10 commits into from
Dec 11, 2024
12 changes: 2 additions & 10 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,9 @@ jobs:
BOOTSTRAP_VERSION: ${{ matrix.bootstrap_version }}
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test --css bootstrap ${{ matrix.additional_engine_cart_rails_options }}"
steps:
- name: Install ImageMagick
run: sudo apt install imagemagick
- uses: actions/checkout@v4
# Remove these Chrome steps after https://issues.chromium.org/issues/351858989 is fixed
- name: Setup a specific version of Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: 126
install-chromedriver: true
install-dependencies: true
- name: Set CHROME_BIN environment variable
run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/spotlight/bulk_updates_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

content = CSV.parse(response.body)
expect(content.length).to eq 56
expect(content.length).to eq(56)
expect(content[0]).to eq ['Item ID', 'Item Title', 'Visibility']
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/features/autocomplete_typeahead_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
expect(page).to have_css('.leaflet-container', visible: true)

click_button 'Save changes'
sleep 1 # Test fails without this after move to Propshaft.
sleep 2 # Test fails without this after move to Propshaft.

featured_image = Spotlight::FeaturedImage.last

Expand All @@ -40,7 +40,7 @@
check 'Show background image in masthead'

fill_in_typeahead_field(with: 'xd327cm9378', type: 'featured-image')
sleep 1 # HACK: that seems to mysteriously work.
sleep 2 # HACK: that seems to mysteriously work.

expect(page).to have_css('[data-panel-image-pagination]', text: /Image 1 of 2/, visible: true)

Expand Down
2 changes: 1 addition & 1 deletion spec/features/javascript/edit_in_place_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
end
end

it 'updates the metadata label' do
it 'updates the metadata label', default_max_wait_time: 10 do
visit spotlight.exhibit_dashboard_path(exhibit)

within '#sidebar' do
Expand Down
4 changes: 4 additions & 0 deletions spec/features/javascript/feature_page_admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
end

it 'stays in curation mode if a user has unsaved data' do
skip('Chromedriver automatically dismisses alerts so this test does not work')

visit spotlight.edit_exhibit_feature_page_path(page1.exhibit, page1)

fill_in('Title', with: 'Some Fancy Title')
Expand All @@ -66,6 +68,8 @@
end

it 'stays in curation mode if a user has unsaved contenteditable data' do
skip('Chromedriver automatically dismisses alerts so this test does not work')

visit spotlight.edit_exhibit_feature_page_path(page1.exhibit, page1)

add_widget 'solr_documents'
Expand Down
Loading