Skip to content
Snippets Groups Projects

Fix broken "Show whitespace changes" button on MR "Changes" tab

Merged Jacques Erasmus requested to merge 52122-fix-broken-whitespace-button into master
All threads resolved!
Compare and Show latest version
1 file
+ 29
0
Compare changes
  • Side-by-side
  • Inline
@@ -90,4 +90,33 @@ describe('CompareVersions', () => {
expect(window.location.toString()).toContain('?view=parallel')
});
});
describe('comparableDiffs', () => {
it('should not contain the first item in the mergeRequestDiffs property', () => {
const { comparableDiffs } = vm;
const comparableDiffsMock = diffsMockData.slice(1);
expect(comparableDiffs).toEqual(comparableDiffsMock);
});
});
describe('isWhitespaceVisible', () => {
it('should return "true" when no "w" flag is present in the URL (default)', () => {
expect(vm.isWhitespaceVisible()).toBeTruthy();
});
it('should return "false" when the flag is set to "1" in the URL', () => {
window.history.replaceState({}, null, '?w=1');
expect(vm.isWhitespaceVisible()).toBeFalsy();
});
it('should return "true" when the flag is set to "0" in the URL', () => {
window.history.replaceState({}, null, '?w=0');
expect(vm.isWhitespaceVisible()).toBeTruthy();
});
});
});
Loading