summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2019-05-17 19:37:28 +0000
committerFatih Acet <acetfatih@gmail.com>2019-05-17 19:37:28 +0000
commit735b6fb1e170d2bc1679d99a1c148ce120a6e0c2 (patch)
treecfabb507c1caaf68b8c72a8a95e334b5f8373f03 /spec
parentd0857d447f128f6caa44dbda88959ff301b423a9 (diff)
parentc7d57f2719027388c88e5a87a04003e99db54ec0 (diff)
downloadgitlab-ce-735b6fb1e170d2bc1679d99a1c148ce120a6e0c2.tar.gz
Merge branch '61657-allow-report-section-list-to-not-have-redundant-status-icon' into 'master'
Resolve "Allow report section list to not have redundant status icon" Closes #61657 See merge request gitlab-org/gitlab-ce!28226
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/reports/components/report_item_spec.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/frontend/reports/components/report_item_spec.js b/spec/frontend/reports/components/report_item_spec.js
new file mode 100644
index 00000000000..bacbb399513
--- /dev/null
+++ b/spec/frontend/reports/components/report_item_spec.js
@@ -0,0 +1,33 @@
+import { shallowMount } from '@vue/test-utils';
+import { STATUS_SUCCESS } from '~/reports/constants';
+import ReportItem from '~/reports/components/report_item.vue';
+import { componentNames } from '~/reports/components/issue_body';
+
+describe('ReportItem', () => {
+ describe('showReportSectionStatusIcon', () => {
+ it('does not render CI Status Icon when showReportSectionStatusIcon is false', () => {
+ const wrapper = shallowMount(ReportItem, {
+ propsData: {
+ issue: { foo: 'bar' },
+ component: componentNames.TestIssueBody,
+ status: STATUS_SUCCESS,
+ showReportSectionStatusIcon: false,
+ },
+ });
+
+ expect(wrapper.find('issuestatusicon-stub').exists()).toBe(false);
+ });
+
+ it('shows status icon when unspecified', () => {
+ const wrapper = shallowMount(ReportItem, {
+ propsData: {
+ issue: { foo: 'bar' },
+ component: componentNames.TestIssueBody,
+ status: STATUS_SUCCESS,
+ },
+ });
+
+ expect(wrapper.find('issuestatusicon-stub').exists()).toBe(true);
+ });
+ });
+});