Skip to content

Commit

Permalink
fix: add classnames and update json instructions file for outlier tab…
Browse files Browse the repository at this point in the history
…les (#3000)

* fix: add classnames and update json instructions file

* fix: correct typo in visualisation type

* fix: change urlReg to urlGlob and correct glob pattern for outlier tables

* chore: rename strategy to interceptResponse

* fix: remove query param section from url glob

* fix: wait for different SVG for single value

---------

Co-authored-by: Jen Jones Arnesen <[email protected]>
  • Loading branch information
HendrikThePendric and jenniferarnesen authored Mar 21, 2024
1 parent b4e2154 commit bd95afe
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 19 deletions.
76 changes: 59 additions & 17 deletions public/push-analytics.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"version": "0.0.1",
"clearVisualization": {
"strategy": "navigateToUrl",
"steps": [
{ "goto": "{{appUrl}}/#/" },
{ "waitForSelector": ".push-analytics-start-screen" }
]
},
"showVisualization": {
"strategy": "navigateToUrl",
"steps": [
Expand All @@ -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": [
Expand All @@ -27,24 +39,52 @@
"YEAR_OVER_YEAR_LINE",
"YEAR_OVER_YEAR_COLUMN",
"SCATTER",
"BUBBLE",
"SINGLE_VALUE",
"PIVOT_TABLE",
"OUTLIER_TABLE"
"BUBBLE"
],
"selector": ".highcharts-container"
"selector": ".highcharts-container > svg"
},
{
"dashboardItemProperty": "visualization.type",
"value": "SINGLE_VALUE",
"selector": "[data-test='visualization-container']"
}
]
}
]
},
"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": "OUTLIER_TABLE",
"strategy": "noop"
}
],
"obtainDownloadArtifactConditionally": [
{
"dashboardItemProperty": "visualization.type",
Expand All @@ -53,6 +93,12 @@
"htmlSelector": "body",
"cssSelector": "style"
},
{
"dashboardItemProperty": "visualization.type",
"value": "OUTLIER_TABLE",
"strategy": "interceptResponse",
"urlGlob": "**/analytics/outlierDetection**"
},
{
"dashboardItemProperty": "visualization.type",
"value": [
Expand All @@ -77,9 +123,5 @@
"strategy": "screenShotImgOnDownloadPage",
"htmlSelector": "img"
}
],
"clearVisualization": {
"strategy": "navigateToUrl",
"steps": [{ "goto": "{{appUrl}}/#/new" }]
}
]
}
5 changes: 4 additions & 1 deletion src/components/Visualization/StartScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const StartScreen = ({ error, username }) => {
error ? (
getErrorContent()
) : (
<div data-test="start-screen">
<div
data-test="start-screen"
className="push-analytics-start-screen"
>
<div className={styles.section}>
<h3
className={styles.title}
Expand Down
5 changes: 4 additions & 1 deletion src/components/VisualizationPlugin/OutlierTablePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ const OutlierTablePlugin = ({
scrollHeight={getDataTableScrollHeight(isInModal)}
scrollWidth="100%"
width="auto"
className={styles.dataTable}
className={cx(
styles.dataTable,
'push-analytics-outlier-table'
)}
dataTest="outlier-table"
>
<DataTableHead>
Expand Down

0 comments on commit bd95afe

Please sign in to comment.