From 8b02e11edcbc412e7041687e8369ab4c95bff15a Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 22 May 2024 18:40:19 -0600 Subject: [PATCH] Remove references to @/components/ from application tests (#1859) --- .../questions/smallGraphAverageValuesByColumn.ts | 9 ++++++++- .../test/specs/monitoring/sorting-endpoints.spec.ts | 11 +---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Frontend/test/specs/monitoring/questions/smallGraphAverageValuesByColumn.ts b/src/Frontend/test/specs/monitoring/questions/smallGraphAverageValuesByColumn.ts index 93d65ef21..32918eb20 100644 --- a/src/Frontend/test/specs/monitoring/questions/smallGraphAverageValuesByColumn.ts +++ b/src/Frontend/test/specs/monitoring/questions/smallGraphAverageValuesByColumn.ts @@ -1,7 +1,14 @@ import { screen, within } from "@testing-library/vue"; -import { columnName } from "@/components/monitoring/EndpointListRow.vue"; import { fireEvent } from "@testing-library/vue"; +export enum columnName { + ENDPOINTNAME = "name", + QUEUELENGTH = "queueLength", + THROUGHPUT = "throughput", + SCHEDULEDRETRIES = "retries", + PROCESSINGTIME = "processingTime", + CRITICALTIME = "criticalTime", +} export async function smallGraphAverageValuesByColumn({ column }: { column: columnName | string }) { const ungroupedEndpoints = screen.getByRole("treeitem", { name: "ungrouped-endpoints" }); const endpointRows = within(ungroupedEndpoints).getAllByRole("row"); diff --git a/src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts b/src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts index 52755d744..0373d05be 100644 --- a/src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts +++ b/src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts @@ -5,22 +5,13 @@ import { endpointGroupNames } from "./questions/endpointGroupNames"; import { endpointGroup } from "./questions/endpointGroup"; import { sortEndpointsBy } from "./actions/sortEndpointsBy"; import { findSortImageInColumn } from "./questions/sortDirection"; -import { smallGraphAverageValuesByColumn } from "./questions/smallGraphAverageValuesByColumn"; +import { smallGraphAverageValuesByColumn, columnName } from "./questions/smallGraphAverageValuesByColumn"; import { ungroupedEndpointNames } from "./questions/ungroupedEndpointNames"; import * as precondition from "../../preconditions"; import { monitoredEndpointTemplate } from "../../mocks/monitored-endpoint-template"; import { Endpoint } from "@/resources/MonitoringEndpoint"; import { endpointsNames } from "./questions/endpointsNames"; -enum columnName { - ENDPOINTNAME = "name", - QUEUELENGTH = "queueLength", - THROUGHPUT = "throughput", - SCHEDULEDRETRIES = "retries", - PROCESSINGTIME = "processingTime", - CRITICALTIME = "criticalTime", -} - describe("FEATURE: Endpoint sorting", () => { describe("Rule: Grouped endpoints should be able to be sorted in ascending and descending order by group name and by endpoint name inside the group", () => { it("Example: Endpoints inside of the groups and group names should be sorted in the same direction as the ungrouped endpoints", async ({ driver }) => {