diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/frontend/vue_shared/components/alert_details_table_spec.js | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/frontend/vue_shared/components/alert_details_table_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/alert_details_table_spec.js | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/spec/frontend/vue_shared/components/alert_details_table_spec.js b/spec/frontend/vue_shared/components/alert_details_table_spec.js index dff307e92c2..ef7815f9e9e 100644 --- a/spec/frontend/vue_shared/components/alert_details_table_spec.js +++ b/spec/frontend/vue_shared/components/alert_details_table_spec.js @@ -23,14 +23,10 @@ const environmentPath = '/fake/path'; describe('AlertDetails', () => { let environmentData = { name: environmentName, path: environmentPath }; - let glFeatures = { exposeEnvironmentPathInAlertDetails: false }; let wrapper; function mountComponent(propsData = {}) { wrapper = mount(AlertDetailsTable, { - provide: { - glFeatures, - }, propsData: { alert: { ...mockAlert, @@ -97,34 +93,19 @@ describe('AlertDetails', () => { expect(findTableField(fields, 'Severity').exists()).toBe(true); expect(findTableField(fields, 'Status').exists()).toBe(true); expect(findTableField(fields, 'Hosts').exists()).toBe(true); - expect(findTableField(fields, 'Environment').exists()).toBe(false); + expect(findTableField(fields, 'Environment').exists()).toBe(true); }); - it('should not show disallowed and flaggedAllowed alert fields', () => { + it('should not show disallowed alert fields', () => { const fields = findTableKeys(); expect(findTableField(fields, 'Typename').exists()).toBe(false); expect(findTableField(fields, 'Todos').exists()).toBe(false); expect(findTableField(fields, 'Notes').exists()).toBe(false); expect(findTableField(fields, 'Assignees').exists()).toBe(false); - expect(findTableField(fields, 'Environment').exists()).toBe(false); - }); - }); - - describe('when exposeEnvironmentPathInAlertDetails is enabled', () => { - beforeEach(() => { - glFeatures = { exposeEnvironmentPathInAlertDetails: true }; - mountComponent(); - }); - - it('should show flaggedAllowed alert fields', () => { - const fields = findTableKeys(); - - expect(findTableField(fields, 'Environment').exists()).toBe(true); }); it('should display only the name for the environment', () => { - expect(findTableFieldValueByKey('Iid').text()).toBe('1527542'); expect(findTableFieldValueByKey('Environment').text()).toBe(environmentName); }); |