diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_1.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_1.ts new file mode 100644 index 0000000000..7114e7c76f --- /dev/null +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_1.ts @@ -0,0 +1,85 @@ +import { + agHelper, + entityExplorer, + deployMode, + draggableWidgets, + propPane, + locators, +} from "../../../../../support/Objects/ObjectsCore"; + +describe("", () => { + before(() => { + entityExplorer.DragNDropWidget(draggableWidgets.CHART); + }); + + afterEach(() => { + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + }); + + it("1. Test pie chart", () => { + propPane.SelectPropertiesDropDown("Chart Type", "Pie chart"); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/piechartsnapshot"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.TogglePropertyState("Show Labels", "On"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/piechartsnapshotwithlabels"); + }); + + it("2. Test line chart", () => { + propPane.TogglePropertyState("Show Labels", "Off"); + propPane.SelectPropertiesDropDown("Chart Type", "Line chart"); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/linechartsnapshot"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.TogglePropertyState("Show Labels", "On"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/linechartsnapshotwithlabels"); + }); + + it("3. Test column chart", () => { + propPane.TogglePropertyState("Show Labels", "Off"); + propPane.SelectPropertiesDropDown("Chart Type", "Column chart"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/columnchartsnapshot"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.TogglePropertyState("Show Labels", "On"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/columnchartsnapshotwithlabels"); + }); + + it("4. Test area chart", () => { + propPane.TogglePropertyState("Show Labels", "Off"); + propPane.SelectPropertiesDropDown("Chart Type", "Area chart"); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/areachartsnapshot"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.TogglePropertyState("Show Labels", "On"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/areachartsnapshotwithlabels"); + }); +}); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_2.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_2.ts new file mode 100644 index 0000000000..c447a74315 --- /dev/null +++ b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Chart/Chart_widget_spec_2.ts @@ -0,0 +1,94 @@ +import { + agHelper, + entityExplorer, + deployMode, + draggableWidgets, + propPane, + locators, +} from "../../../../../support/Objects/ObjectsCore"; + +describe("", () => { + before(() => { + entityExplorer.DragNDropWidget(draggableWidgets.CHART); + }); + + it("1. Test Series tile chart", () => { + propPane.SelectPropertiesDropDown("Chart Type", "Pie chart"); + propPane.UpdatePropertyFieldValue( + "Title", + "Data of anime at 2020 @ December", + ); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/piechartsnapshotwithtitle"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + }); + + it("2. Test Adaptive axis", () => { + propPane.SelectPropertiesDropDown("Chart Type", "Column chart"); + agHelper.AssertAutoSave(); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/columnchartsnapshotwithoutadaptiveaxis"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.TogglePropertyState("Adaptive axis", "On"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/columnchartsnapshotwithadaptiveaxis"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + }); + + it("3. Test x axis label orientation chart", () => { + propPane.SelectPropertiesDropDown("Chart Type", "Line chart"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot("chartwidget/linechartWithAutoXAxisLabelOrientation"); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.SelectPropertiesDropDown("x-axis label orientation", "Slant"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot( + "chartwidget/linechartWithSlantXAxisLabelOrientation", + ); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + propPane.SelectPropertiesDropDown("x-axis label orientation", "Rotate"); + deployMode.DeployApp(); + agHelper + .GetElement(locators._widgetInDeployed(draggableWidgets.CHART)) + .matchImageSnapshot( + "chartwidget/linechartWithRotateXAxisLabelOrientation", + ); + deployMode.NavigateBacktoEditor(); + entityExplorer.SelectEntityByName("Chart1"); + }); + + it("4. Test x axis label orientation absence in Pie, Bar, Custom Fusion Charts", () => { + propPane.SelectPropertiesDropDown("Chart Type", "Pie chart"); + agHelper.AssertElementAbsence( + propPane._selectPropDropdown("x-axis label orientation"), + ); + propPane.SelectPropertiesDropDown("Chart Type", "Bar chart"); + agHelper.AssertElementAbsence( + propPane._selectPropDropdown("x-axis label orientation"), + ); + propPane.SelectPropertiesDropDown("Chart Type", "Custom Fusion Charts"); + agHelper.AssertElementAbsence( + propPane._selectPropDropdown("x-axis label orientation"), + ); + propPane.SelectPropertiesDropDown("Chart Type", "Column chart"); + agHelper.AssertElementExist( + propPane._selectPropDropdown("x-axis label orientation"), + ); + }); +}); diff --git a/app/client/cypress/snapshots/chartwidget/areachartsnapshot.snap.png b/app/client/cypress/snapshots/chartwidget/areachartsnapshot.snap.png new file mode 100644 index 0000000000..19f12d0e4e Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/areachartsnapshot.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/areachartsnapshotwithlabels.snap.png b/app/client/cypress/snapshots/chartwidget/areachartsnapshotwithlabels.snap.png new file mode 100644 index 0000000000..d7168ce308 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/areachartsnapshotwithlabels.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/columnchartsnapshot.snap.png b/app/client/cypress/snapshots/chartwidget/columnchartsnapshot.snap.png new file mode 100644 index 0000000000..ed10abc967 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/columnchartsnapshot.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithadaptiveaxis.snap.png b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithadaptiveaxis.snap.png new file mode 100644 index 0000000000..d67bf8abb7 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithadaptiveaxis.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithlabels.snap.png b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithlabels.snap.png new file mode 100644 index 0000000000..85ea6e2917 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithlabels.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithoutadaptiveaxis.snap.png b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithoutadaptiveaxis.snap.png new file mode 100644 index 0000000000..c184abd328 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/columnchartsnapshotwithoutadaptiveaxis.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/linechartWithAutoXAxisLabelOrientation.snap.png b/app/client/cypress/snapshots/chartwidget/linechartWithAutoXAxisLabelOrientation.snap.png new file mode 100644 index 0000000000..983bd2fac3 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/linechartWithAutoXAxisLabelOrientation.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/linechartWithRotateXAxisLabelOrientation.snap.png b/app/client/cypress/snapshots/chartwidget/linechartWithRotateXAxisLabelOrientation.snap.png new file mode 100644 index 0000000000..e0a524f6e2 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/linechartWithRotateXAxisLabelOrientation.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/linechartWithSlantXAxisLabelOrientation.snap.png b/app/client/cypress/snapshots/chartwidget/linechartWithSlantXAxisLabelOrientation.snap.png new file mode 100644 index 0000000000..99f54011aa Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/linechartWithSlantXAxisLabelOrientation.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/linechartsnapshot.snap.png b/app/client/cypress/snapshots/chartwidget/linechartsnapshot.snap.png new file mode 100644 index 0000000000..4ce11795c6 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/linechartsnapshot.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/linechartsnapshotwithlabels.snap.png b/app/client/cypress/snapshots/chartwidget/linechartsnapshotwithlabels.snap.png new file mode 100644 index 0000000000..c07975dbfc Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/linechartsnapshotwithlabels.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/piechartsnapshot.snap.png b/app/client/cypress/snapshots/chartwidget/piechartsnapshot.snap.png new file mode 100644 index 0000000000..6461580181 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/piechartsnapshot.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithlabels.snap.png b/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithlabels.snap.png new file mode 100644 index 0000000000..d84973a5e4 Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithlabels.snap.png differ diff --git a/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithtitle.snap.png b/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithtitle.snap.png new file mode 100644 index 0000000000..05acfe7fbe Binary files /dev/null and b/app/client/cypress/snapshots/chartwidget/piechartsnapshotwithtitle.snap.png differ