E2E fixes: Updating seeded users DOM (#8100)
This commit is contained in:
@@ -197,7 +197,9 @@ describe(
|
||||
});
|
||||
});
|
||||
it("displays the 'Create user' button", () => {
|
||||
cy.findByRole("button", { name: /create user/i }).click();
|
||||
cy.findByRole("button", { name: /create user/i }).click({
|
||||
force: true,
|
||||
});
|
||||
});
|
||||
it("hides assigning a user to a team", () => {
|
||||
cy.findByText(/team/i).should("not.exist");
|
||||
|
||||
@@ -540,13 +540,13 @@ describe("Premium tier - Global Admin user", () => {
|
||||
cy.getAttached(".react-tabs").within(() => {
|
||||
cy.findByText(/users/i).click();
|
||||
});
|
||||
cy.findByRole("button", { name: /create user/i }).click();
|
||||
cy.findByRole("button", { name: /create user/i }).click({ force: true });
|
||||
cy.findByText(/assign teams/i).should("exist");
|
||||
});
|
||||
it("allows global admin to edit existing user password", () => {
|
||||
cy.visit("/settings/users");
|
||||
cy.getAttached("tbody").within(() => {
|
||||
cy.findByText("Oliver") // case-sensitive
|
||||
cy.contains("Oliver") // case-sensitive
|
||||
.parent()
|
||||
.next()
|
||||
.next()
|
||||
|
||||
@@ -163,7 +163,7 @@ describe("Premium tier - Team Admin user", () => {
|
||||
cy.findByText(/apples/i).should("exist");
|
||||
});
|
||||
it("displays the team admin controls", () => {
|
||||
cy.findByRole("button", { name: /create user/i }).click();
|
||||
cy.findByRole("button", { name: /create user/i }).click({ force: true });
|
||||
cy.findByRole("button", { name: /cancel/i }).click();
|
||||
cy.findByRole("button", { name: /add hosts/i }).click();
|
||||
cy.findByRole("button", { name: /done/i }).click();
|
||||
@@ -172,8 +172,15 @@ describe("Premium tier - Team Admin user", () => {
|
||||
});
|
||||
it("allows team admin to edit a team member", () => {
|
||||
cy.getAttached("tbody").within(() => {
|
||||
cy.getAttached("tr")
|
||||
.eq(1)
|
||||
cy.getAttached("tr");
|
||||
cy.contains("Toni") // case-sensitive
|
||||
.parent()
|
||||
.next()
|
||||
.within(() => {
|
||||
cy.findByText(/observer/i).should("exist");
|
||||
})
|
||||
.next()
|
||||
.next()
|
||||
.within(() => {
|
||||
cy.findByText(/action/i).click();
|
||||
cy.findByText(/edit/i).click();
|
||||
@@ -185,8 +192,10 @@ describe("Premium tier - Team Admin user", () => {
|
||||
});
|
||||
cy.findByRole("button", { name: /save/i }).click();
|
||||
cy.getAttached("tbody").within(() => {
|
||||
cy.getAttached("tr")
|
||||
.eq(1)
|
||||
cy.getAttached("tr");
|
||||
cy.contains("Toni") // case-sensitive
|
||||
.parent()
|
||||
.next()
|
||||
.within(() => {
|
||||
cy.findByText(/maintainer/i).should("exist");
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script creates 3 users with various roles.
|
||||
# These users are seeded to Fleet Free E2E tests
|
||||
|
||||
source $FLEET_ENV_PATH
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script creates 2 teams and 4 users with various roles.
|
||||
# This script creates 2 teams and 7 users with various roles.
|
||||
# These users are seeded to Fleet Premium E2E tests
|
||||
|
||||
source $FLEET_ENV_PATH
|
||||
|
||||
|
||||
Reference in New Issue
Block a user