Skip to content

Commit

Permalink
Merge branch 'main' into MAASENG-1599-replace-react-portal-with-usepo…
Browse files Browse the repository at this point in the history
…rtal
  • Loading branch information
petermakowski committed Apr 9, 2024
2 parents c7a0663 + 80b9f8a commit 54bbd11
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 264 deletions.
17 changes: 12 additions & 5 deletions cypress/e2e/with-users/subnets/staticroutes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LONG_TIMEOUT } from "../../../constants";
import { generateMAASURL } from "../../utils";

context("Static Routes", () => {
Expand Down Expand Up @@ -27,7 +28,8 @@ context("Static Routes", () => {
});
cy.findByRole("button", { name: /save/i }).click();
cy.findByRole("complementary", { name: /Add static route/i }).should(
"not.exist"
"not.exist",
{ timeout: LONG_TIMEOUT }
);

// Edit static route
Expand All @@ -40,7 +42,7 @@ context("Static Routes", () => {

cy.findByRole("complementary", { name: /Edit static route/i }).within(
() => {
cy.findByLabelText(/gateway ip/i).type("{Backspace}1");
cy.findByLabelText(/gateway ip/i).type("{Backspace}2");
cy.findByRole("button", { name: /save/i }).click();
}
);
Expand All @@ -51,8 +53,9 @@ context("Static Routes", () => {
cy.findByText(staticRoute as string);
});
});
cy.findByRole("complementary", { name: /Add static route/i }).should(
"not.exist"
cy.findByRole("complementary", { name: /Edit static route/i }).should(
"not.exist",
{ timeout: LONG_TIMEOUT }
);

// Delete the static route
Expand All @@ -70,11 +73,15 @@ context("Static Routes", () => {
cy.findByRole("button", { name: /delete/i }).click();
}
);
cy.findByRole("complementary", {
name: /Delete static route/i,
}).should("not.exist", {
timeout: LONG_TIMEOUT,
});
cy.get("@staticRoute").then((staticRoute: unknown) => {
cy.findByRole("region", { name: /Static routes/i }).within(() => {
cy.findByText(staticRoute as string).should("not.exist");
});
});
cy.findByRole("region", { name: /side panel/i }).should("not.exist");
});
});
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
"@types/node": "20.11.30",
"@types/path-parse": "1.0.22",
"@types/pluralize": "0.0.33",
"@types/react": "18.2.73",
"@types/react-dom": "18.2.23",
"@types/react": "18.2.75",
"@types/react-dom": "18.2.24,
"@types/react-redux": "7.1.33",
"@types/react-router": "5.1.20",
"@types/react-router-dom": "5.3.3",
Expand Down Expand Up @@ -159,12 +159,12 @@
"webpack": "5.91.0"
},
"resolutions": {
"node_modules/@types/react-router-dom/@types/react": "18.2.73",
"@types/react": "18.2.73",
"@types/react-dom": "18.2.23"
"node_modules/@types/react-router-dom/@types/react": "18.2.75",
"@types/react": "18.2.75",
"@types/react-dom": "18.2.24"
},
"peerDependencies": {
"@types/react": "18.2.73"
"@types/react": "18.2.75"
},
"browserslist": {
"production": [
Expand Down
Loading

0 comments on commit 54bbd11

Please sign in to comment.