From 5387deb40fa15ab4790aad0f1fe7c9e8eccea1d6 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Thu, 17 Jun 2021 10:12:00 -0400 Subject: [PATCH] E2e test: Fleet basic admin - test host on team (#1117) --- cypress/integration/basic/admin.spec.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/cypress/integration/basic/admin.spec.ts b/cypress/integration/basic/admin.spec.ts index f68ff29817..93d9ff6dd0 100644 --- a/cypress/integration/basic/admin.spec.ts +++ b/cypress/integration/basic/admin.spec.ts @@ -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.