From e60332b8b06bc714394eec3f51090e163de88df2 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Thu, 16 Dec 2021 09:54:53 -0800 Subject: [PATCH] Policy Details/Query Details: No hover state if policy/query is not editable by RBAC (#3368) --- changes/issue-3321-spiffier-no-hover-if-not-editable | 1 + cypress/integration/free/maintainer.spec.ts | 1 + cypress/integration/premium/admin.spec.ts | 4 ++++ .../policies/PolicyPage/components/PolicyForm/_styles.scss | 5 ----- .../queries/QueryPage/components/QueryForm/_styles.scss | 2 -- 5 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 changes/issue-3321-spiffier-no-hover-if-not-editable diff --git a/changes/issue-3321-spiffier-no-hover-if-not-editable b/changes/issue-3321-spiffier-no-hover-if-not-editable new file mode 100644 index 0000000000..d1055c4e5c --- /dev/null +++ b/changes/issue-3321-spiffier-no-hover-if-not-editable @@ -0,0 +1 @@ +* No hover state for query or policy details if RBAC does not allow editing \ No newline at end of file diff --git a/cypress/integration/free/maintainer.spec.ts b/cypress/integration/free/maintainer.spec.ts index 726d99ea68..6ca16bc90c 100644 --- a/cypress/integration/free/maintainer.spec.ts +++ b/cypress/integration/free/maintainer.spec.ts @@ -128,6 +128,7 @@ describe( cy.findByRole("button", { name: /save query pack/i }).click(); cy.visit("/packs/manage"); + cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting cy.get(".fleet-checkbox__input").check({ force: true }); diff --git a/cypress/integration/premium/admin.spec.ts b/cypress/integration/premium/admin.spec.ts index 3fb9e66c08..450116fdbd 100644 --- a/cypress/integration/premium/admin.spec.ts +++ b/cypress/integration/premium/admin.spec.ts @@ -216,6 +216,8 @@ describe( // On the Settings pages, they should… // See the “Teams” navigation item and access the Settings - Teams page cy.visit("/settings/organization"); + cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting + cy.get(".react-tabs").within(() => { cy.findByText(/teams/i).click(); }); @@ -236,6 +238,8 @@ describe( // On the Profile page, they should… // See Global in the Team section and Admin in the Role section cy.visit("/profile"); + cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting + cy.findByText(/team/i) .next() .contains(/global/i); diff --git a/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss b/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss index 534b810003..bac925b4de 100644 --- a/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss +++ b/frontend/pages/policies/PolicyPage/components/PolicyForm/_styles.scss @@ -46,16 +46,11 @@ margin: $pad-large 0; line-height: 2rem; height: 2rem; - cursor: pointer; } .policy-form__policy-resolve, .resolve-text-wrapper { margin-top: $pad-large; } - .policy-form__policy-description:not(textarea), - .policy-form__policy-resolution-button:not(textarea) { - cursor: pointer; - } #policy-description { height: 38px; } diff --git a/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss b/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss index dc55fb86aa..2f22cd5783 100644 --- a/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss +++ b/frontend/pages/queries/QueryPage/components/QueryForm/_styles.scss @@ -46,11 +46,9 @@ margin-top: $pad-large; line-height: 2rem; height: 2rem; - cursor: pointer; } .query-form__query-description:not(textarea) { margin: 0.25rem 0 1rem; - cursor: pointer; } textarea.query-form__query-description { margin-top: 0.8125rem;