diff --git a/cypress/integration/users_test.spec.ts b/cypress/integration/users_test.spec.ts new file mode 100644 index 0000000000..623a004927 --- /dev/null +++ b/cypress/integration/users_test.spec.ts @@ -0,0 +1,22 @@ +import SidebarPage from "../support/pages/admin_console/SidebarPage"; +import LoginPage from "../support/pages/LoginPage"; + +describe("Users test", () => { + const loginPage = new LoginPage(); + const sidebarPage = new SidebarPage(); + + describe("User creation", () => { + beforeEach(function () { + cy.visit(""); + loginPage.logIn(); + sidebarPage.goToUsers(); + }); + + it("Go to create User page", () => { + cy.get("[data-testid=add-user").click(); + cy.url().should("include", "users/add-user"); + cy.get("[data-testid=cancel-create-user").click(); + cy.url().should("not.include", "/add-user"); + }); + }); +}); diff --git a/src/user/UserForm.tsx b/src/user/UserForm.tsx index 4945fa5a1e..c637d32e86 100644 --- a/src/user/UserForm.tsx +++ b/src/user/UserForm.tsx @@ -6,7 +6,6 @@ import { Select, SelectOption, Switch, - TextArea, TextInput, } from "@patternfly/react-core"; import { useTranslation } from "react-i18next"; @@ -219,7 +218,11 @@ export const UserForm = ({ form, save }: UserFormProps) => { - diff --git a/src/user/UsersSection.tsx b/src/user/UsersSection.tsx index 58d2b0b150..4fcba14380 100644 --- a/src/user/UsersSection.tsx +++ b/src/user/UsersSection.tsx @@ -194,7 +194,9 @@ export const UsersSection = () => { toolbarItem={ <> - +