mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 08:28:52 +00:00
Test basic global observer only (#1101)
This commit is contained in:
parent
7a7943ddce
commit
8a77d64e65
1 changed files with 33 additions and 2 deletions
|
|
@ -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", () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue