Commit bab5cd4e authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'djadmin-v-html-svg-icon1' into 'master'

Remove unused component from Cycle Analytics

See merge request gitlab-org/gitlab!69835
parents 040c2229 044e2e5e
<script>
import { GlIcon } from '@gitlab/ui';
import iconCycleAnalyticsSplash from 'icons/_icon_cycle_analytics_splash.svg';
export default {
components: {
GlIcon,
},
props: {
documentationLink: {
type: String,
required: true,
},
},
computed: {
iconCycleAnalyticsSplash() {
return iconCycleAnalyticsSplash;
},
},
methods: {
dismissOverviewDialog() {
this.$emit('dismiss-overview-dialog');
},
},
};
</script>
<template>
<div class="landing content-block">
<button
:aria-label="__('Dismiss Value Stream Analytics introduction box')"
class="js-ca-dismiss-button dismiss-button"
type="button"
@click="dismissOverviewDialog"
>
<gl-icon name="close" />
</button>
<div
class="svg-container"
v-html="iconCycleAnalyticsSplash /* eslint-disable-line vue/no-v-html */"
></div>
<div class="inner-content">
<h4>{{ __('Introducing Value Stream Analytics') }}</h4>
<p>
{{
__(`Value Stream Analytics gives an overview
of how much time it takes to go from idea to production in your project.`)
}}
</p>
<p>
<a :href="documentationLink" target="_blank" rel="nofollow" class="btn">
{{ __('Read more') }}
</a>
</p>
</div>
</div>
</template>
......@@ -11899,9 +11899,6 @@ msgid_plural "Dismiss %d selected vulnerabilities as"
msgstr[0] ""
msgstr[1] ""
msgid "Dismiss Value Stream Analytics introduction box"
msgstr ""
msgid "Dismiss merge request promotion"
msgstr ""
......@@ -18247,9 +18244,6 @@ msgstr ""
msgid "Interval Pattern"
msgstr ""
msgid "Introducing Value Stream Analytics"
msgstr ""
msgid "Introducing Your DevOps Report"
msgstr ""
......@@ -36989,9 +36983,6 @@ msgstr ""
msgid "Value Stream Analytics can help you determine your team’s velocity"
msgstr ""
msgid "Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project."
msgstr ""
msgid "Value might contain a variable reference"
msgstr ""
......
import { shallowMount } from '@vue/test-utils';
import Banner from '~/cycle_analytics/components/banner.vue';
describe('Value Stream Analytics banner', () => {
let wrapper;
const createComponent = () => {
wrapper = shallowMount(Banner, {
propsData: {
documentationLink: 'path',
},
});
};
beforeEach(() => {
createComponent();
});
afterEach(() => {
wrapper.destroy();
});
it('should render value stream analytics information', () => {
expect(wrapper.find('h4').text().trim()).toBe('Introducing Value Stream Analytics');
expect(
wrapper
.find('p')
.text()
.trim()
.replace(/[\r\n]+/g, ' '),
).toContain(
'Value Stream Analytics gives an overview of how much time it takes to go from idea to production in your project.',
);
expect(wrapper.find('a').text().trim()).toBe('Read more');
expect(wrapper.find('a').attributes('href')).toBe('path');
});
it('should emit an event when close button is clicked', async () => {
jest.spyOn(wrapper.vm, '$emit').mockImplementation(() => {});
await wrapper.find('.js-ca-dismiss-button').trigger('click');
expect(wrapper.vm.$emit).toHaveBeenCalled();
});
});
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