debian-mirror-gitlab/spec/features/merge_requests/toggle_whitespace_changes_spec.rb

23 lines
628 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
feature 'Toggle Whitespace Changes', js: true do
2016-06-02 11:05:42 +05:30
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:admin))
2016-06-02 11:05:42 +05:30
merge_request = create(:merge_request)
project = merge_request.source_project
2017-09-10 17:25:29 +05:30
visit diffs_project_merge_request_path(project, merge_request)
2016-06-02 11:05:42 +05:30
end
it 'has a button to toggle whitespace changes' do
expect(page).to have_content 'Hide whitespace changes'
end
describe 'clicking "Hide whitespace changes" button' do
it 'toggles the "Hide whitespace changes" button' do
click_link 'Hide whitespace changes'
expect(page).to have_content 'Show whitespace changes'
end
end
end