Commit 79d020bb authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Removes the limit warning component

This component is no longer used in any other
location so we can remove it.
parent b34f86ef
<script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
export default {
components: {
GlIcon,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
count: {
type: Number,
required: true,
},
},
};
</script>
<template>
<span v-if="count === 50" class="events-info float-right">
<gl-icon
v-gl-tooltip="{
title: n__(
'Limited to showing %d event at most',
'Limited to showing %d events at most',
50,
),
}"
name="warning"
/>
{{ n__('Showing %d event', 'Showing %d events', 50) }}
</span>
</template>
......@@ -21921,11 +21921,6 @@ msgstr ""
msgid "Limit the size of Sidekiq jobs stored in Redis."
msgstr ""
msgid "Limited to showing %d event at most"
msgid_plural "Limited to showing %d events at most"
msgstr[0] ""
msgstr[1] ""
msgid "Limiting mode"
msgstr ""
......@@ -33815,11 +33810,6 @@ msgstr ""
msgid "Show whitespace changes"
msgstr ""
msgid "Showing %d event"
msgid_plural "Showing %d events"
msgstr[0] ""
msgstr[1] ""
msgid "Showing %{conflict} between %{sourceBranch} and %{targetBranch}"
msgstr ""
......
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import LimitWarningComponent from '~/cycle_analytics/components/limit_warning_component.vue';
import Translate from '~/vue_shared/translate';
Vue.use(Translate);
const createComponent = (props) =>
shallowMount(LimitWarningComponent, {
propsData: {
...props,
},
});
describe('Limit warning component', () => {
let component;
beforeEach(() => {
component = null;
});
afterEach(() => {
component.destroy();
});
it('should not render if count is not exactly than 50', () => {
component = createComponent({ count: 5 });
expect(component.text().trim()).toBe('');
component = createComponent({ count: 55 });
expect(component.text().trim()).toBe('');
});
it('should render if count is exactly 50', () => {
component = createComponent({ count: 50 });
expect(component.text().trim()).toBe('Showing 50 events');
});
});
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