From 8961b7d99cfd55377e4f311710c22ddc8c2c08cb 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 | 6 ++---- cypress/e2e/with-users/machines/actions.spec.ts | 13 ++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/cypress/e2e/with-users/login/login.spec.ts b/cypress/e2e/with-users/login/login.spec.ts index 61343e1a31e..a4bcffcf904 100644 --- a/cypress/e2e/with-users/login/login.spec.ts +++ b/cypress/e2e/with-users/login/login.spec.ts @@ -22,11 +22,9 @@ context("Login page", () => { cy.get(".p-form-validation__message").should("exist"); }); - it("displays an error message if submitted invalid login credentials", () => { + it.only("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 f9a9af78b0d..294de98de6b 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); });