diff options
author | Robert Speicher <robert@gitlab.com> | 2017-06-12 22:51:30 +0300 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-06-15 19:12:57 +0300 |
commit | 3ae25c5caaa67836600144b5f210ab2d53f866b8 (patch) | |
tree | 5454cd13bb24f31d84fe11c1bc8f953332c24867 /spec/features | |
parent | daff635d75eb47cbe0c801e04e0a79e65f11f446 (diff) |
Merge branch 'rc/load-images-in-phantomjs' into 'master'
Let PhantomJS load local images
See merge request !12003
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/help_pages_spec.rb | 16 | ||||
-rw-r--r-- | spec/features/projects/artifacts/file_spec.rb | 1 |
2 files changed, 6 insertions, 11 deletions
diff --git a/spec/features/help_pages_spec.rb b/spec/features/help_pages_spec.rb index e0b2404e60a..31014f5cad2 100644 --- a/spec/features/help_pages_spec.rb +++ b/spec/features/help_pages_spec.rb @@ -34,7 +34,7 @@ describe 'Help Pages', feature: true do end end - context 'in a production environment with version check enabled', js: true do + context 'in a production environment with version check enabled', :js do before do allow(Rails.env).to receive(:production?) { true } allow(current_application_settings).to receive(:version_check_enabled) { true } @@ -44,18 +44,12 @@ describe 'Help Pages', feature: true do visit help_path end - it 'should display a version check image' do - expect(find('.js-version-status-badge')).to be_visible + it 'has a version check image' do + expect(find('.js-version-status-badge', visible: false)['src']).to end_with('/version-check-url') end - it 'should have a src url' do - expect(find('.js-version-status-badge')['src']).to match(/\/version-check-url/) - end - - it 'should hide the version check image if the image request fails' do - # We use '--load-images=no' with poltergeist so we must trigger manually - execute_script("$('.js-version-status-badge').trigger('error');") - + it 'hides the version check image if the image request fails' do + # We use '--load-images=yes' with poltergeist so the image fails to load expect(find('.js-version-status-badge', visible: false)).not_to be_visible end end diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb index 25c4f3c87a2..860373e531b 100644 --- a/spec/features/projects/artifacts/file_spec.rb +++ b/spec/features/projects/artifacts/file_spec.rb @@ -39,6 +39,7 @@ feature 'Artifact file', :js, feature: true do context 'JPG file' do before do + page.driver.browser.url_blacklist = [] visit_file('rails_sample.jpg') wait_for_requests |