diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-22 09:09:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-22 09:09:46 +0300 |
commit | b06ba604b8d1b40758ebbda5008fe3294d0f2a2a (patch) | |
tree | 4da549dc17b5ab32bb47076299b45fec74866563 /spec/frontend/issues | |
parent | 34daf3bdb3c68289eb2eedfb78cd4deb816047fd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issues')
-rw-r--r-- | spec/frontend/issues/show/components/incidents/incident_tabs_spec.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/frontend/issues/show/components/incidents/incident_tabs_spec.js b/spec/frontend/issues/show/components/incidents/incident_tabs_spec.js index 33a3a6eddfc..380b4b92f2e 100644 --- a/spec/frontend/issues/show/components/incidents/incident_tabs_spec.js +++ b/spec/frontend/issues/show/components/incidents/incident_tabs_spec.js @@ -33,7 +33,13 @@ const defaultMocks = { describe('Incident Tabs component', () => { let wrapper; - const mountComponent = ({ data = {}, options = {}, mount = shallowMountExtended } = {}) => { + const mountComponent = ({ + data = {}, + options = {}, + mount = shallowMountExtended, + hasLinkedAlerts = false, + mocks = {}, + } = {}) => { wrapper = mount( IncidentTabs, merge( @@ -54,11 +60,12 @@ describe('Incident Tabs component', () => { slaFeatureAvailable: true, canUpdate: true, canUpdateTimelineEvent: true, + hasLinkedAlerts, }, data() { return { alert: mockAlert, ...data }; }, - mocks: defaultMocks, + mocks: { ...defaultMocks, ...mocks }, }, options, ), @@ -102,11 +109,13 @@ describe('Incident Tabs component', () => { }); it('renders the alert details tab', () => { + mountComponent({ hasLinkedAlerts: true }); expect(findAlertDetailsTab().exists()).toBe(true); expect(findAlertDetailsTab().attributes('title')).toBe('Alert details'); }); it('renders the alert details table with the correct props', () => { + mountComponent({ hasLinkedAlerts: true }); const alert = { iid: mockAlert.iid }; expect(findAlertDetailsComponent().props('alert')).toMatchObject(alert); |