2016-04-05 18:01:13 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-10-03 08:35:01 +00:00
|
|
|
feature 'Toggle Whitespace Changes', :js do
|
2016-04-05 18:01:13 +00:00
|
|
|
before do
|
2017-06-21 23:44:10 +00:00
|
|
|
sign_in(create(:admin))
|
2016-04-07 18:15:28 +00:00
|
|
|
merge_request = create(:merge_request)
|
|
|
|
project = merge_request.source_project
|
2017-07-06 16:20:50 +00:00
|
|
|
visit diffs_project_merge_request_path(project, merge_request)
|
2016-04-05 18:01:13 +00:00
|
|
|
end
|
|
|
|
|
2016-04-07 17:57:51 +00:00
|
|
|
it 'has a button to toggle whitespace changes' do
|
2016-04-12 17:49:34 +00:00
|
|
|
expect(page).to have_content 'Hide whitespace changes'
|
2016-04-05 18:01:13 +00:00
|
|
|
end
|
|
|
|
|
2016-04-05 21:09:49 +00:00
|
|
|
describe 'clicking "Hide whitespace changes" button' do
|
2016-04-07 17:57:51 +00:00
|
|
|
it 'toggles the "Hide whitespace changes" button' do
|
2016-04-12 17:49:34 +00:00
|
|
|
click_link 'Hide whitespace changes'
|
|
|
|
|
|
|
|
expect(page).to have_content 'Show whitespace changes'
|
2016-04-05 18:01:13 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|