Commit 48dfc670 authored by Clement Ho's avatar Clement Ho

Stub old image diff url

parent 1ed8cf1c
...@@ -13,6 +13,7 @@ feature 'image diff notes', :js do ...@@ -13,6 +13,7 @@ feature 'image diff notes', :js do
# Stub helper to return any blob file as image from public app folder. # Stub helper to return any blob file as image from public app folder.
# This is necessary to run this specs since we don't display repo images in capybara. # This is necessary to run this specs since we don't display repo images in capybara.
allow_any_instance_of(DiffHelper).to receive(:diff_file_blob_raw_url).and_return('/apple-touch-icon.png') allow_any_instance_of(DiffHelper).to receive(:diff_file_blob_raw_url).and_return('/apple-touch-icon.png')
allow_any_instance_of(DiffHelper).to receive(:diff_file_old_blob_raw_url).and_return('/favicon.ico')
end end
context 'create commit diff notes' do context 'create commit diff notes' do
...@@ -192,7 +193,7 @@ feature 'image diff notes', :js do ...@@ -192,7 +193,7 @@ feature 'image diff notes', :js do
it 'resizes image in onion skin view mode' do it 'resizes image in onion skin view mode' do
find('.view-modes-menu .onion-skin').click find('.view-modes-menu .onion-skin').click
expect(find('.onion-skin-frame')['style']).to match('width: 243px; height: 240px;') expect(find('.onion-skin-frame')['style']).to match('width: 228px; height: 240px;')
end end
it 'resets onion skin view mode opacity when toggling between view modes' do it 'resets onion skin view mode opacity when toggling between view modes' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment