Commit 90342277 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'mr-side-by-side-breadcrumbs-container' into 'master'

Stop breadcrumbs changing container when in side-by-side diff

Closes #37641

See merge request gitlab-org/gitlab-ce!14454
parents ccdfd85d f9a212e8
...@@ -352,7 +352,7 @@ import { ...@@ -352,7 +352,7 @@ import {
} }
expandViewContainer() { expandViewContainer() {
const $wrapper = $('.content-wrapper .container-fluid'); const $wrapper = $('.content-wrapper .container-fluid').not('.breadcrumbs');
if (this.fixedLayoutPref === null) { if (this.fixedLayoutPref === null) {
this.fixedLayoutPref = $wrapper.hasClass('container-limited'); this.fixedLayoutPref = $wrapper.hasClass('container-limited');
} }
......
---
title: Fixed breadcrumbs container expanding in side-by-side diff view
merge_request:
author:
type: fixed
...@@ -416,5 +416,28 @@ import 'vendor/jquery.scrollTo'; ...@@ -416,5 +416,28 @@ import 'vendor/jquery.scrollTo';
}); });
}); });
}); });
describe('expandViewContainer', function () {
beforeEach(() => {
$('body').append('<div class="content-wrapper"><div class="container-fluid container-limited"></div></div>');
});
afterEach(() => {
$('.content-wrapper').remove();
});
it('removes container-limited from containers', function () {
this.class.expandViewContainer();
expect($('.content-wrapper')).not.toContainElement('.container-limited');
});
it('does remove container-limited from breadcrumbs', function () {
$('.container-limited').addClass('breadcrumbs');
this.class.expandViewContainer();
expect($('.content-wrapper')).toContainElement('.container-limited');
});
});
}); });
}).call(window); }).call(window);
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