From 3019e0b72c5cda522951647f6d4c7a2ec74c7a90 Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Thu, 8 Apr 2021 14:19:45 -0700 Subject: [PATCH 1/3] fix opening insights from dashboard --- frontend/src/scenes/trends/trendsLogic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/scenes/trends/trendsLogic.ts b/frontend/src/scenes/trends/trendsLogic.ts index d08f66dea7f8c..9056485e98693 100644 --- a/frontend/src/scenes/trends/trendsLogic.ts +++ b/frontend/src/scenes/trends/trendsLogic.ts @@ -519,7 +519,7 @@ export const trendsLogic = kea< cleanSearchParams['compare'] = false } - Object.assign(cleanSearchParams, getDefaultFilters(values.filters, values.eventNames)) + Object.assign(cleanSearchParams, getDefaultFilters(cleanSearchParams, values.eventNames)) if (!objectsEqual(cleanSearchParams, values.filters)) { actions.setFilters(cleanSearchParams, false) From 587516e72432547d94e6876d06b59fde70bfe93e Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Thu, 8 Apr 2021 14:25:35 -0700 Subject: [PATCH 2/3] add E2E test case --- cypress/integration/dashboard.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cypress/integration/dashboard.js b/cypress/integration/dashboard.js index d6d548f742f1c..6b7a4b9c0a0d9 100644 --- a/cypress/integration/dashboard.js +++ b/cypress/integration/dashboard.js @@ -113,4 +113,12 @@ describe('Dashboard', () => { cy.get('[data-attr="dashboard-item-0-dropdown-move-0"]').click({ force: true }) cy.get('[data-attr=success-toast]').should('exist') }) + + it('Opens dashboard item in insights', () => { + cy.get('[data-attr=dashboard-name]').contains('My App Dashboard').click() + cy.get('[data-attr=dashboard-item-0] .dashboard-item-title a').click() + cy.location('pathname').should('include', '/insights') + cy.get('[data-attr=math-selector-0]').contains('Active users').should('exist') + cy.get('[data-attr=trend-line-graph]').should('exist') + }) }) From fabdda91135f0358656cf9637abafca0dc468d94 Mon Sep 17 00:00:00 2001 From: Paolo D'Amico Date: Thu, 8 Apr 2021 15:38:57 -0700 Subject: [PATCH 3/3] fix flaky test --- cypress/integration/person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/person.js b/cypress/integration/person.js index 6c303f244d396..19a8566dea452 100644 --- a/cypress/integration/person.js +++ b/cypress/integration/person.js @@ -1,6 +1,6 @@ describe('Person Visualization Check', () => { beforeEach(() => { - cy.get('[data-attr=menu-item-persons]').click() + cy.get('[data-attr=menu-item-persons]').click().click() cy.get('.ant-spin-spinning').should('not.exist') // Wait until initial table load to be able to use the search cy.get('[data-attr=persons-search]').type('deb').should('have.value', 'deb') cy.get('.ant-input-search-button').click()