diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/frontend/monitoring | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/frontend/monitoring')
8 files changed, 13 insertions, 14 deletions
diff --git a/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap b/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap index 14f04d9b767..263d6225a9f 100644 --- a/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap +++ b/spec/frontend/monitoring/components/__snapshots__/dashboard_template_spec.js.snap @@ -3,7 +3,8 @@ exports[`Dashboard template matches the default snapshot 1`] = ` <div class="prometheus-graphs" - data-qa-selector="prometheus_graphs" + data-qa-selector="prometheus_graphs_content" + data-testid="prometheus-graphs" environmentstate="available" metricsdashboardbasepath="/monitoring/monitor-project/-/metrics?environment=1" metricsendpoint="/monitoring/monitor-project/-/environments/1/additional_metrics.json" @@ -60,6 +61,7 @@ exports[`Dashboard template matches the default snapshot 1`] = ` clearalltext="Clear all" clearalltextclass="gl-px-5" data-qa-selector="environments_dropdown" + data-testid="environments-dropdown" headertext="" hideheaderborder="true" highlighteditemstitle="Selected" diff --git a/spec/frontend/monitoring/components/charts/stacked_column_spec.js b/spec/frontend/monitoring/components/charts/stacked_column_spec.js index 91fe36bc6e4..779ded090c2 100644 --- a/spec/frontend/monitoring/components/charts/stacked_column_spec.js +++ b/spec/frontend/monitoring/components/charts/stacked_column_spec.js @@ -72,7 +72,7 @@ describe('Stacked column chart component', () => { ]); }); - it('chart options should configure data zoom and axis label ', () => { + it('chart options should configure data zoom and axis label', () => { const chartOptions = findChart().props('option'); const xAxisType = findChart().props('xAxisType'); diff --git a/spec/frontend/monitoring/components/dashboard_panel_spec.js b/spec/frontend/monitoring/components/dashboard_panel_spec.js index d797d9e2ad0..339c1710a9e 100644 --- a/spec/frontend/monitoring/components/dashboard_panel_spec.js +++ b/spec/frontend/monitoring/components/dashboard_panel_spec.js @@ -430,7 +430,7 @@ describe('Dashboard Panel', () => { expect(findTimeChart().props().projectPath).toBe(mockProjectPath); }); - it('it renders a time series chart with no errors', () => { + it('renders a time series chart with no errors', () => { expect(wrapper.findComponent(MonitorTimeSeriesChart).exists()).toBe(true); }); }); diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js index 608404e5c5b..1de6b6e3e98 100644 --- a/spec/frontend/monitoring/components/dashboard_spec.js +++ b/spec/frontend/monitoring/components/dashboard_spec.js @@ -407,7 +407,7 @@ describe('Dashboard', () => { await nextTick(); }); - it('it does not show loading icons in any group', async () => { + it('does not show loading icons in any group', async () => { setupStoreWithData(store); await nextTick(); @@ -614,11 +614,11 @@ describe('Dashboard', () => { const findFirstDraggableRemoveButton = () => findDraggablePanels().at(0).find('.js-draggable-remove'); - it('it enables draggables', async () => { + it('enables draggables', async () => { findRearrangeButton().vm.$emit('click'); await nextTick(); - expect(findRearrangeButton().attributes('pressed')).toBeTruthy(); + expect(findRearrangeButton().attributes('pressed')).toBe('true'); expect(findEnabledDraggables().wrappers).toEqual(findDraggables().wrappers); }); @@ -656,13 +656,13 @@ describe('Dashboard', () => { expect(findDraggablePanels().length).toEqual(metricsDashboardPanelCount - 1); }); - it('it disables draggables when clicked again', async () => { + it('disables draggables when clicked again', async () => { findRearrangeButton().vm.$emit('click'); await nextTick(); findRearrangeButton().vm.$emit('click'); await nextTick(); - expect(findRearrangeButton().attributes('pressed')).toBeFalsy(); + expect(findRearrangeButton().attributes('pressed')).toBeUndefined(); expect(findEnabledDraggables().length).toBe(0); }); }); diff --git a/spec/frontend/monitoring/components/dashboards_dropdown_spec.js b/spec/frontend/monitoring/components/dashboards_dropdown_spec.js index 721992e710a..3ccaa2d28ac 100644 --- a/spec/frontend/monitoring/components/dashboards_dropdown_spec.js +++ b/spec/frontend/monitoring/components/dashboards_dropdown_spec.js @@ -163,9 +163,6 @@ describe('DashboardsDropdown', () => { findItemAt(1).vm.$emit('click'); }); - it('emits a "selectDashboard" event', () => { - expect(wrapper.emitted().selectDashboard).toBeTruthy(); - }); it('emits a "selectDashboard" event with dashboard information', () => { expect(wrapper.emitted().selectDashboard[0]).toEqual([dashboardGitResponse[0]]); }); diff --git a/spec/frontend/monitoring/components/duplicate_dashboard_form_spec.js b/spec/frontend/monitoring/components/duplicate_dashboard_form_spec.js index 755204dc721..b54ca926dae 100644 --- a/spec/frontend/monitoring/components/duplicate_dashboard_form_spec.js +++ b/spec/frontend/monitoring/components/duplicate_dashboard_form_spec.js @@ -68,7 +68,7 @@ describe('DuplicateDashboardForm', () => { await nextTick(); expect(findByRef('fileNameFormGroup').classes()).toContain('is-invalid'); - expect(findInvalidFeedback().text()).toBeTruthy(); + expect(findInvalidFeedback().text()).toBe('The file name should have a .yml extension'); }); }); diff --git a/spec/frontend/monitoring/components/duplicate_dashboard_modal_spec.js b/spec/frontend/monitoring/components/duplicate_dashboard_modal_spec.js index 3032c236741..d83a9192876 100644 --- a/spec/frontend/monitoring/components/duplicate_dashboard_modal_spec.js +++ b/spec/frontend/monitoring/components/duplicate_dashboard_modal_spec.js @@ -72,7 +72,7 @@ describe('duplicate dashboard modal', () => { await waitForPromises(); expect(okEvent.preventDefault).toHaveBeenCalled(); - expect(wrapper.emitted().dashboardDuplicated).toBeTruthy(); + expect(wrapper.emitted('dashboardDuplicated')).toHaveLength(1); expect(wrapper.emitted().dashboardDuplicated[0]).toEqual([dashboardGitResponse[0]]); expect(wrapper.findComponent(GlLoadingIcon).exists()).toBe(false); expect(wrapper.vm.$refs.duplicateDashboardModal.hide).toHaveBeenCalled(); diff --git a/spec/frontend/monitoring/store/actions_spec.js b/spec/frontend/monitoring/store/actions_spec.js index d1a13fbf9cd..a872a7780eb 100644 --- a/spec/frontend/monitoring/store/actions_spec.js +++ b/spec/frontend/monitoring/store/actions_spec.js @@ -855,7 +855,7 @@ describe('Monitoring store actions', () => { ); }); - it('dispatches receiveDashboardValidationWarningsSuccess with false payload when the response is empty ', () => { + it('dispatches receiveDashboardValidationWarningsSuccess with false payload when the response is empty', () => { mockMutate.mockResolvedValue({ data: { project: null, |