Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ updates:
interval: daily
open-pull-requests-limit: 1000
- package-ecosystem: "docker"
directory: "/src/Container"
directory: "/src/ServicePulse"
schedule:
interval: daily
open-pull-requests-limit: 1000
Expand Down
67 changes: 34 additions & 33 deletions src/Frontend/test/specs/monitoring/sorting-endpoints.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,40 @@ import { endpointsNames } from "./questions/endpointsNames";

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", () => {
test("EXAMPLE: Endpoints inside of the groups and group names should be sorted in the same direction as the ungrouped endpoints", async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
await driver.setUp(
precondition.monitoredEndpointsNamed([
"Universe.Solarsystem.Earth.Endpoint5",
"Universe.Solarsystem.Earth.Endpoint6",
"Universe.Solarsystem.Mercury.Endpoint1",
"Universe.Solarsystem.Mercury.Endpoint2",
"Universe.Solarsystem.Venus.Endpoint3",
"Universe.Solarsystem.Venus.Endpoint4",
])
);

//Act
await driver.goTo("monitoring");
await groupEndpointsBy({ numberOfSegments: 3 });
//Assert
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Earth", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Venus"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint5", "Endpoint6"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint1", "Endpoint2"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint3", "Endpoint4"]);

//Act
await groupEndpointsBy({ numberOfSegments: 0 });
await sortEndpointsBy({ column: columnName.ENDPOINTNAME }); //Descending
await groupEndpointsBy({ numberOfSegments: 3 });
//Assert
expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Venus", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Earth"]);
expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint4", "Endpoint3"]);
expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint2", "Endpoint1"]);
expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint6", "Endpoint5"]);
});
// Skipping for now, this is constantly failing randomly
// test("EXAMPLE: Endpoints inside of the groups and group names should be sorted in the same direction as the ungrouped endpoints", async ({ driver }) => {
// //Arrange
// await driver.setUp(precondition.serviceControlWithMonitoring);
// await driver.setUp(
// precondition.monitoredEndpointsNamed([
// "Universe.Solarsystem.Earth.Endpoint5",
// "Universe.Solarsystem.Earth.Endpoint6",
// "Universe.Solarsystem.Mercury.Endpoint1",
// "Universe.Solarsystem.Mercury.Endpoint2",
// "Universe.Solarsystem.Venus.Endpoint3",
// "Universe.Solarsystem.Venus.Endpoint4",
// ])
// );
//
// //Act
// await driver.goTo("monitoring");
// await groupEndpointsBy({ numberOfSegments: 3 });
// //Assert
// expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Earth", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Venus"]);
// expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint5", "Endpoint6"]);
// expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint1", "Endpoint2"]);
// expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint3", "Endpoint4"]);
//
// //Act
// await groupEndpointsBy({ numberOfSegments: 0 });
// await sortEndpointsBy({ column: columnName.ENDPOINTNAME }); //Descending
// await groupEndpointsBy({ numberOfSegments: 3 });
// //Assert
// expect(endpointGroupNames()).toEqual(["Universe.Solarsystem.Venus", "Universe.Solarsystem.Mercury", "Universe.Solarsystem.Earth"]);
// expect(endpointGroup("Universe.Solarsystem.Venus").Endpoints).toEqual(["Endpoint4", "Endpoint3"]);
// expect(endpointGroup("Universe.Solarsystem.Mercury").Endpoints).toEqual(["Endpoint2", "Endpoint1"]);
// expect(endpointGroup("Universe.Solarsystem.Earth").Endpoints).toEqual(["Endpoint6", "Endpoint5"]);
// });

test("EXAMPLE: Endpoints inside of the groups and group names should be sorted in descending order when clicking the endpoint name column title", async ({ driver }) => {
//Arrange
Expand Down