diff --git a/entry_types/scrolled/package/spec/frontend/Layout-spec.js b/entry_types/scrolled/package/spec/frontend/Layout-spec.js
index 50f7b5812c..4f3f0a1b08 100644
--- a/entry_types/scrolled/package/spec/frontend/Layout-spec.js
+++ b/entry_types/scrolled/package/spec/frontend/Layout-spec.js
@@ -537,11 +537,9 @@ describe('Layout', () => {
it('decreases size when inlining wide side elements', () => {
const items = [
- {id: 1, type: 'probe', position: 'side', width: -2},
- {id: 2, type: 'probe', position: 'side', width: -1},
- {id: 3, type: 'probe', position: 'side'},
- {id: 4, type: 'probe', position: 'side', width: 1},
- {id: 5, type: 'probe', position: 'side', width: 2}
+ {id: 1, type: 'probe', position: 'side'},
+ {id: 2, type: 'probe', position: 'side', width: 1},
+ {id: 3, type: 'probe', position: 'side', width: 2}
];
window.matchMedia.mockViewportWidth(500);
const {container} = renderInEntry(
@@ -564,17 +562,15 @@ describe('Layout', () => {
);
expect(container.textContent).toEqual(
- '[inline xs 1 ][inline sm 2 ][inline md 3 4 ][inline lg 5 ]'
+ '[inline md 1 2 ][inline lg 3 ]'
);
});
it('decreases size when inlining wide sticky elements', () => {
const items = [
- {id: 1, type: 'probe', position: 'sticky', width: -2},
- {id: 2, type: 'probe', position: 'sticky', width: -1},
- {id: 3, type: 'probe', position: 'sticky'},
- {id: 4, type: 'probe', position: 'sticky', width: 1},
- {id: 5, type: 'probe', position: 'sticky', width: 2}
+ {id: 1, type: 'probe', position: 'sticky'},
+ {id: 2, type: 'probe', position: 'sticky', width: 1},
+ {id: 3, type: 'probe', position: 'sticky', width: 2}
];
window.matchMedia.mockViewportWidth(500);
const {container} = renderInEntry(
@@ -597,9 +593,10 @@ describe('Layout', () => {
);
expect(container.textContent).toEqual(
- '[inline xs 1 ][inline sm 2 ][inline md 3 4 ][inline lg 5 ]'
+ '[inline md 1 2 ][inline lg 3 ]'
);
});
+
});
describe('in center variant', () => {
@@ -1384,6 +1381,56 @@ describe('Layout', () => {
expect(findParentWithClass(getByTestId('probe'), twoColumnStyles['restrict-xs'])).not.toBeNull();
});
+
+ it('does not decrease size of inlined side element with width below md', () => {
+ const items = [
+ {id: 2, type: 'probe', position: 'side', width: -2}
+ ];
+ window.matchMedia.mockViewportWidth(500);
+ const {getByTestId} = renderInEntry(
+