gitlab-org--gitlab-foss/spec/features/merge_requests/toggle_whitespace_changes_spec.rb

23 lines
643 B
Ruby
Raw Normal View History

2016-04-05 14:01:13 -04:00
require 'spec_helper'
feature 'Toggle Whitespace Changes', js: true, feature: true do
before do
sign_in(create(:admin))
2016-04-07 14:15:28 -04:00
merge_request = create(:merge_request)
project = merge_request.source_project
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
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