Commit b146ddec authored by Savas Vedova's avatar Savas Vedova

Merge branch 'remove-unused-aside-code' into 'master'

Remove unused vulnerability report aside code

See merge request gitlab-org/gitlab!67644
parents 705b7171 79ecbf65
......@@ -7,9 +7,6 @@ export default {
hasStickySlot() {
return Boolean(this.$slots.sticky);
},
hasAsideSlot() {
return Boolean(this.$slots.aside);
},
},
};
</script>
......@@ -29,13 +26,9 @@ export default {
</section>
<div class="row mt-4">
<article class="col" :class="{ 'col-xl-7': hasAsideSlot }">
<article class="col">
<slot></slot>
</article>
<aside v-if="hasAsideSlot" class="col-xl-5">
<slot name="aside"></slot>
</aside>
</div>
</section>
</template>
......@@ -17,7 +17,6 @@ describe('Vulnerability Report Layout component', () => {
const findArticle = () => wrapper.find('article');
const findHeader = () => wrapper.find('header');
const findAside = () => wrapper.find('aside');
const findStickySection = () => wrapper.find(STICKY_SECTION_SELECTOR);
afterEach(() => {
......@@ -35,7 +34,6 @@ describe('Vulnerability Report Layout component', () => {
element | exists
${'article'} | ${true}
${'header'} | ${false}
${'aside'} | ${false}
${STICKY_SECTION_SELECTOR} | ${false}
`('should find that $element exists is $exists', ({ element, exists }) => {
expect(wrapper.find(element).exists()).toBe(exists);
......@@ -66,7 +64,6 @@ describe('Vulnerability Report Layout component', () => {
element | exists
${'article'} | ${true}
${'header'} | ${true}
${'aside'} | ${false}
${STICKY_SECTION_SELECTOR} | ${false}
`('should find that $element exists is $exists', ({ element, exists }) => {
expect(wrapper.find(element).exists()).toBe(exists);
......@@ -96,7 +93,6 @@ describe('Vulnerability Report Layout component', () => {
element | exists
${'article'} | ${true}
${'header'} | ${false}
${'aside'} | ${false}
${STICKY_SECTION_SELECTOR} | ${true}
`('should find that $element exists is $exists', ({ element, exists }) => {
expect(wrapper.find(element).exists()).toBe(exists);
......@@ -114,41 +110,4 @@ describe('Vulnerability Report Layout component', () => {
expect(section.find(DummyComponent).exists()).toBe(true);
});
});
describe('with the aside and main slots', () => {
beforeEach(() => {
createWrapper({
default: DummyComponent,
aside: DummyComponent,
});
});
it.each`
element | exists
${'article'} | ${true}
${'header'} | ${false}
${'aside'} | ${true}
${STICKY_SECTION_SELECTOR} | ${false}
`('should find that $element exists is $exists', ({ element, exists }) => {
expect(wrapper.find(element).exists()).toBe(exists);
});
it('should render the dummy component in the main section', () => {
const article = findArticle();
expect(article.find(DummyComponent).exists()).toBe(true);
});
it('should render the dummy component in the header section', () => {
const aside = findAside();
expect(aside.find(DummyComponent).exists()).toBe(true);
});
it('should make the main section smaller', () => {
const article = findArticle();
expect(article.classes()).toContain(SMALLER_SECTION_CLASS);
});
});
});
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