diff options
Diffstat (limited to 'spec/frontend')
3 files changed, 6 insertions, 52 deletions
diff --git a/spec/frontend/artifacts_settings/components/__snapshots__/keep_latest_artifact_checkbox_spec.js.snap b/spec/frontend/artifacts_settings/components/__snapshots__/keep_latest_artifact_checkbox_spec.js.snap index bfe7e40fb32..bf33aa731ef 100644 --- a/spec/frontend/artifacts_settings/components/__snapshots__/keep_latest_artifact_checkbox_spec.js.snap +++ b/spec/frontend/artifacts_settings/components/__snapshots__/keep_latest_artifact_checkbox_spec.js.snap @@ -1,37 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Keep latest artifact checkbox when application keep latest artifact setting is disabled checkbox is disabled when application setting is disabled 1`] = ` -<div> - <!----> - - <b-form-checkbox-stub - checked="true" - class="gl-form-checkbox" - disabled="true" - plain="true" - value="true" - > - <strong - class="gl-mr-3" - > - Keep artifacts from most recent successful jobs - </strong> - - <gl-link-stub - href="/help/ci/pipelines/job_artifacts" - > - More information - </gl-link-stub> - - <p - class="help-text" - > - This feature is disabled at the instance level. - </p> - </b-form-checkbox-stub> -</div> -`; - exports[`Keep latest artifact checkbox when application keep latest artifact setting is enabled sets correct setting value in checkbox with query result 1`] = ` <div> <!----> diff --git a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js index fe2886d6c95..b0d1b70c198 100644 --- a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js +++ b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js @@ -120,23 +120,4 @@ describe('Keep latest artifact checkbox', () => { expect(findCheckbox().attributes('disabled')).toBeUndefined(); }); }); - - describe('when application keep latest artifact setting is disabled', () => { - it('checkbox is disabled when application setting is disabled', async () => { - createComponent({ - keepLatestArtifactApplicationQueryHandler: jest.fn().mockResolvedValue({ - data: { - ciApplicationSettings: { - keepLatestArtifact: false, - }, - }, - }), - }); - - await wrapper.vm.$nextTick(); - - expect(wrapper.element).toMatchSnapshot(); - expect(findCheckbox().attributes('disabled')).toBe('true'); - }); - }); }); diff --git a/spec/frontend/vue_shared/alert_details/alert_details_spec.js b/spec/frontend/vue_shared/alert_details/alert_details_spec.js index dd9a7be6268..ce410a8b3e7 100644 --- a/spec/frontend/vue_shared/alert_details/alert_details_spec.js +++ b/spec/frontend/vue_shared/alert_details/alert_details_spec.js @@ -128,6 +128,10 @@ describe('AlertDetails', () => { expect(wrapper.findByTestId('startTimeItem').exists()).toBe(true); expect(wrapper.findByTestId('startTimeItem').props('time')).toBe(mockAlert.startedAt); }); + + it('renders the metrics tab', () => { + expect(findMetricsTab().exists()).toBe(true); + }); }); describe('individual alert fields', () => { @@ -179,7 +183,8 @@ describe('AlertDetails', () => { describe('Threat Monitoring details', () => { it('should not render the metrics tab', () => { mountComponent({ - data: { alert: mockAlert, provide: { isThreatMonitoringPage: true } }, + data: { alert: mockAlert }, + provide: { isThreatMonitoringPage: true }, }); expect(findMetricsTab().exists()).toBe(false); }); |