Test basic global observer only (#1101)

This commit is contained in:
RachelElysia 2021-06-16 13:39:51 -04:00 committed by GitHub
parent 7a7943ddce
commit 8a77d64e65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,17 +5,48 @@ if (Cypress.env("FLEET_TIER") === "basic") {
cy.login();
cy.seedBasic();
cy.seedQueries();
cy.addDockerHost();
cy.logout();
});
it("Can perform the appropriate actions", () => {
afterEach(() => {
cy.stopDockerHost();
});
it("Can perform the appropriate basic global observer actions", () => {
cy.login("oliver@organization.com", "user123#");
cy.visit("/");
// Ensure page is loaded
cy.contains("All hosts");
// TODO write the test!
// Host manage page: Can see team column
cy.visit("/hosts/manage");
cy.get("thead").within(() => {
cy.findByText(/team/i).should("exist");
});
// Host details page: Can see team on host
cy.get("tbody").within(() => {
// Test host text varies
cy.findByRole("button").click();
});
cy.get(".title").within(() => {
cy.findByText("Team").should("exist");
});
// Query pages: Can see team in select targets dropdown
cy.visit("/queries/manage");
cy.findByText(/detect presence/i).click();
cy.findByRole("button", { name: /run query/i }).click();
cy.get(".target-select").within(() => {
cy.findByText(/Label name, host name, IP address, etc./i).click();
cy.findByText(/teams/i).should("exist");
});
});
it("Should verify Teams on Hosts page", () => {