E2e test: Fleet basic observers - global and team only (#1118)
* Oliver flow with some stubbed code * Create team observer only test user and stub test (Toni)
This commit is contained in:
@@ -5,7 +5,7 @@ if (Cypress.env("FLEET_TIER") === "basic") {
|
||||
cy.login();
|
||||
cy.seedBasic();
|
||||
cy.seedQueries();
|
||||
cy.addDockerHost();
|
||||
cy.addDockerHost("apples");
|
||||
cy.logout();
|
||||
});
|
||||
|
||||
@@ -49,25 +49,20 @@ if (Cypress.env("FLEET_TIER") === "basic") {
|
||||
});
|
||||
});
|
||||
|
||||
it("Should verify Teams on Hosts page", () => {
|
||||
cy.login("marco@organization.com", "user123#");
|
||||
// Pseudo code for team observer only
|
||||
// TODO: Rebuild this test according to new manual QA
|
||||
it("Can perform the appropriate basic team observer only actions", () => {
|
||||
cy.login("toni@organization.com", "user123#");
|
||||
cy.visit("/hosts/manage");
|
||||
|
||||
cy.findByText("All hosts which have enrolled in Fleet").should("exist");
|
||||
|
||||
// TODO: can see the "Team" column in the Hosts table
|
||||
// cy.contains(".table-container .data-table__table th", "Team").should("be.visible");
|
||||
});
|
||||
|
||||
it("Should verify hidden items on Hosts page", () => {
|
||||
cy.login("marco@organization.com", "user123#");
|
||||
cy.visit("/hosts/manage");
|
||||
|
||||
cy.findByText("Packs").should("not.exist");
|
||||
cy.findByText("Queries").should("not.exist");
|
||||
cy.findByText("Settings").should("not.exist");
|
||||
|
||||
// TODO: can see the "Team" column in the Hosts table
|
||||
// cy.contains(".table-container .data-table__table th", "Team").should("be.visible");
|
||||
cy.contains(".table-container .data-table__table th", "Team").should(
|
||||
"be.visible"
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,3 +75,20 @@ data='{
|
||||
]
|
||||
}'
|
||||
curl -X POST $CURL_FLAGS -H "Authorization: Bearer $TOKEN" "$SERVER_URL/$create_user_endpoint" -d "$data" --insecure
|
||||
|
||||
# Create Toni
|
||||
data='{
|
||||
"name": "Toni",
|
||||
"username": "Toni",
|
||||
"email": "toni@organization.com",
|
||||
"password": "user123#",
|
||||
"invited_by": 1,
|
||||
"global_role": null,
|
||||
"teams": [
|
||||
{
|
||||
"id": 1,
|
||||
"role": "observer"
|
||||
}
|
||||
]
|
||||
}'
|
||||
curl -X POST $CURL_FLAGS -H "Authorization: Bearer $TOKEN" "$SERVER_URL/$create_user_endpoint" -d "$data" --insecure
|
||||
|
||||
Reference in New Issue
Block a user