Commit ee3b64a8 authored by Simon Knox's avatar Simon Knox

Merge branch 'make-cleaner-diffs-default' into 'master'

Setting the cleaner diff for ipynb as default

See merge request gitlab-org/gitlab!81283
parents 906cba55 516366cb
......@@ -167,7 +167,7 @@ export default class Diff {
e.toShowBtn.onclick = () => diff.showOneHideAnother('rendered', e); // eslint-disable-line no-param-reassign
e.toHideBtn.onclick = () => diff.showOneHideAnother('raw', e); // eslint-disable-line no-param-reassign
diff.showOneHideAnother('raw', e);
diff.showOneHideAnother('rendered', e);
});
}
......
......@@ -27,8 +27,8 @@
- if diff_file.has_renderable?
.btn-group.gl-ml-3
= diff_mode_swap_button('raw', file_hash)
= diff_mode_swap_button('rendered', file_hash)
= diff_mode_swap_button('raw', file_hash)
- if image_diff && image_replaced
= view_file_button(diff_file.old_content_sha, diff_file.old_path, project, replaced: true)
......
......@@ -56,14 +56,14 @@ RSpec.describe 'Multiple view Diffs', :js do
it 'loads the rendered diff as hidden' do
diff = page.find('.diff-file, .file-holder', match: :first)
expect(diff).to have_selector '[data-diff-toggle-entity="toHide"]'
expect(diff).not_to have_selector '[data-diff-toggle-entity="toShow"]'
expect(diff).not_to have_selector '[data-diff-toggle-entity="toHide"]'
expect(diff).to have_selector '[data-diff-toggle-entity="toShow"]'
expect(classes_for_element(diff, 'toShow', visible: false)).to include('hidden')
expect(classes_for_element(diff, 'toHide')).not_to include('hidden')
expect(classes_for_element(diff, 'toHide', visible: false)).to include('hidden')
expect(classes_for_element(diff, 'toShow')).not_to include('hidden')
expect(classes_for_element(diff, 'toHideBtn')).to include('selected')
expect(classes_for_element(diff, 'toShowBtn')).not_to include('selected')
expect(classes_for_element(diff, 'toShowBtn')).to include('selected')
expect(classes_for_element(diff, 'toHideBtn')).not_to include('selected')
end
it 'displays the rendered diff and hides after selection changes' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment