Skip to content

Commit

Permalink
Merge pull request #502 from bartoval/move_loader_from_shared_page_to…
Browse files Browse the repository at this point in the history
…_component

Move loader from shared page to component
  • Loading branch information
bartoval authored Oct 19, 2024
2 parents d7e16c1 + a7a7c36 commit 0f36117
Show file tree
Hide file tree
Showing 35 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion __tests__/pages/Components/Component.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import { ComponentLabels } from '../../../src/pages/ProcessGroups/Components.enum';
import Component from '../../../src/pages/ProcessGroups/views/Component';
import LoadingPage from '../../../src/pages/shared/Loading';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import { ProcessResponse, ComponentResponse } from '../../../src/types/REST.interfaces';

Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Components/PairsList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';

import pairsList from '../../../mocks/data/PROCESS_GROUP_PAIRS.json';
import components from '../../../mocks/data/PROCESS_GROUPS.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import PairsList from '../../../src/pages/ProcessGroups/components/PairList';
import LoadingPage from '../../../src/pages/shared/Loading';
import { ComponentResponse, BasePairs } from '../../../src/types/REST.interfaces';

const data = components.results[0] as ComponentResponse;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Components/ProcessGroups.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import componentsData from '../../../mocks/data/PROCESS_GROUPS.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import Components from '../../../src/pages/ProcessGroups/views/Components';
import LoadingPage from '../../../src/pages/shared/Loading';

const componentResults = componentsData.results;

Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/ErrorConsole.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { render, screen } from '@testing-library/react';
import { Server } from 'miragejs';

import { loadMockServer } from '../../mocks/server';
import LoadingPage from '../../src/core/components/SkLoading';
import { Wrapper } from '../../src/core/components/Wrapper';
import ErrorConsole from '../../src/pages/shared/Errors/Console';
import LoadingPage from '../../src/pages/shared/Loading';

describe('Begin testing the Error Console view', () => {
let server: Server;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/ErrorNotFound.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { render, screen } from '@testing-library/react';
import { Server } from 'miragejs';

import { loadMockServer } from '../../mocks/server';
import LoadingPage from '../../src/core/components/SkLoading';
import { Wrapper } from '../../src/core/components/Wrapper';
import NotFound from '../../src/pages/shared/Errors/NotFound';
import { NotFoundLabels } from '../../src/pages/shared/Errors/NotFound/NotFound.enum';
import LoadingPage from '../../src/pages/shared/Loading';

describe('Begin testing the NotFound view', () => {
let server: Server;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Metrics/Latency.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { loadMockServer } from '../../../mocks/server';
import * as PrometheusAPIModule from '../../../src/API/Prometheus.api';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import Latency from '../../../src/pages/shared/Metrics/components/Latency';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import { ProcessResponse } from '../../../src/types/REST.interfaces';
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Metrics/Metrics.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Suspense } from 'react';

import { act, render, renderHook } from '@testing-library/react';

import { useMetricsState } from '../../../src/pages/shared/Metrics/hooks/useMetricsState';

import { Protocols } from '../../../src/API/REST.enum';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import Metrics, { MetricsProps } from '../../../src/pages/shared/Metrics';
import { useMetricsState } from '../../../src/pages/shared/Metrics/hooks/useMetricsState';
import { configDefaultFilters } from '../../../src/pages/shared/Metrics/Metrics.constants';

describe('useMetrics', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Metrics/Request.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { loadMockServer } from '../../../mocks/server';
import * as PrometheusAPIModule from '../../../src/API/Prometheus.api';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import Request from '../../../src/pages/shared/Metrics/components/Request';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import { ProcessResponse } from '../../../src/types/REST.interfaces';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Metrics/Response.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { loadMockServer } from '../../../mocks/server';
import * as PrometheusAPIModule from '../../../src/API/Prometheus.api';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import Response from '../../../src/pages/shared/Metrics/components/Response';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import { ProcessResponse } from '../../../src/types/REST.interfaces';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Metrics/TcpConnection.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { loadMockServer } from '../../../mocks/server';
import * as PrometheusAPIModule from '../../../src/API/Prometheus.api';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import TcpConnection from '../../../src/pages/shared/Metrics/components/TcpConnection';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import { ProcessResponse } from '../../../src/types/REST.interfaces';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Metrics/Traffic.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import Traffic from '../../../src/pages/shared/Metrics/components/Traffic';
import { MetricsLabels } from '../../../src/pages/shared/Metrics/Metrics.enum';
import * as MetricsModule from '../../../src/pages/shared/Metrics/services/index';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Processes/Details.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import * as router from 'react-router';

import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import Details from '../../../src/pages/Processes/components/Details';
import LoadingPage from '../../../src/pages/shared/Loading';
import { ProcessResponse } from '../../../src/types/REST.interfaces';

const processResult = processesData.results[0] as ProcessResponse;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Processes/PairsList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';

import processesPairsData from '../../../mocks/data/PROCESS_PAIRS.json';
import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import PairsList from '../../../src/pages/Processes/components/PairsList';
import { ProcessesLabels, ProcessesRoutesPaths } from '../../../src/pages/Processes/Processes.enum';
import LoadingPage from '../../../src/pages/shared/Loading';
import { ProcessResponse, PairsResponse } from '../../../src/types/REST.interfaces';

const data = processesData.results[7] as ProcessResponse;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Processes/Process.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import { ProcessesLabels } from '../../../src/pages/Processes/Processes.enum';
import Process from '../../../src/pages/Processes/views/Process';
import LoadingPage from '../../../src/pages/shared/Loading';
import { ProcessResponse } from '../../../src/types/REST.interfaces';

const processResult = processesData.results[0] as ProcessResponse;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Processes/ProcessPairs.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { fireEvent, render, screen, waitForElementToBeRemoved } from '@testing-l
import { Server } from 'miragejs';
import * as router from 'react-router';

import { ProcessesLabels } from '../../../src/pages/Processes/Processes.enum';

import processPairsData from '../../../mocks/data/PROCESS_PAIRS.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import { ProcessesLabels } from '../../../src/pages/Processes/Processes.enum';
import ProcessPair, { ProcessPairContent } from '../../../src/pages/Processes/views/ProcessPair';
import LoadingPage from '../../../src/pages/shared/Loading';
import { PairsResponse } from '../../../src/types/REST.interfaces';

const processPairsResultOpToCart = processPairsData.results[0] as PairsResponse; // HTTP2 flow
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Processes/Processes.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import processesData from '../../../mocks/data/PROCESSES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import Processes from '../../../src/pages/Processes/views/Processes';
import LoadingPage from '../../../src/pages/shared/Loading';

const processesResults = processesData.results;

Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Services/HttpRequests.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import HttpRequests from '../../../src/pages/Services/components/HttpRequests';

import biFlowData from '../../../mocks/data/FLOW_PAIRS.json';
import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import HttpRequests from '../../../src/pages/Services/components/HttpRequests';

const servicesResults = servicesData.results;
const biFlowResults = biFlowData.results;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Services/PairList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import ProcessServerList from '../../../src/pages/Services/components/ProcessServerList';

import biFlowData from '../../../mocks/data/FLOW_PAIRS.json';
import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import ProcessServerList from '../../../src/pages/Services/components/ProcessServerList';

const servicesResults = servicesData.results;
const biFlowResults = biFlowData.results;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Services/Service.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import { ServicesLabels } from '../../../src/pages/Services/Services.enum';
import Service from '../../../src/pages/Services/views/Service';
import LoadingPage from '../../../src/pages/shared/Loading';

const servicesResults = servicesData.results;

Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Services/Services.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import Services from '../../../src/pages/Services/views/Services';
import LoadingPage from '../../../src/pages/shared/Loading';

const servicesResults = servicesData.results;
const service = servicesResults[0];
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Services/TcpConnections.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import TcpConnections from '../../../src/pages/Services/components/TcpConnections';

import biFlowData from '../../../mocks/data/FLOW_PAIRS.json';
import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import TcpConnections from '../../../src/pages/Services/components/TcpConnections';

const servicesResults = servicesData.results;
const tcpBiFlowOpen = biFlowData.results[5];
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Services/TcpTerminatedConnections.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Suspense } from 'react';
import { render, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import TcpTerminatedConnections from '../../../src/pages/Services/components/TcpTerminatedConnections';

import BiflowData from '../../../mocks/data/FLOW_PAIRS.json';
import servicesData from '../../../mocks/data/SERVICES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import TcpTerminatedConnections from '../../../src/pages/Services/components/TcpTerminatedConnections';

const servicesResults = servicesData.results;
const tcpBiFlowTerminated = BiflowData.results[6];
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Sites/PairsList.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Suspense } from 'react';
import { render, screen, waitForElementToBeRemoved } from '@testing-library/react';
import { Server } from 'miragejs';

import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';

import pairsList from '../../../mocks/data/SITE_PAIRS.json';
import sites from '../../../mocks/data/SITES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import { SkEmptyDataLabels } from '../../../src/core/components/SkEmptyData';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import PairsList from '../../../src/pages/Sites/components/PairList';
import { BasePairs, SiteResponse } from '../../../src/types/REST.interfaces';

Expand Down
4 changes: 2 additions & 2 deletions __tests__/pages/Sites/Site.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { fireEvent, render, screen, waitForElementToBeRemoved, waitFor } from '@
import { Server } from 'miragejs';
import * as router from 'react-router';

import { ProcessesRoutesPaths } from '../../../src/pages/Processes/Processes.enum';

import processesData from '../../../mocks/data/PROCESSES.json';
import sitesData from '../../../mocks/data/SITES.json';
import { loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import { ProcessesRoutesPaths } from '../../../src/pages/Processes/Processes.enum';
import { SiteLabels } from '../../../src/pages/Sites/Sites.enum';
import Site from '../../../src/pages/Sites/views/Site';
import { ProcessResponse, SiteResponse } from '../../../src/types/REST.interfaces';
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Sites/Sites.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import sitesData from '../../../mocks/data/SITES.json';
import { MockApiPaths, MockApi, loadMockServer } from '../../../mocks/server';
import { waitForElementToBeRemovedTimeout } from '../../../src/config/config';
import { getTestsIds } from '../../../src/config/testIds';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import ErrorConsole from '../../../src/pages/shared/Errors/Console';
import LoadingPage from '../../../src/pages/shared/Loading';
import Sites from '../../../src/pages/Sites/views/Sites';

const siteResults = sitesData.results;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/pages/Topology/DisplayServices.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { render } from '@testing-library/react';
import { Server } from 'miragejs';

import { loadMockServer } from '../../../mocks/server';
import LoadingPage from '../../../src/core/components/SkLoading';
import { Wrapper } from '../../../src/core/components/Wrapper';
import LoadingPage from '../../../src/pages/shared/Loading';
import DisplayServices from '../../../src/pages/Topology/components/DisplayServices';

describe('DisplayServices', () => {
Expand Down
Loading

0 comments on commit 0f36117

Please sign in to comment.