From 6cd5d91c4ae8c8d6be45ac62a586156914e0bd9f Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Fri, 27 Jan 2023 08:54:01 -0500 Subject: [PATCH] rename fixtures to data for eslint --- .../app/burn_rate_rule_editor/slo_selector.test.tsx | 2 +- .../observability/public/{fixtures => data}/slo/common.ts | 0 .../public/{fixtures => data}/slo/historical_summary_data.ts | 0 .../observability/public/{fixtures => data}/slo/indicator.ts | 0 .../observability/public/{fixtures => data}/slo/slo.ts | 0 .../public/{fixtures => data}/slo/time_window.ts | 0 .../slo/__storybook_mocks__/use_fetch_historical_summary.ts | 2 +- .../hooks/slo/__storybook_mocks__/use_fetch_slo_list.ts | 2 +- .../pages/slo_details/components/slo_details.stories.tsx | 2 +- .../observability/public/pages/slo_details/index.test.tsx | 2 +- .../observability/public/pages/slo_edit/index.test.tsx | 2 +- .../pages/slos/components/badges/slo_badges.stories.tsx | 2 +- .../components/badges/slo_indicator_type_badge.stories.tsx | 4 ++-- .../pages/slos/components/badges/slo_status_badge.stories.tsx | 2 +- .../slos/components/badges/slo_time_window_badge.stories.tsx | 2 +- .../slos/components/slo_delete_confirmation_modal.stories.tsx | 2 +- .../public/pages/slos/components/slo_list_item.stories.tsx | 4 ++-- .../public/pages/slos/components/slo_list_items.stories.tsx | 2 +- .../public/pages/slos/components/slo_sparkline.stories.tsx | 2 +- .../public/pages/slos/components/slo_summary.stories.tsx | 4 ++-- x-pack/plugins/observability/public/pages/slos/index.test.tsx | 4 ++-- 21 files changed, 20 insertions(+), 20 deletions(-) rename x-pack/plugins/observability/public/{fixtures => data}/slo/common.ts (100%) rename x-pack/plugins/observability/public/{fixtures => data}/slo/historical_summary_data.ts (100%) rename x-pack/plugins/observability/public/{fixtures => data}/slo/indicator.ts (100%) rename x-pack/plugins/observability/public/{fixtures => data}/slo/slo.ts (100%) rename x-pack/plugins/observability/public/{fixtures => data}/slo/time_window.ts (100%) diff --git a/x-pack/plugins/observability/public/components/app/burn_rate_rule_editor/slo_selector.test.tsx b/x-pack/plugins/observability/public/components/app/burn_rate_rule_editor/slo_selector.test.tsx index 2d5bc5886779d..67b87c24351e1 100644 --- a/x-pack/plugins/observability/public/components/app/burn_rate_rule_editor/slo_selector.test.tsx +++ b/x-pack/plugins/observability/public/components/app/burn_rate_rule_editor/slo_selector.test.tsx @@ -10,7 +10,7 @@ import userEvent from '@testing-library/user-event'; import { wait } from '@testing-library/user-event/dist/utils'; import React from 'react'; -import { emptySloList } from '../../../fixtures/slo/slo'; +import { emptySloList } from '../../../data/slo/slo'; import { useFetchSloList } from '../../../hooks/slo/use_fetch_slo_list'; import { render } from '../../../utils/test_helper'; import { SloSelector } from './slo_selector'; diff --git a/x-pack/plugins/observability/public/fixtures/slo/common.ts b/x-pack/plugins/observability/public/data/slo/common.ts similarity index 100% rename from x-pack/plugins/observability/public/fixtures/slo/common.ts rename to x-pack/plugins/observability/public/data/slo/common.ts diff --git a/x-pack/plugins/observability/public/fixtures/slo/historical_summary_data.ts b/x-pack/plugins/observability/public/data/slo/historical_summary_data.ts similarity index 100% rename from x-pack/plugins/observability/public/fixtures/slo/historical_summary_data.ts rename to x-pack/plugins/observability/public/data/slo/historical_summary_data.ts diff --git a/x-pack/plugins/observability/public/fixtures/slo/indicator.ts b/x-pack/plugins/observability/public/data/slo/indicator.ts similarity index 100% rename from x-pack/plugins/observability/public/fixtures/slo/indicator.ts rename to x-pack/plugins/observability/public/data/slo/indicator.ts diff --git a/x-pack/plugins/observability/public/fixtures/slo/slo.ts b/x-pack/plugins/observability/public/data/slo/slo.ts similarity index 100% rename from x-pack/plugins/observability/public/fixtures/slo/slo.ts rename to x-pack/plugins/observability/public/data/slo/slo.ts diff --git a/x-pack/plugins/observability/public/fixtures/slo/time_window.ts b/x-pack/plugins/observability/public/data/slo/time_window.ts similarity index 100% rename from x-pack/plugins/observability/public/fixtures/slo/time_window.ts rename to x-pack/plugins/observability/public/data/slo/time_window.ts diff --git a/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_historical_summary.ts b/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_historical_summary.ts index bc75ca95c0404..aa9e0302119fb 100644 --- a/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_historical_summary.ts +++ b/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_historical_summary.ts @@ -9,7 +9,7 @@ import { HistoricalSummaryResponse } from '@kbn/slo-schema'; import { HEALTHY_ROLLING_SLO, historicalSummaryData, -} from '../../../fixtures/slo/historical_summary_data'; +} from '../../../data/slo/historical_summary_data'; import { UseFetchHistoricalSummaryResponse, Params } from '../use_fetch_historical_summary'; export const useFetchHistoricalSummary = ({ diff --git a/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_slo_list.ts b/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_slo_list.ts index c4ea9217017ad..eabaf41013c1e 100644 --- a/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_slo_list.ts +++ b/x-pack/plugins/observability/public/hooks/slo/__storybook_mocks__/use_fetch_slo_list.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { sloList } from '../../../fixtures/slo/slo'; +import { sloList } from '../../../data/slo/slo'; import { UseFetchSloListResponse } from '../use_fetch_slo_list'; export const useFetchSloList = (): UseFetchSloListResponse => { diff --git a/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.stories.tsx b/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.stories.tsx index bbc1cbbbcc3fb..bf462b7c360bb 100644 --- a/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { buildSlo } from '../../../fixtures/slo/slo'; +import { buildSlo } from '../../../data/slo/slo'; import { SloDetails as Component, Props } from './slo_details'; export default { diff --git a/x-pack/plugins/observability/public/pages/slo_details/index.test.tsx b/x-pack/plugins/observability/public/pages/slo_details/index.test.tsx index 76372d4c432f7..33567da34ef35 100644 --- a/x-pack/plugins/observability/public/pages/slo_details/index.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_details/index.test.tsx @@ -14,7 +14,7 @@ import { useLicense } from '../../hooks/use_license'; import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details'; import { render } from '../../utils/test_helper'; import { SloDetailsPage } from '.'; -import { buildSlo } from '../../fixtures/slo/slo'; +import { buildSlo } from '../../data/slo/slo'; import type { ConfigSchema } from '../../plugin'; import type { Subset } from '../../typings'; import { paths } from '../../config'; diff --git a/x-pack/plugins/observability/public/pages/slo_edit/index.test.tsx b/x-pack/plugins/observability/public/pages/slo_edit/index.test.tsx index c2ebb9b2f1f7c..2d183648e7000 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/index.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/index.test.tsx @@ -21,7 +21,7 @@ import { kibanaStartMock } from '../../utils/kibana_react.mock'; import { ConfigSchema } from '../../plugin'; import { Subset } from '../../typings'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from './constants'; -import { buildSlo } from '../../fixtures/slo/slo'; +import { buildSlo } from '../../data/slo/slo'; import { paths } from '../../config'; import { SloEditPage } from '.'; diff --git a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_badges.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_badges.stories.tsx index d0c8f0bab2c4e..f3abb871e6e2f 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_badges.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_badges.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { buildForecastedSlo } from '../../../../fixtures/slo/slo'; +import { buildForecastedSlo } from '../../../../data/slo/slo'; import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloBadges as Component, Props } from './slo_badges'; diff --git a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx index 2a39aaadb9bd6..a8a3933be95d4 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx @@ -12,10 +12,10 @@ import { buildCustomKqlIndicator, buildApmAvailabilityIndicator, buildApmLatencyIndicator, -} from '../../../../fixtures/slo/indicator'; +} from '../../../../data/slo/indicator'; import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloIndicatorTypeBadge as Component, Props } from './slo_indicator_type_badge'; -import { buildSlo } from '../../../../fixtures/slo/slo'; +import { buildSlo } from '../../../../data/slo/slo'; export default { component: Component, diff --git a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_status_badge.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_status_badge.stories.tsx index b6e778cd675dc..5ab384419dd28 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_status_badge.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_status_badge.stories.tsx @@ -10,7 +10,7 @@ import { ComponentStory } from '@storybook/react'; import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloStatusBadge as Component, SloStatusProps } from './slo_status_badge'; -import { buildSlo } from '../../../../fixtures/slo/slo'; +import { buildSlo } from '../../../../data/slo/slo'; export default { component: Component, diff --git a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_time_window_badge.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_time_window_badge.stories.tsx index 7125808c1d8ff..361b839b7bf7e 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/badges/slo_time_window_badge.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/badges/slo_time_window_badge.stories.tsx @@ -10,7 +10,7 @@ import { ComponentStory } from '@storybook/react'; import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloTimeWindowBadge as Component, Props } from './slo_time_window_badge'; -import { buildSlo } from '../../../../fixtures/slo/slo'; +import { buildSlo } from '../../../../data/slo/slo'; export default { component: Component, diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_delete_confirmation_modal.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_delete_confirmation_modal.stories.tsx index 936c5109b7a2e..675aba1158010 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_delete_confirmation_modal.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_delete_confirmation_modal.stories.tsx @@ -13,7 +13,7 @@ import { SloDeleteConfirmationModal as Component, SloDeleteConfirmationModalProps, } from './slo_delete_confirmation_modal'; -import { buildSlo } from '../../../fixtures/slo/slo'; +import { buildSlo } from '../../../data/slo/slo'; export default { component: Component, diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx index 85d58131ed1fa..17d7c74ccc066 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_item.stories.tsx @@ -11,8 +11,8 @@ import { ComponentStory } from '@storybook/react'; import { HEALTHY_ROLLING_SLO, historicalSummaryData, -} from '../../../fixtures/slo/historical_summary_data'; -import { buildSlo } from '../../../fixtures/slo/slo'; +} from '../../../data/slo/historical_summary_data'; +import { buildSlo } from '../../../data/slo/slo'; import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { SloListItem as Component, SloListItemProps } from './slo_list_item'; diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx index 52c55445597cc..560353e483960 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_list_items.stories.tsx @@ -10,7 +10,7 @@ import { ComponentStory } from '@storybook/react'; import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { SloListItems as Component, Props } from './slo_list_items'; -import { sloList } from '../../../fixtures/slo/slo'; +import { sloList } from '../../../data/slo/slo'; export default { component: Component, diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_sparkline.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_sparkline.stories.tsx index d4fc20763b3f6..d934901a34370 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_sparkline.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_sparkline.stories.tsx @@ -16,7 +16,7 @@ import { historicalSummaryData, DEGRADING_FAST_ROLLING_SLO, NO_DATA_TO_HEALTHY_ROLLING_SLO, -} from '../../../fixtures/slo/historical_summary_data'; +} from '../../../data/slo/historical_summary_data'; import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { SloSparkline as Component, Props } from './slo_sparkline'; diff --git a/x-pack/plugins/observability/public/pages/slos/components/slo_summary.stories.tsx b/x-pack/plugins/observability/public/pages/slos/components/slo_summary.stories.tsx index 207208eaae5cc..0998c8b1d4edf 100644 --- a/x-pack/plugins/observability/public/pages/slos/components/slo_summary.stories.tsx +++ b/x-pack/plugins/observability/public/pages/slos/components/slo_summary.stories.tsx @@ -12,8 +12,8 @@ import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.story import { HEALTHY_ROLLING_SLO, historicalSummaryData, -} from '../../../fixtures/slo/historical_summary_data'; -import { buildSlo } from '../../../fixtures/slo/slo'; +} from '../../../data/slo/historical_summary_data'; +import { buildSlo } from '../../../data/slo/slo'; import { SloSummary as Component, Props } from './slo_summary'; export default { diff --git a/x-pack/plugins/observability/public/pages/slos/index.test.tsx b/x-pack/plugins/observability/public/pages/slos/index.test.tsx index c40451dbcffb9..fc2bf1602063e 100644 --- a/x-pack/plugins/observability/public/pages/slos/index.test.tsx +++ b/x-pack/plugins/observability/public/pages/slos/index.test.tsx @@ -14,11 +14,11 @@ import { useFetchSloList } from '../../hooks/slo/use_fetch_slo_list'; import { useFetchHistoricalSummary } from '../../hooks/slo/use_fetch_historical_summary'; import { useLicense } from '../../hooks/use_license'; import { SlosPage } from '.'; -import { emptySloList, sloList } from '../../fixtures/slo/slo'; +import { emptySloList, sloList } from '../../data/slo/slo'; import type { ConfigSchema } from '../../plugin'; import type { Subset } from '../../typings'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; -import { historicalSummaryData } from '../../fixtures/slo/historical_summary_data'; +import { historicalSummaryData } from '../../data/slo/historical_summary_data'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'),