diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts index b6d23b37ee..e0610d3324 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts @@ -12,7 +12,7 @@ import EditorNavigation, { EntityType, } from "../../../../../support/Pages/EditorNavigation"; -const _mapChartCaption = "g[class*='-caption'] text"; +const _mapChartCaption = "text:last-child"; const _mapChartPlot = (text: string) => "//text()[contains(., '" + text + "')]/.."; @@ -33,7 +33,6 @@ describe( it("2.1 Update the Map type to different types and verify - part1", function () { // Change the map type to World with Antarctica and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "World with Antarctica"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 7); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -43,7 +42,6 @@ describe( // Change the map type to World and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "World"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 6); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -53,7 +51,6 @@ describe( // Change the map type to Europe and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "Europe"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 47); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -63,7 +60,6 @@ describe( // Change the map type to North America and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "North America"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 26); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -73,7 +69,6 @@ describe( // Change the map type to South America and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "South America"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 16); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -85,7 +80,6 @@ describe( it("2.2 Update the Map type to different types and verify - part2", function () { // Change the map type to Oceania and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "Oceania"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 15); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -95,7 +89,6 @@ describe( // Change the map type to Africa and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "Africa"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 56); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -105,7 +98,6 @@ describe( // Change the map type to USA and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "USA"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 51); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -115,7 +107,6 @@ describe( // Change the map type to Asia and verify the number of entities propPane.SelectPropertiesDropDown("Map type", "Asia"); - agHelper.AssertElementLength(viewWidgetsPage.mapChartEntityLabels, 49); deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); @@ -205,7 +196,7 @@ describe( deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); - agHelper.GetNClick(_mapChartPlot("RU"), 0, true); + agHelper.GetNClick(_mapChartPlot("RU: 1.30"), 0, true); agHelper.ValidateToastMessage("Data Point Russian Federation Clicked"); deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("MapChart1", EntityType.Widget); @@ -218,7 +209,7 @@ describe( deployMode.DeployApp( locators._widgetInDeployed(draggableWidgets.MAPCHART), ); - agHelper.GetNClick(_mapChartPlot("CN"), 0, true); + agHelper.GetNClick(_mapChartPlot("CN: .40"), 0, true); agHelper.ValidateToastMessage("Converted to Js and clicked China"); deployMode.NavigateBacktoEditor(); EditorNavigation.SelectEntityByName("MapChart1", EntityType.Widget); @@ -230,7 +221,7 @@ describe( { minValue: 2, maxValue: 3, - code: "#FFFFF", + code: "#000", }, ]; propPane.MoveToTab("Style"); diff --git a/app/client/cypress/locators/ViewWidgets.json b/app/client/cypress/locators/ViewWidgets.json index d369cc307c..f12eadfc45 100644 --- a/app/client/cypress/locators/ViewWidgets.json +++ b/app/client/cypress/locators/ViewWidgets.json @@ -34,6 +34,6 @@ "Chartlabel": ".t--draggable-chartwidget g text", "FusionChartlabel": ".t--draggable-chartwidget g:nth-child(5) text", "pickMyLocation": ".t--draggable-mapwidget div[title='Pick My Location']", - "mapChartEntityLabels": ".t--draggable-mapchartwidget g[class*='-entityLabels'] text", + "mapChartEntityLabels": ".t--draggable-mapchartwidget text", "listWidget": ".t--draggable-listwidget" } diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBorderRadius.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBorderRadius.snap.png index 8a69529aff..f6eca1aa1f 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBorderRadius.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBorderRadius.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBoxShadow.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBoxShadow.snap.png index 331e5b13b6..bd5f3f6c65 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBoxShadow.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithBoxShadow.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snag.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snag.png new file mode 100644 index 0000000000..edd1a8149f Binary files /dev/null and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snag.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snap.png deleted file mode 100644 index 174cb9b0f2..0000000000 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapChartWithColorRange.snap.png and /dev/null differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapchartsimple.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapchartsimple.snap.png index 8c2f89fd4e..20054343e0 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapchartsimple.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapchartsimple.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithafrica.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithafrica.snap.png index 0ae073e47c..3046d3ade3 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithafrica.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithafrica.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithantarctica.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithantarctica.snap.png index 9bfd9b8400..190f349875 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithantarctica.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithantarctica.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithasia.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithasia.snap.png index 377f29bb32..3d352c9175 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithasia.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithasia.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomdata.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomdata.snap.png index 51f4fd6073..453746bfab 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomdata.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomdata.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomtitle.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomtitle.snap.png index 324e7ee9e9..ee87464bb0 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomtitle.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithcustomtitle.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwitheurope.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwitheurope.snap.png index add3836286..c8a54f9b13 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwitheurope.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwitheurope.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithnorthamerica.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithnorthamerica.snap.png index caa38c331a..8974d2ff3e 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithnorthamerica.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithnorthamerica.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithoceania.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithoceania.snap.png index bdb2c33820..b5277daf2c 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithoceania.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithoceania.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlabelsoff.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlabelsoff.snap.png index b09f3de3a8..291698119e 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlabelsoff.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlabelsoff.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlableson.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlableson.snap.png index 324e7ee9e9..64cc95dd17 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlableson.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithshowlableson.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithsouthamerica.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithsouthamerica.snap.png index 235f11b233..954afd2aca 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithsouthamerica.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithsouthamerica.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithusa.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithusa.snap.png index 86c2ea5a43..6b5d92df19 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithusa.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithusa.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityoff.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityoff.snap.png index 2a8d68fa82..1bc8cd17ab 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityoff.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityoff.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityon.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityon.snap.png index 324e7ee9e9..b89737c5ea 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityon.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithvisibilityon.snap.png differ diff --git a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithworld.snap.png b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithworld.snap.png index 8c2f89fd4e..20054343e0 100644 Binary files a/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithworld.snap.png and b/app/client/cypress/snapshots/MapChart_Spec.ts/mapwithworld.snap.png differ diff --git a/app/client/src/widgets/MapChartWidget/component/index.tsx b/app/client/src/widgets/MapChartWidget/component/index.tsx index f6180458c8..c5dcdee8a3 100644 --- a/app/client/src/widgets/MapChartWidget/component/index.tsx +++ b/app/client/src/widgets/MapChartWidget/component/index.tsx @@ -65,6 +65,7 @@ export default function EchartComponent(props: MapChartComponentProps) { chartContainer.current!, {}, { + renderer: "svg", width: props.width, height: props.height, },