diff --git a/app/gui2/e2e/locate.ts b/app/gui2/e2e/locate.ts index 505b7ca0ab9..d41174d88ce 100644 --- a/app/gui2/e2e/locate.ts +++ b/app/gui2/e2e/locate.ts @@ -95,7 +95,7 @@ function componentLocator(locatorStr: string) { export const graphEditor = componentLocator('.GraphEditor') export const codeEditor = componentLocator('.CodeEditor') -export const anyVisualization = componentLocator('.GraphVisualization > *') +export const anyVisualization = componentLocator('.GraphVisualization') export const loadingVisualization = componentLocator('.LoadingVisualization') export const circularMenu = componentLocator('.CircularMenu') export const addNewNodeButton = componentLocator('.PlusButton') @@ -141,15 +141,26 @@ export function bottomDock(page: Page) { export const navBreadcrumb = componentLocator('.NavBreadcrumb') export const componentBrowserInput = componentLocator('.ComponentEditor') -export const jsonVisualization = componentLocator('.JSONVisualization') -export const tableVisualization = componentLocator('.TableVisualization') -export const scatterplotVisualization = componentLocator('.ScatterplotVisualization') -export const histogramVisualization = componentLocator('.HistogramVisualization') -export const heatmapVisualization = componentLocator('.HeatmapVisualization') -export const sqlVisualization = componentLocator('.SqlVisualization') -export const geoMapVisualization = componentLocator('.GeoMapVisualization') -export const imageBase64Visualization = componentLocator('.ImageBase64Visualization') -export const warningsVisualization = componentLocator('.WarningsVisualization') + +function visualizationLocator(visSelector: string) { + // Playwright pierces shadow roots, but not within a single XPath. + // Locate the visualization content, then locate the descendant. + const visLocator = componentLocator(visSelector) + return (page: Locator | Page, filter?: (f: Filter) => { selector: string }) => { + const hostLocator = page.locator('.VisualizationHostContainer') + return visLocator(hostLocator, filter) + } +} + +export const jsonVisualization = visualizationLocator('.JSONVisualization') +export const tableVisualization = visualizationLocator('.TableVisualization') +export const scatterplotVisualization = visualizationLocator('.ScatterplotVisualization') +export const histogramVisualization = visualizationLocator('.HistogramVisualization') +export const heatmapVisualization = visualizationLocator('.HeatmapVisualization') +export const sqlVisualization = visualizationLocator('.SqlVisualization') +export const geoMapVisualization = visualizationLocator('.GeoMapVisualization') +export const imageBase64Visualization = visualizationLocator('.ImageBase64Visualization') +export const warningsVisualization = visualizationLocator('.WarningsVisualization') // === Edge locators === diff --git a/app/gui2/src/App.vue b/app/gui2/src/App.vue index 1d3f5736059..f590ef32e02 100644 --- a/app/gui2/src/App.vue +++ b/app/gui2/src/App.vue @@ -130,37 +130,30 @@ registerAutoBlurHandler() :deep(.scrollable) { scrollbar-color: rgba(190 190 190 / 50%) transparent; -} - -:deep(.scrollable)::-webkit-scrollbar { - -webkit-appearance: none; -} - -:deep(.scrollable)::-webkit-scrollbar-track { - -webkit-box-shadow: none; -} - -:deep(.scrollable)::-webkit-scrollbar:vertical { - width: 11px; -} - -:deep(.scrollable)::-webkit-scrollbar:horizontal { - height: 11px; -} - -:deep(.scrollable)::-webkit-scrollbar-thumb { - border-radius: 8px; - border: 1px solid rgba(220, 220, 220, 0.5); - background-color: rgba(190, 190, 190, 0.5); -} - -:deep(.scrollable)::-webkit-scrollbar-corner { - background: rgba(0, 0, 0, 0); -} - -:deep(.scrollable)::-webkit-scrollbar-button { - height: 8px; - width: 8px; + &::-webkit-scrollbar { + -webkit-appearance: none; + } + &::-webkit-scrollbar-track { + -webkit-box-shadow: none; + } + &::-webkit-scrollbar:vertical { + width: 11px; + } + &::-webkit-scrollbar:horizontal { + height: 11px; + } + &::-webkit-scrollbar-thumb { + border-radius: 8px; + border: 1px solid rgba(220, 220, 220, 0.5); + background-color: rgba(190, 190, 190, 0.5); + } + &::-webkit-scrollbar-corner { + background: rgba(0, 0, 0, 0); + } + &::-webkit-scrollbar-button { + height: 8px; + width: 8px; + } } :deep(.draggable) { diff --git a/app/gui2/src/components/DropdownMenu.vue b/app/gui2/src/components/DropdownMenu.vue index e0b07e0fa71..5d91d4a4a31 100644 --- a/app/gui2/src/components/DropdownMenu.vue +++ b/app/gui2/src/components/DropdownMenu.vue @@ -11,6 +11,7 @@ const open = defineModel('open', { default: false }) const props = defineProps<{ title?: string | undefined placement?: Placement + alwaysShowArrow?: boolean | undefined }>() const rootElement = shallowRef() @@ -42,7 +43,11 @@ const { floatingStyles } = useFloating(rootElement, floatElement, { > - +