From bfa05d69f87d164bb781e37d795ab2bea7564c44 Mon Sep 17 00:00:00 2001 From: Noah Mayerhofer Date: Mon, 21 Nov 2022 10:43:02 +0100 Subject: [PATCH] change scroll into view selector (#1864) --- e2e_tests/integration/viz.spec.ts | 7 ++++--- .../PropertiesPanelContent/DetailsPane.tsx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e_tests/integration/viz.spec.ts b/e2e_tests/integration/viz.spec.ts index 9217163abf7..0a9aaa15620 100644 --- a/e2e_tests/integration/viz.spec.ts +++ b/e2e_tests/integration/viz.spec.ts @@ -267,8 +267,9 @@ describe('Viz rendering', () => { // Check that can scroll overview panel const showAllButtonText = 'Show all' - cy.get(`button:contains("${showAllButtonText}")`).scrollIntoView() - cy.get(`button:contains("${showAllButtonText}")`).should('be.visible') + cy.get(`button:contains("${showAllButtonText}")`) + .scrollIntoView() + .should('be.visible') // Open node properties details panel const nodeSelector = '.node' @@ -282,7 +283,7 @@ describe('Viz rendering', () => { cy.contains(lastPropName).should('exist') // For some reason need to get to the td to be able to scroll to it, hence the parent() - cy.get('tr td span').contains(lastPropName).parent().scrollIntoView() + cy.get('[data-testid="viz-details-pane-body"]').scrollTo('bottom') cy.get('tr td span').contains(lastPropName).should('be.visible') }) }) diff --git a/src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/DetailsPane.tsx b/src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/DetailsPane.tsx index a22daabf844..d1ce432d8ea 100644 --- a/src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/DetailsPane.tsx +++ b/src/browser/modules/Stream/CypherFrame/VisualizationView/PropertiesPanelContent/DetailsPane.tsx @@ -86,7 +86,7 @@ export function DetailsPane({ ) })} - +