Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 21:42:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-23 21:42:02 +0300
commit5a1541a44f745cf9ae4121d6919a1530a7212afe (patch)
tree3841ea24d9eaa1e5521f168348af3fd409aab962 /spec/frontend
parentf1bc6c9f752e5dcf11f5798c70498e9ae4a8e3ec (diff)
Add latest changes from gitlab-org/gitlab@13-9-stable-ee
Diffstat (limited to 'spec/frontend')
-rw-r--r--spec/frontend/artifacts_settings/components/__snapshots__/keep_latest_artifact_checkbox_spec.js.snap32
-rw-r--r--spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js19
-rw-r--r--spec/frontend/vue_shared/alert_details/alert_details_spec.js7
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);
});