E2e test: Fleet basic admin - test host on team (#1117)

This commit is contained in:
RachelElysia 2021-06-17 10:12:00 -04:00 committed by GitHub
parent eaef007982
commit 5387deb40f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ if (Cypress.env("FLEET_TIER") === "basic") {
cy.seedBasic();
cy.setupSMTP();
cy.seedQueries();
cy.addDockerHost("oranges");
cy.addDockerHost("apples");
cy.logout();
});
afterEach(() => {
@ -30,18 +30,19 @@ if (Cypress.env("FLEET_TIER") === "basic") {
// See the “Select a team for this new host” in the Add new host modal. This modal appears after the user selects the “Add new host” button
cy.get(".Select-control").click();
cy.findByText(/no team/i).should("exist");
// cy.findByText(/apples/i).should("exist");
// cy.findByText(/oranges/i).should("exist");
// ^^TODO add back these assertions after dropdown bug is fixed
cy.get(".add-host-modal__team-dropdown-wrapper").within(() => {
cy.findByText(/no team/i).should("exist");
cy.findByText(/apples/i).should("exist");
cy.findByText(/oranges/i).should("exist");
});
cy.contains("button", /done/i).click();
// On the Host details page, they should…
// See the “Team” information below the hostname
// cy.visit("/hosts/1");
// cy.findByText(/team/i).next().contains("Apples");
// ^^TODO this test depends on seeding hosts and assigning hosts to teams
cy.visit("/hosts/1");
cy.findByText(/team/i).next().contains("Apples");
// On the Queries - new / edit / run page, they should…
// See the “Teams” section in the Select target picker. This picker is summoned when the “Select targets” field is selected.