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