From e532223435ae0b8bf84a926efccc5708462ca473 Mon Sep 17 00:00:00 2001 From: Tim Glaser Date: Fri, 2 Apr 2021 20:07:33 +0200 Subject: [PATCH] Fix feature flags insight link (#3865) --- cypress/integration/featureFlags.js | 5 +++++ frontend/src/scenes/experimentation/FeatureFlags.tsx | 1 + 2 files changed, 6 insertions(+) diff --git a/cypress/integration/featureFlags.js b/cypress/integration/featureFlags.js index 24d0d4dd722..0fdedcb7ed7 100644 --- a/cypress/integration/featureFlags.js +++ b/cypress/integration/featureFlags.js @@ -33,6 +33,11 @@ describe('Feature Flags', () => { cy.get('[data-attr=feature-flag-submit]').click() cy.get('.Toastify__toast-body').click() // clicking the toast gets you back to the list cy.get('[data-attr=feature-flag-table]').should('contain', 'beta-feature-updated') + + cy.get('[data-attr=usage]').click() + cy.location().should((loc) => { + expect(loc.pathname.toString()).to.contain('/insight') + }) }) it('Delete feature flag', () => { diff --git a/frontend/src/scenes/experimentation/FeatureFlags.tsx b/frontend/src/scenes/experimentation/FeatureFlags.tsx index d89ea262f82..b80a5947f9d 100644 --- a/frontend/src/scenes/experimentation/FeatureFlags.tsx +++ b/frontend/src/scenes/experimentation/FeatureFlags.tsx @@ -84,6 +84,7 @@ export function FeatureFlags(): JSX.Element { BackTo } data-attr="usage" + onClick={(e) => e.stopPropagation()} > Insights