From 1c2638fe06ac7e9e87bc956cced99debaafc40d9 Mon Sep 17 00:00:00 2001 From: HendrikThePendric Date: Wed, 20 Mar 2024 09:41:58 +0100 Subject: [PATCH] fix: add classnames and update json instructions file --- public/push-analytics.json | 70 ++++++++++++++----- src/components/Visualization/StartScreen.js | 5 +- .../VisualizationPlugin/OutlierTablePlugin.js | 5 +- 3 files changed, 62 insertions(+), 18 deletions(-) diff --git a/public/push-analytics.json b/public/push-analytics.json index b74e9691d6..0dc0c50967 100644 --- a/public/push-analytics.json +++ b/public/push-analytics.json @@ -1,5 +1,12 @@ { "version": "0.0.1", + "clearVisualization": { + "strategy": "navigateToUrl", + "steps": [ + { "goto": "{{appUrl}}/#/" }, + { "waitForSelector": ".push-analytics-start-screen" } + ] + }, "showVisualization": { "strategy": "navigateToUrl", "steps": [ @@ -11,6 +18,11 @@ "value": "PIVOT_TABLE", "selector": ".pivot-table-container > table" }, + { + "dashboardItemProperty": "visualization.type", + "value": "OUTLIER_TABLE", + "selector": ".push-analytics-outlier-table" + }, { "dashboardItemProperty": "visualization.type", "value": [ @@ -28,23 +40,47 @@ "YEAR_OVER_YEAR_COLUMN", "SCATTER", "BUBBLE", - "SINGLE_VALUE", - "PIVOT_TABLE", - "OUTLIER_TABLE" + "SINGLE_VALUE" ], - "selector": ".highcharts-container" + "selector": ".highcharts-container > svg" } ] } ] }, - "triggerDownload": { - "strategy": "useUiElements", - "steps": [ - { "click": ".push-analytics-download-dropdown-menu-button" }, - { "click": ".push-analytics-download-menu-item" } - ] - }, + "triggerDownloadConditionally": [ + { + "dashboardItemProperty": "visualization.type", + "value": [ + "COLUMN", + "STACKED_COLUMN", + "BAR", + "STACKED_BAR", + "LINE", + "AREA", + "STACKED_AREA", + "PIE", + "RADAR", + "GAUGE", + "YEAR_OVER_YEAR_LINE", + "YEAR_OVER_YEAR_COLUMN", + "SCATTER", + "BUBBLE", + "SINGLE_VALUE", + "PIVOT_TABLE" + ], + "strategy": "useUiElements", + "steps": [ + { "click": ".push-analytics-download-dropdown-menu-button" }, + { "click": ".push-analytics-download-menu-item" } + ] + }, + { + "dashboardItemProperty": "visualization.type", + "value": "OULIER_TABLE", + "strategy": "noop" + } + ], "obtainDownloadArtifactConditionally": [ { "dashboardItemProperty": "visualization.type", @@ -53,6 +89,12 @@ "htmlSelector": "body", "cssSelector": "style" }, + { + "dashboardItemProperty": "visualization.type", + "value": "OULIER_TABLE", + "strategy": "interceptRequest", + "urlReg": "*/analytics/outlierDetection?displayProperty=NAME&*" + }, { "dashboardItemProperty": "visualization.type", "value": [ @@ -77,9 +119,5 @@ "strategy": "screenShotImgOnDownloadPage", "htmlSelector": "img" } - ], - "clearVisualization": { - "strategy": "navigateToUrl", - "steps": [{ "goto": "{{appUrl}}/#/new" }] - } + ] } diff --git a/src/components/Visualization/StartScreen.js b/src/components/Visualization/StartScreen.js index 4f0994e104..1d2801e4dc 100644 --- a/src/components/Visualization/StartScreen.js +++ b/src/components/Visualization/StartScreen.js @@ -46,7 +46,10 @@ const StartScreen = ({ error, username }) => { error ? ( getErrorContent() ) : ( -
+