From 17abd3f91392e02b2d0d6ed8ea7a4dfc20099da8 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Fri, 1 Mar 2024 09:26:26 +0100 Subject: [PATCH] test: fix lint errors --- cypress/e2e/with-users/login/login.spec.ts | 4 +--- cypress/e2e/with-users/machines/actions.spec.ts | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/cypress/e2e/with-users/login/login.spec.ts b/cypress/e2e/with-users/login/login.spec.ts index 61343e1a31..fedb973129 100644 --- a/cypress/e2e/with-users/login/login.spec.ts +++ b/cypress/e2e/with-users/login/login.spec.ts @@ -24,9 +24,7 @@ context("Login page", () => { it("displays an error message if submitted invalid login credentials", () => { cy.findByRole("textbox", { name: /Username/ }).type("invalid-username"); - cy.findByLabelText(/Password/) - .type("invalid-password") - .type("{enter}"); + cy.findByLabelText(/Password/).type("invalid-password{enter}"); cy.findByRole("alert") .should("be.visible") .should("include.text", "Please enter a correct username and password"); diff --git a/cypress/e2e/with-users/machines/actions.spec.ts b/cypress/e2e/with-users/machines/actions.spec.ts index f9a9af78b0..294de98de6 100644 --- a/cypress/e2e/with-users/machines/actions.spec.ts +++ b/cypress/e2e/with-users/machines/actions.spec.ts @@ -133,9 +133,9 @@ context("Machine listing - actions", () => { cy.findByLabelText(/Name/i).type(poolName); cy.findByRole("button", { name: /Set pool for machine/i }).click(); cy.findByRole("complementary", { name: /Set pool/i }).should("not.exist"); - cy.findByRole("grid", { name: /Machines/i }) - .within(() => cy.findByText(poolName)) - .should("exist"); + cy.findByRole("grid", { name: /Machines/i }).within(() => { + cy.findByText(poolName).should("exist"); + }); cy.deleteMachine(machineName); cy.deletePool(poolName); }); @@ -161,10 +161,9 @@ context("Machine listing - actions", () => { cy.findByRole("cell", { name: /To be added/ }).should("exist"); cy.findByRole("cell", { name: new RegExp(tagName, "i") }).should("exist"); }); - cy.findByRole("button", { name: /Save/i }).click(); - cy.findByRole("grid", { name: /Machines/i }) - .within(() => cy.findByText(tagName)) - .should("exist"); + cy.findByRole("grid", { name: /Machines/i }).within(() => + cy.findByText(tagName).should("exist") + ); cy.deleteMachine(machineName); });