Commit 128748c2 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '276949-alert-update' into 'master'

Links Layer: Update Alert Logic

See merge request gitlab-org/gitlab!55483
parents b3b1f810 773c6303
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
}, 0); }, 0);
}, },
showAlert() { showAlert() {
return !this.showLinkedLayers && !this.alertDismissed; return !this.containerZero && !this.showLinkedLayers && !this.alertDismissed;
}, },
showLinkedLayers() { showLinkedLayers() {
return ( return (
......
...@@ -79,6 +79,24 @@ describe('links layer component', () => { ...@@ -79,6 +79,24 @@ describe('links layer component', () => {
}); });
}); });
describe('with width or height measurement at 0', () => {
beforeEach(() => {
createComponent({ props: { containerMeasurements: { width: 0, height: 100 } } });
});
it('renders the default slot', () => {
expect(wrapper.html()).toContain(slotContent);
});
it('does not render the alert component', () => {
expect(findAlert().exists()).toBe(false);
});
it('does not render the inner links component', () => {
expect(findLinksInner().exists()).toBe(false);
});
});
describe('interactions', () => { describe('interactions', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ mountFn: mount, props: { pipelineData: tooManyStages } }); createComponent({ mountFn: mount, props: { pipelineData: tooManyStages } });
......
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