Commit f9a212e8 authored by Phil Hughes's avatar Phil Hughes

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

Closes #37641
parent 17251d04
......@@ -352,7 +352,7 @@ import {
}
expandViewContainer() {
const $wrapper = $('.content-wrapper .container-fluid');
const $wrapper = $('.content-wrapper .container-fluid').not('.breadcrumbs');
if (this.fixedLayoutPref === null) {
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';
});
});
});
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);
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