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

23 lines
664 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
login_as :admin
2016-04-07 14:15:28 -04:00
merge_request = create(:merge_request)
project = merge_request.source_project
2016-04-05 14:01:13 -04:00
visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request)
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