diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-18 11:17:02 +0300 |
commit | b39512ed755239198a9c294b6a45e65c05900235 (patch) | |
tree | d234a3efade1de67c46b9e5a38ce813627726aa7 /spec/frontend/prometheus_metrics/custom_metrics_spec.js | |
parent | d31474cf3b17ece37939d20082b07f6657cc79a9 (diff) |
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'spec/frontend/prometheus_metrics/custom_metrics_spec.js')
-rw-r--r-- | spec/frontend/prometheus_metrics/custom_metrics_spec.js | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/spec/frontend/prometheus_metrics/custom_metrics_spec.js b/spec/frontend/prometheus_metrics/custom_metrics_spec.js index fc906194059..a079b0b97fd 100644 --- a/spec/frontend/prometheus_metrics/custom_metrics_spec.js +++ b/spec/frontend/prometheus_metrics/custom_metrics_spec.js @@ -50,39 +50,33 @@ describe('PrometheusMetrics', () => { customMetrics.showMonitoringCustomMetricsPanelState(PANEL_STATE.LOADING); expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toEqual(false); - expect(customMetrics.$monitoredCustomMetricsEmpty.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBeTruthy(); - expect( - customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden'), - ).toBeTruthy(); - - expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsEmpty.hasClass('hidden')).toBe(true); + expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBe(true); + expect(customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden')).toBe(true); + + expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toBe(true); + expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBe(true); }); it('should show metrics list when called with `list`', () => { customMetrics.showMonitoringCustomMetricsPanelState(PANEL_STATE.LIST); - expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$monitoredCustomMetricsEmpty.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBe(true); + expect(customMetrics.$monitoredCustomMetricsEmpty.hasClass('hidden')).toBe(true); expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toEqual(false); - expect( - customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden'), - ).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden')).toBe(true); expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toEqual(false); - expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBe(true); }); it('should show empty state when called with `empty`', () => { customMetrics.showMonitoringCustomMetricsPanelState(PANEL_STATE.EMPTY); - expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBe(true); expect(customMetrics.$monitoredCustomMetricsEmpty.hasClass('hidden')).toEqual(false); - expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBeTruthy(); - expect( - customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden'), - ).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBe(true); + expect(customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden')).toBe(true); expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toEqual(false); expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toEqual(false); @@ -94,14 +88,12 @@ describe('PrometheusMetrics', () => { const $metricsListLi = customMetrics.$monitoredCustomMetricsList.find('li'); - expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBe(true); expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toEqual(false); - expect( - customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden'), - ).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsNoIntegrationText.hasClass('hidden')).toBe(true); expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toEqual(false); - expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBe(true); expect($metricsListLi.length).toEqual(metrics.length); }); @@ -114,10 +106,10 @@ describe('PrometheusMetrics', () => { false, ); - expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toBeTruthy(); - expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBeTruthy(); + expect(customMetrics.$monitoredCustomMetricsLoading.hasClass('hidden')).toBe(true); + expect(customMetrics.$monitoredCustomMetricsList.hasClass('hidden')).toBe(true); + expect(customMetrics.$newCustomMetricButton.hasClass('hidden')).toBe(true); + expect(customMetrics.$newCustomMetricText.hasClass('hidden')).toBe(true); }); }); }); |