Skip to content

Commit 74da12e

Browse files
authored
refactor: cypress e2e tests to use Cucumber MAASENG-5892 (#5930)
1 parent 6b5c3ab commit 74da12e

File tree

14 files changed

+91
-8
lines changed

14 files changed

+91
-8
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: Network Discovery
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the network discovery page
6+
Then the main toolbar heading should be "Network discovery"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: DNS
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the domains page
6+
Then the main toolbar heading should be "DNS"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: KVM listing
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the kvm page
6+
Then the main toolbar heading should be "LXD"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: Pools list
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the pools page
6+
Then the pools heading should show machine and pool counts
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: User preferences
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the preferences page
6+
Then the side navigation title should be "My preferences"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: Zones
2+
3+
Scenario: The correct heading is rendered
4+
Given the user is logged in
5+
When the user navigates to the zones page
6+
Then the main toolbar heading should be "Availability zones"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Then } from "@badeball/cypress-cucumber-preprocessor";
2+
3+
Then("the main toolbar heading should be {string}", (expectedHeading) => {
4+
cy.get("[data-testid='main-toolbar-heading']").should(
5+
"contain",
6+
expectedHeading
7+
);
8+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { When } from "@badeball/cypress-cucumber-preprocessor";
2+
import { generateMAASURL } from "../../../e2e/utils";
3+
4+
When("the user navigates to the network discovery page", () => {
5+
cy.visit(generateMAASURL("/network-discovery"));
6+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { When } from "@badeball/cypress-cucumber-preprocessor";
2+
import { generateMAASURL } from "../../../e2e/utils";
3+
4+
When("the user navigates to the domains page", () => {
5+
cy.visit(generateMAASURL("/domains"));
6+
});
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
import { Then, When } from "@badeball/cypress-cucumber-preprocessor";
1+
import { When } from "@badeball/cypress-cucumber-preprocessor";
22
import { generateMAASURL } from "../../../e2e/utils";
33

44
When("the user navigates to the images page", () => {
55
cy.visit(generateMAASURL("/images"));
66
});
7-
8-
Then("the main toolbar heading should be {string}", (expectedHeading) => {
9-
cy.get("[data-testid='main-toolbar-heading']").should(
10-
"contain",
11-
expectedHeading
12-
);
13-
});

0 commit comments

Comments
 (0)