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
This commit is contained in:
commit
9034227749
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue