This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch
4229-cypress-e2e-rename-dataexplorer-utilities-and-test-paths-to-chart
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to
refs/heads/4229-cypress-e2e-rename-dataexplorer-utilities-and-test-paths-to-chart
by this push:
new e249fd04d4 test(#4229): rename DataExplorer utils and test paths to
Chart terminology
e249fd04d4 is described below
commit e249fd04d468af6d9804b805fa89df6e0c658877
Author: Philipp Zehnder <[email protected]>
AuthorDate: Fri Mar 6 07:19:56 2026 +0100
test(#4229): rename DataExplorer utils and test paths to Chart terminology
---
ui/cypress/AGENTS.md | 6 +-
.../{DataExplorerWidget.ts => ChartWidget.ts} | 2 +-
.../support/utils/DataDownloadDialogUtils.ts | 6 +-
.../support/utils/ProcessingElementTestUtils.ts | 4 +-
.../DataExplorerBtns.ts => chart/ChartBtns.ts} | 2 +-
.../DataExplorerUtils.ts => chart/ChartUtils.ts} | 149 ++++++++++-----------
.../ChartWidgetTableUtils.ts} | 8 +-
ui/cypress/support/utils/connect/ConnectUtils.ts | 4 +-
.../tests/assetManagement/assetFilterTest.spec.ts | 20 +--
.../addAssetToDashboard.smoke.spec.ts | 16 +--
.../addAssetsToDataView.smoke.spec.ts | 16 +--
.../advancedFilterExpressions.smoke.spec.ts | 60 ++++-----
.../charts => chart/chart-types}/heatmap.spec.ts | 10 +-
.../charts => chart/chart-types}/histogram.spec.ts | 10 +-
.../charts => chart/chart-types}/indicator.spec.ts | 10 +-
.../charts => chart/chart-types}/map.spec.ts | 12 +-
.../chart-types}/scatter.smoke.spec.ts | 8 +-
.../chart-types/table.spec.ts} | 19 ++-
.../chart-types}/timeSeriesSave.spec.ts | 16 +--
.../chartDataPreview.smoke.spec.ts | 28 ++--
.../configuration.smoke.spec.ts | 36 ++---
.../tests/chart/deleteViewAndDashboard.spec.ts | 76 +++++++++++
.../filterNumericalStringProperties.spec.ts | 38 +++---
.../missingDataInDataLake.spec.ts | 12 +-
.../timeOrderDataView.spec.ts | 36 ++---
.../timeRangeSelectors.spec.ts | 16 +--
.../chart/widgetDataConfiguration.smoke.spec.ts | 108 +++++++++++++++
ui/cypress/tests/connect/editAdapter.smoke.spec.ts | 16 +--
.../editAdapterSettingsAndPipeline.smoke.spec.ts | 6 +-
.../tests/connect/rules/schemaRules.smoke.spec.ts | 4 +-
.../dataDownloadDialogTest.smoke.spec.ts | 8 +-
ui/cypress/tests/dataExplorer/charts/table.spec.ts | 39 ------
.../dataExplorer/deleteViewAndDashboard.spec.ts | 79 -----------
.../widgetDataConfiguration.smoke.spec.ts | 122 -----------------
.../restartStreamPipes/restartStreamPipes2.ts | 4 +-
.../testAddAssetOnResourceCreation.ts | 30 ++---
.../userManagement/testUserRoleCharts.spec.ts | 30 ++---
.../userManagement/testUserRoleDashboard.spec.ts | 88 ++++++------
.../userManagement/testUserRoleDataset.spec.ts | 38 +++---
39 files changed, 555 insertions(+), 637 deletions(-)
diff --git a/ui/cypress/AGENTS.md b/ui/cypress/AGENTS.md
index 9bedcd1a9a..ed5bcf3e87 100644
--- a/ui/cypress/AGENTS.md
+++ b/ui/cypress/AGENTS.md
@@ -22,8 +22,8 @@ Keep tests readable and maintainable by centralizing
selectors and common flows
## Selector Placement Rules
-- Put `data-cy` element accessors in domain `*Btns` classes (for example
`PipelineBtns`, `ConnectBtns`, `DataExplorerBtns`).
-- Put multi-step user flows in domain `*Utils` classes (for example
`PipelineUtils`, `ConnectUtils`, `DataExplorerUtils`).
+- Put `data-cy` element accessors in domain `*Btns` classes (for example
`PipelineBtns`, `ConnectBtns`, `ChartBtns`).
+- Put multi-step user flows in domain `*Utils` classes (for example
`PipelineUtils`, `ConnectUtils`, `ChartUtils`).
- For dynamic selectors, use typed helper methods with parameters instead of
string concatenation in specs.
- Reuse existing selector constants/patterns when already present (for example
`SiteUtils` constants).
- Keep direct `cy.get(...)` in specs to a minimum; if reused, move it behind a
support helper.
@@ -45,7 +45,7 @@ Keep tests readable and maintainable by centralizing
selectors and common flows
- Follow existing naming style:
- UI accessors: verb/noun methods in `*Btns` returning Cypress chains.
- Flows/assertions: descriptive methods in `*Utils`.
-- Place new helpers in the closest domain folder under `support/utils/`
(connect, pipeline, dataExplorer, ...).
+- Place new helpers in the closest domain folder under `support/utils/`
(connect, pipeline, chart, ...).
## Validation
diff --git a/ui/cypress/support/model/DataExplorerWidget.ts
b/ui/cypress/support/model/ChartWidget.ts
similarity index 96%
rename from ui/cypress/support/model/DataExplorerWidget.ts
rename to ui/cypress/support/model/ChartWidget.ts
index da36a2c507..8beeae7933 100644
--- a/ui/cypress/support/model/DataExplorerWidget.ts
+++ b/ui/cypress/support/model/ChartWidget.ts
@@ -16,7 +16,7 @@
*
*/
-export class DataExplorerWidget {
+export class ChartWidget {
public static TABLE = 'table';
public static TIME_SERIES = 'time-series-chart';
}
diff --git a/ui/cypress/support/utils/DataDownloadDialogUtils.ts
b/ui/cypress/support/utils/DataDownloadDialogUtils.ts
index 28e44ff751..70c1d81e89 100644
--- a/ui/cypress/support/utils/DataDownloadDialogUtils.ts
+++ b/ui/cypress/support/utils/DataDownloadDialogUtils.ts
@@ -17,7 +17,7 @@
*/
import { ExportConfig } from
'../../../projects/streampipes/shared-ui/src/lib/dialog/data-download-dialog/model/export-config.model';
-import { DataExplorerUtils } from './dataExplorer/DataExplorerUtils';
+import { ChartUtils } from './chart/ChartUtils';
import { FileNameService } from
'../../../projects/streampipes/shared-ui/src/lib/dialog/data-download-dialog/services/file-name.service';
import { CsvFormatExportConfig } from
'../../../projects/streampipes/shared-ui/src/lib/dialog/data-download-dialog/model/format-export-config.model';
import { GeneralUtils } from './GeneralUtils';
@@ -29,11 +29,11 @@ export class DataDownloadDialogUtils {
dataViewName: string,
) {
// const exportDate: Date;
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
GeneralUtils.openMenuForRow(dataViewName);
// select data view in edit mode
- DataExplorerUtils.editDataView(dataViewName);
+ ChartUtils.editDataView(dataViewName);
// select download button
cy.dataCy('data-view-data-download-btn').click();
diff --git a/ui/cypress/support/utils/ProcessingElementTestUtils.ts
b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
index 5baed8ff61..5e5e440368 100644
--- a/ui/cypress/support/utils/ProcessingElementTestUtils.ts
+++ b/ui/cypress/support/utils/ProcessingElementTestUtils.ts
@@ -19,7 +19,7 @@
import { FileManagementUtils } from './FileManagementUtils';
import { ConnectUtils } from './connect/ConnectUtils';
import { PipelineUtils } from './pipeline/PipelineUtils';
-import { DataExplorerUtils } from './dataExplorer/DataExplorerUtils';
+import { ChartUtils } from './chart/ChartUtils';
import { PipelineBuilder } from '../builder/PipelineBuilder';
import { PipelineElementBuilder } from '../builder/PipelineElementBuilder';
import { ProcessorTest } from '../model/ProcessorTest';
@@ -96,7 +96,7 @@ export class ProcessingElementTestUtils {
cy.wait(3000);
- DataExplorerUtils.checkResults(
+ ChartUtils.checkResults(
dataLakeIndex,
'cypress/fixtures/' + expectedResultFile,
pipelineElementTest.processor.ignoreTimestamp,
diff --git a/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
b/ui/cypress/support/utils/chart/ChartBtns.ts
similarity index 99%
rename from ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
rename to ui/cypress/support/utils/chart/ChartBtns.ts
index 741f17d019..68f0e3edb6 100644
--- a/ui/cypress/support/utils/dataExplorer/DataExplorerBtns.ts
+++ b/ui/cypress/support/utils/chart/ChartBtns.ts
@@ -16,7 +16,7 @@
*
*/
-export class DataExplorerBtns {
+export class ChartBtns {
public static refreshDataLakeMeasures() {
return cy.dataCy('refresh-data-lake-measures');
}
diff --git a/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
b/ui/cypress/support/utils/chart/ChartUtils.ts
similarity index 83%
rename from ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
rename to ui/cypress/support/utils/chart/ChartUtils.ts
index caea6cb0cf..6bf716d333 100644
--- a/ui/cypress/support/utils/dataExplorer/DataExplorerUtils.ts
+++ b/ui/cypress/support/utils/chart/ChartUtils.ts
@@ -17,7 +17,7 @@
*/
import { DataLakeFilterConfig } from '../../model/DataLakeFilterConfig';
-import { DataExplorerWidget } from '../../model/DataExplorerWidget';
+import { ChartWidget } from '../../model/ChartWidget';
import { DataSetUtils } from '../DataSetUtils';
import { PrepareTestDataUtils } from '../PrepareTestDataUtils';
import { FileManagementUtils } from '../FileManagementUtils';
@@ -25,10 +25,10 @@ import { ConnectUtils } from '../connect/ConnectUtils';
import { ConnectBtns } from '../connect/ConnectBtns';
import { AdapterBuilder } from '../../builder/AdapterBuilder';
import { GeneralUtils } from '../GeneralUtils';
-import { DataExplorerBtns } from './DataExplorerBtns';
+import { ChartBtns } from './ChartBtns';
import { SharedBtns } from '../shared/SharedBtns';
-export class DataExplorerUtils {
+export class ChartUtils {
public static ADAPTER_NAME = 'datalake_configuration';
public static goToDatalake() {
@@ -41,12 +41,12 @@ export class DataExplorerUtils {
}
public static checkAmountOfCharts(amount: number) {
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
this.checkAmount(amount);
}
public static checkAmountOfDashboards(amount: number) {
- DataExplorerUtils.goToDashboard();
+ ChartUtils.goToDashboard();
this.checkAmount(amount);
}
@@ -63,27 +63,27 @@ export class DataExplorerUtils {
public static checkChartCanBeEdited(chartName: string) {
GeneralUtils.openMenuForRow(chartName);
- DataExplorerBtns.editDataViewButton(chartName).should('exist');
+ ChartBtns.editDataViewButton(chartName).should('exist');
}
public static checkChartCanNotBeEdited(chartName: string) {
GeneralUtils.openMenuForRow(chartName);
- DataExplorerBtns.editDataViewButton(chartName).should('not.exist');
+ ChartBtns.editDataViewButton(chartName).should('not.exist');
}
public static checkDashboardCanBeEdited(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.editDashboardBtn(dashboardName).should('exist');
+ ChartBtns.editDashboardBtn(dashboardName).should('exist');
}
public static checkDashboardCanNotBeEdited(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.editDashboardBtn(dashboardName).should('not.exist');
+ ChartBtns.editDashboardBtn(dashboardName).should('not.exist');
}
public static initDataLakeTests() {
cy.initStreamPipesTest();
- DataExplorerUtils.loadRandomDataSetIntoDataLake();
+ ChartUtils.loadRandomDataSetIntoDataLake();
}
public static getDataLakeTestSetAdapter(
@@ -125,7 +125,7 @@ export class DataExplorerUtils {
FileManagementUtils.addFile(dataSet);
const adapter = this.getDataLakeTestSetAdapter(
- DataExplorerUtils.ADAPTER_NAME,
+ ChartUtils.ADAPTER_NAME,
true,
format,
);
@@ -140,25 +140,25 @@ export class DataExplorerUtils {
widgetType: string,
ignoreTimeSelection = false,
) {
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
if (!ignoreTimeSelection) {
- DataExplorerUtils.selectTimeRange(
+ ChartUtils.selectTimeRange(
new Date(2020, 10, 20, 22, 44),
- DataExplorerUtils.getFutureDate(),
+ ChartUtils.getFutureDate(),
);
}
- // DataExplorerUtils.addNewWidget();
- DataExplorerUtils.selectDataSet(dataSet);
- DataExplorerUtils.dataConfigSelectAllFields();
+ // ChartUtils.addNewWidget();
+ ChartUtils.selectDataSet(dataSet);
+ ChartUtils.dataConfigSelectAllFields();
- DataExplorerUtils.selectAppearanceConfig();
- DataExplorerUtils.selectDataViewName(dataViewName);
+ ChartUtils.selectAppearanceConfig();
+ ChartUtils.selectDataViewName(dataViewName);
- DataExplorerUtils.openVisualizationConfig();
- DataExplorerUtils.selectVisualizationType(widgetType);
+ ChartUtils.openVisualizationConfig();
+ ChartUtils.selectVisualizationType(widgetType);
cy.wait(1000);
}
@@ -190,23 +190,23 @@ export class DataExplorerUtils {
}
public static createNewDashboard(name: string) {
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.addNewDashboard(name);
- DataExplorerUtils.saveDataView();
+ ChartUtils.goToDashboard();
+ ChartUtils.addNewDashboard(name);
+ ChartUtils.saveDataView();
}
public static createNewDashboardWithAssetLinks(
name: string,
assetNameList: string[],
) {
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.addNewDashboard(name);
- DataExplorerUtils.addAssetsToDashboard(assetNameList);
- DataExplorerUtils.saveDataView();
+ ChartUtils.goToDashboard();
+ ChartUtils.addNewDashboard(name);
+ ChartUtils.addAssetsToDashboard(assetNameList);
+ ChartUtils.saveDataView();
}
public static addNewDashboard(name: string) {
- DataExplorerBtns.newDashboardDialogBtn().click();
+ ChartBtns.newDashboardDialogBtn().click();
cy.dataCy('data-view-name').type(name);
}
@@ -215,29 +215,26 @@ export class DataExplorerUtils {
name,
assetNameList,
) {
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
- DataExplorerUtils.addDataViewAndTableWidget(
- dataView,
- DataExplorerUtils.ADAPTER_NAME,
- );
+ ChartUtils.addDataViewAndTableWidget(dataView,
ChartUtils.ADAPTER_NAME);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.saveDataViewConfiguration();
- DataExplorerUtils.goToDashboard();
+ ChartUtils.goToDashboard();
//ADD Assets
- DataExplorerUtils.addNewDashboard(name);
- DataExplorerUtils.addAssetsToDashboard(assetNameList);
- DataExplorerUtils.saveDataView();
+ ChartUtils.addNewDashboard(name);
+ ChartUtils.addAssetsToDashboard(assetNameList);
+ ChartUtils.saveDataView();
}
public static saveDataView() {
- return DataExplorerBtns.saveDataViewBtn().click();
+ return ChartBtns.saveDataViewBtn().click();
}
public static saveDashboard() {
- return DataExplorerBtns.saveDashboardBtn().click();
+ return ChartBtns.saveDashboardBtn().click();
}
public static addDataViewAndTableWidget(
@@ -248,7 +245,7 @@ export class DataExplorerUtils {
this.addDataViewAndWidget(
dataViewName,
dataSet,
- DataExplorerWidget.TABLE,
+ ChartWidget.TABLE,
ignoreTimeSelection,
);
}
@@ -260,7 +257,7 @@ export class DataExplorerUtils {
this.addDataViewAndWidget(
dataViewName,
dataSet,
- DataExplorerWidget.TIME_SERIES,
+ ChartWidget.TIME_SERIES,
);
}
public static renameWidget(newName: string) {
@@ -282,11 +279,11 @@ export class DataExplorerUtils {
public static createAndEditDashboard(name: string) {
// Create new data view
- DataExplorerBtns.newDashboardDialogBtn().click();
+ ChartBtns.newDashboardDialogBtn().click();
// Configure data view
cy.dataCy('data-view-name').type(name);
- DataExplorerBtns.saveDataViewBtn().click();
+ ChartBtns.saveDataViewBtn().click();
this.editDashboard(name);
}
@@ -301,42 +298,42 @@ export class DataExplorerUtils {
this.getFutureDate(),
);
}
- DataExplorerBtns.addDataViewBtn(dataViewName).click();
+ ChartBtns.addDataViewBtn(dataViewName).click();
}
public static createAndEditDataView() {
// Create new data view
- DataExplorerBtns.openNewDataViewBtn().click();
+ ChartBtns.openNewDataViewBtn().click();
}
public static removeWidget(dataViewName: string) {
- DataExplorerBtns.removeWidgetBtn(dataViewName).click();
+ ChartBtns.removeWidgetBtn(dataViewName).click();
}
public static editDashboard(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.editDashboardBtn(dashboardName).click();
+ ChartBtns.editDashboardBtn(dashboardName).click();
}
public static viewDashboard(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.viewDashboardBtn(dashboardName).click();
+ ChartBtns.viewDashboardBtn(dashboardName).click();
}
public static editDashboardSettings(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.editDashboardSettingsBtn(dashboardName).click();
+ ChartBtns.editDashboardSettingsBtn(dashboardName).click();
}
public static editDataView(dataViewName: string) {
// Click edit button
// following only works if single view is available
GeneralUtils.openMenuForRow(dataViewName);
- DataExplorerBtns.editDataViewButton(dataViewName).click();
+ ChartBtns.editDataViewButton(dataViewName).click();
}
public static saveDataViewConfiguration(confirmSave: boolean = false) {
- DataExplorerBtns.saveDataViewButton().click({
+ ChartBtns.saveDataViewButton().click({
force: true,
});
if (confirmSave) {
@@ -345,7 +342,7 @@ export class DataExplorerUtils {
}
public static saveDashboardConfiguration() {
- DataExplorerBtns.saveDashboardConfigurationBtn().click();
+ ChartBtns.saveDashboardConfigurationBtn().click();
}
public static getEmptyDashboardInformation() {
@@ -353,7 +350,7 @@ export class DataExplorerUtils {
}
public static addChartsToAsset(assetNameList = []) {
- DataExplorerBtns.saveChartsToAssetBtn();
+ ChartBtns.saveChartsToAssetBtn();
cy.dataCy('sp-show-chart-asset-checkbox').then($checkbox => {
if (!$checkbox.is(':checked')) {
@@ -361,7 +358,7 @@ export class DataExplorerUtils {
}
});
this.addToAsset(assetNameList);
- DataExplorerBtns.confirmAssetSelectionBtn();
+ ChartBtns.confirmAssetSelectionBtn();
}
public static addToAsset(assetNameList = []) {
@@ -377,47 +374,47 @@ export class DataExplorerUtils {
public static deleteDashboard(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.deleteDashboardBtn(dashboardName).click();
+ ChartBtns.deleteDashboardBtn(dashboardName).click();
SharedBtns.confirmDialogConfirmBtn().click();
}
public static deleteDataView(dataViewName: string) {
GeneralUtils.openMenuForRow(dataViewName);
- DataExplorerBtns.deleteDataViewBtn(dataViewName).click();
+ ChartBtns.deleteDataViewBtn(dataViewName).click();
SharedBtns.confirmDialogConfirmBtn().click();
}
public static cancelDeleteDashboard(dashboardName: string) {
GeneralUtils.openMenuForRow(dashboardName);
- DataExplorerBtns.deleteDashboardBtn(dashboardName).click();
+ ChartBtns.deleteDashboardBtn(dashboardName).click();
SharedBtns.confirmDialogCancelBtn().click();
}
public static cancelDeleteDataView(dataViewName: string) {
GeneralUtils.openMenuForRow(dataViewName);
- DataExplorerBtns.deleteDataViewBtn(dataViewName).click();
+ ChartBtns.deleteDataViewBtn(dataViewName).click();
SharedBtns.confirmDialogCancelBtn().click();
}
public static editWidget(widgetName: string) {
- DataExplorerBtns.editWidget(widgetName).click();
+ ChartBtns.editWidget(widgetName).click();
}
public static startEditWidget(widgetName: string) {
- DataExplorerBtns.moreOptionsBtn(widgetName).click();
- DataExplorerBtns.startEditWidget(widgetName).click();
+ ChartBtns.moreOptionsBtn(widgetName).click();
+ ChartBtns.startEditWidget(widgetName).click();
}
public static saveAndReEditWidget(dataViewName: string) {
// Save data view configuration
- DataExplorerUtils.saveDataViewConfiguration();
- DataExplorerUtils.editDataView(dataViewName);
+ ChartUtils.saveDataViewConfiguration();
+ ChartUtils.editDataView(dataViewName);
}
public static saveAndReEditDashboard(dashboardName: string) {
// Save dashboard configuration
- DataExplorerUtils.saveDashboardConfiguration();
- DataExplorerUtils.editDashboard(dashboardName);
+ ChartUtils.saveDashboardConfiguration();
+ ChartUtils.editDashboard(dashboardName);
}
public static clickTab(tabName: string) {
@@ -426,11 +423,11 @@ export class DataExplorerUtils {
}
public static goBackToOverview() {
- DataExplorerBtns.goBackToOverviewBtn().click();
+ ChartBtns.goBackToOverviewBtn().click();
}
public static addNewWidget() {
- DataExplorerBtns.addNewWidgetBtn().click();
+ ChartBtns.addNewWidgetBtn().click();
}
public static selectDataSet(dataSet: string) {
@@ -698,7 +695,7 @@ export class DataExplorerUtils {
}
public static setTimeInput(field: string, date: Date) {
- cy.dataCy(field).type(DataExplorerUtils.makeTimeString(date));
+ cy.dataCy(field).type(ChartUtils.makeTimeString(date));
}
public static makeTimeString(date: Date) {
@@ -746,16 +743,16 @@ export class DataExplorerUtils {
cy.get('confirmation-dialog').should('be.visible');
}
public static createDataViewWithAssets(assetNames) {
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
// Create Diagram
- DataExplorerUtils.addDataViewAndTableWidget(
+ ChartUtils.addDataViewAndTableWidget(
'NewWidget',
- DataExplorerUtils.ADAPTER_NAME,
+ ChartUtils.ADAPTER_NAME,
);
//Save
- DataExplorerUtils.addChartsToAsset(assetNames);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.addChartsToAsset(assetNames);
+ ChartUtils.saveDataViewConfiguration();
//Necessary for the background task to finish otherwise it steps back
to charts from the following task
cy.wait(500);
}
diff --git
a/ui/cypress/support/utils/dataExplorer/DataExplorerWidgetTableUtils.ts
b/ui/cypress/support/utils/chart/ChartWidgetTableUtils.ts
similarity index 85%
rename from
ui/cypress/support/utils/dataExplorer/DataExplorerWidgetTableUtils.ts
rename to ui/cypress/support/utils/chart/ChartWidgetTableUtils.ts
index cf977fad47..1f71ce8d8f 100644
--- a/ui/cypress/support/utils/dataExplorer/DataExplorerWidgetTableUtils.ts
+++ b/ui/cypress/support/utils/chart/ChartWidgetTableUtils.ts
@@ -16,18 +16,18 @@
*
*/
-export class DataExplorerWidgetTableUtils {
- public static dataExplorerTableRowTimestamp() {
+export class ChartWidgetTableUtils {
+ public static chartTableRowTimestamp() {
return cy.dataCy('data-explorer-table-row-timestamp', {
timeout: 10000,
});
}
/**
- * Checks how many rows are visible within the table widget in the data
explorer
+ * Checks how many rows are visible within the table widget in charts
* @param amount of expected rows
*/
public static checkAmountOfRows(amount: number) {
- this.dataExplorerTableRowTimestamp().should('have.length', amount);
+ this.chartTableRowTimestamp().should('have.length', amount);
}
}
diff --git a/ui/cypress/support/utils/connect/ConnectUtils.ts
b/ui/cypress/support/utils/connect/ConnectUtils.ts
index 4e635d8758..db86d91e02 100644
--- a/ui/cypress/support/utils/connect/ConnectUtils.ts
+++ b/ui/cypress/support/utils/connect/ConnectUtils.ts
@@ -19,7 +19,7 @@
import { StaticPropertyUtils } from '../userInput/StaticPropertyUtils';
import { AdapterInput } from '../../model/AdapterInput';
import { ConnectEventSchemaUtils } from './ConnectEventSchemaUtils';
-import { DataExplorerUtils } from '../dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../chart/ChartUtils';
import { ConnectBtns } from './ConnectBtns';
import { AdapterBuilder } from '../../builder/AdapterBuilder';
import { UserUtils } from '../UserUtils';
@@ -500,7 +500,7 @@ export class ConnectUtils {
// Wait till data is stored
cy.wait(waitTime);
- DataExplorerUtils.checkResults(
+ ChartUtils.checkResults(
'Adapter to test rules',
expectedFile,
ignoreTime,
diff --git a/ui/cypress/tests/assetManagement/assetFilterTest.spec.ts
b/ui/cypress/tests/assetManagement/assetFilterTest.spec.ts
index 49456a0cdd..9dff70da82 100644
--- a/ui/cypress/tests/assetManagement/assetFilterTest.spec.ts
+++ b/ui/cypress/tests/assetManagement/assetFilterTest.spec.ts
@@ -18,7 +18,7 @@
import { AssetUtils } from '../../support/utils/asset/AssetUtils';
import { DashboardUtils } from '../../support/utils/DashboardUtils';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { AssetBuilder } from '../../support/builder/AssetBuilder';
import { ConfigurationUtils } from
'../../support/utils/configuration/ConfigurationUtils';
import { SiteUtils } from '../../support/utils/configuration/SiteUtils';
@@ -235,33 +235,33 @@ describe('Test asset filters', () => {
}
function prepareDashboards() {
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-1_0', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-1_0', [
'asset-1_0',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-1_1', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-1_1', [
'asset-1_0.asset-1_1',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-1_2', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-1_2', [
'asset-1_0.asset-1_2',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-2_0', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-2_0', [
'asset-2_0',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-2_1', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-2_1', [
'asset-2_0.asset-2_1',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-2_2', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-2_2', [
'asset-2_0.asset-2_2',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-3_0', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-3_0', [
'asset-3_0',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-3_1', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-3_1', [
'asset-3_0.asset-3_1',
]);
- DataExplorerUtils.createNewDashboardWithAssetLinks('dashboard-3_2', [
+ ChartUtils.createNewDashboardWithAssetLinks('dashboard-3_2', [
'asset-3_0.asset-3_2',
]);
}
diff --git a/ui/cypress/tests/dataExplorer/addAssetToDashboard.smoke.spec.ts
b/ui/cypress/tests/chart/addAssetToDashboard.smoke.spec.ts
similarity index 84%
rename from ui/cypress/tests/dataExplorer/addAssetToDashboard.smoke.spec.ts
rename to ui/cypress/tests/chart/addAssetToDashboard.smoke.spec.ts
index ded6d53594..31888e5990 100644
--- a/ui/cypress/tests/dataExplorer/addAssetToDashboard.smoke.spec.ts
+++ b/ui/cypress/tests/chart/addAssetToDashboard.smoke.spec.ts
@@ -17,7 +17,7 @@
*/
import { AssetBtns } from '../../support/utils/asset/AssetBtns';
import { AssetUtils } from '../../support/utils/asset/AssetUtils';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { AssetBuilder } from '../../support/builder/AssetBuilder';
describe('Test add Assets To Dashboard', () => {
@@ -35,7 +35,7 @@ describe('Test add Assets To Dashboard', () => {
AssetUtils.addAndSaveAsset(asset3);
AssetUtils.addAndSaveAsset(asset2);
AssetUtils.addAndSaveAsset(asset1);
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
});
it('Create Dashboard and add Assets', () => {
@@ -44,7 +44,7 @@ describe('Test add Assets To Dashboard', () => {
const name = 'Dashboard1';
const assetNameList = [assetName1, assetName2];
- DataExplorerUtils.createDashboardWithLinkedAssets(
+ ChartUtils.createDashboardWithLinkedAssets(
dataView,
name,
assetNameList,
@@ -66,16 +66,16 @@ describe('Test add Assets To Dashboard', () => {
const name = 'Dashboard1';
const assetNameList = [assetName1, assetName2];
- DataExplorerUtils.createDashboardWithLinkedAssets(
+ ChartUtils.createDashboardWithLinkedAssets(
dataView,
name,
assetNameList,
);
- DataExplorerUtils.editDashboardSettings(name);
- DataExplorerUtils.renameDashboard('NEW');
+ ChartUtils.editDashboardSettings(name);
+ ChartUtils.renameDashboard('NEW');
const assetNameList2 = [assetName2, assetName3];
- DataExplorerUtils.addToAsset(assetNameList2);
- DataExplorerUtils.saveDataView();
+ ChartUtils.addToAsset(assetNameList2);
+ ChartUtils.saveDataView();
AssetUtils.checkAmountOfLinkedResourcesByAssetName(assetName1, 1);
AssetUtils.checkAmountOfLinkedResourcesByAssetName(assetName3, 1);
diff --git a/ui/cypress/tests/dataExplorer/addAssetsToDataView.smoke.spec.ts
b/ui/cypress/tests/chart/addAssetsToDataView.smoke.spec.ts
similarity index 82%
rename from ui/cypress/tests/dataExplorer/addAssetsToDataView.smoke.spec.ts
rename to ui/cypress/tests/chart/addAssetsToDataView.smoke.spec.ts
index 0be5c6733d..532d83db6f 100644
--- a/ui/cypress/tests/dataExplorer/addAssetsToDataView.smoke.spec.ts
+++ b/ui/cypress/tests/chart/addAssetsToDataView.smoke.spec.ts
@@ -17,7 +17,7 @@
*/
import { AssetUtils } from '../../support/utils/asset/AssetUtils';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { AssetBuilder } from '../../support/builder/AssetBuilder';
describe('Creates a new adapter with a linked asset', () => {
@@ -38,7 +38,7 @@ describe('Creates a new adapter with a linked asset', () => {
});
it('Add Assets during Chart generation', () => {
- DataExplorerUtils.createDataViewWithAssets([assetName1, assetName2]);
+ ChartUtils.createDataViewWithAssets([assetName1, assetName2]);
AssetUtils.checkAmountOfAssets(3);
//Test
AssetUtils.checkAmountOfLinkedResourcesByAssetName(assetName1, 1);
@@ -46,19 +46,19 @@ describe('Creates a new adapter with a linked asset', () =>
{
});
it('Edit Assets during Chart generation', () => {
- DataExplorerUtils.createDataViewWithAssets([assetName1, assetName2]);
+ ChartUtils.createDataViewWithAssets([assetName1, assetName2]);
AssetUtils.checkAmountOfAssets(3);
//Test
AssetUtils.checkAmountOfLinkedResourcesByAssetName(assetName1, 1);
AssetUtils.checkAmountOfLinkedResourcesByAssetName(assetName2, 1);
// Go To Chart and Edit
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
cy.wait(1000);
- DataExplorerUtils.editDataView('NewWidget');
- DataExplorerUtils.renameWidget('Rename');
- DataExplorerUtils.addChartsToAsset([assetName1, assetName3]);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.editDataView('NewWidget');
+ ChartUtils.renameWidget('Rename');
+ ChartUtils.addChartsToAsset([assetName1, assetName3]);
+ ChartUtils.saveDataViewConfiguration();
//Neceassary for Background Task to finish
cy.wait(500);
diff --git
a/ui/cypress/tests/dataExplorer/advancedFilterExpressions.smoke.spec.ts
b/ui/cypress/tests/chart/advancedFilterExpressions.smoke.spec.ts
similarity index 52%
rename from
ui/cypress/tests/dataExplorer/advancedFilterExpressions.smoke.spec.ts
rename to ui/cypress/tests/chart/advancedFilterExpressions.smoke.spec.ts
index 07e618ef30..70f4a3c00b 100644
--- a/ui/cypress/tests/dataExplorer/advancedFilterExpressions.smoke.spec.ts
+++ b/ui/cypress/tests/chart/advancedFilterExpressions.smoke.spec.ts
@@ -16,40 +16,38 @@
*
*/
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
-import { DataExplorerWidgetTableUtils } from
'../../support/utils/dataExplorer/DataExplorerWidgetTableUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
+import { ChartWidgetTableUtils } from
'../../support/utils/chart/ChartWidgetTableUtils';
-describe('Advanced Filter Expressions in Data Explorer', () => {
+describe('Advanced Filter Expressions in Charts', () => {
beforeEach('Setup Test', () => {
cy.initStreamPipesTest();
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
});
it('Applies nested advanced filter expressions and persists them', () => {
- DataExplorerUtils.addDataViewAndTableWidget(
+ ChartUtils.addDataViewAndTableWidget(
'AdvancedFilterWidget',
- DataExplorerUtils.ADAPTER_NAME,
+ ChartUtils.ADAPTER_NAME,
);
- DataExplorerWidgetTableUtils.checkAmountOfRows(10);
- DataExplorerUtils.selectDataConfig();
+ ChartWidgetTableUtils.checkAmountOfRows(10);
+ ChartUtils.selectDataConfig();
- DataExplorerBtns.advancedFilterBtn().click();
+ ChartBtns.advancedFilterBtn().click();
// Root condition: randomtext = a
- DataExplorerBtns.advancedFilterAddConditionBtn().first().click();
+ ChartBtns.advancedFilterAddConditionBtn().first().click();
// Root nested group
- DataExplorerBtns.advancedFilterAddGroupBtn().first().click();
+ ChartBtns.advancedFilterAddGroupBtn().first().click();
// Two conditions in nested group
- DataExplorerBtns.advancedFilterAddConditionBtn().last().click();
- DataExplorerBtns.advancedFilterAddConditionBtn().last().click();
+ ChartBtns.advancedFilterAddConditionBtn().last().click();
+ ChartBtns.advancedFilterAddConditionBtn().last().click();
// Set nested group operator to OR
- DataExplorerBtns.advancedFilterGroupOperator()
- .last()
- .click({ force: true });
- DataExplorerBtns.matOptionByText(/^OR$/).click();
+ ChartBtns.advancedFilterGroupOperator().last().click({ force: true });
+ ChartBtns.matOptionByText(/^OR$/).click();
setAdvancedCondition(0, 'randomtext', '=', 'a');
setAdvancedCondition(1, 'randomnumber', '=', '22');
@@ -58,23 +56,23 @@ describe('Advanced Filter Expressions in Data Explorer', ()
=> {
// Value inputs update the model on change; blur the active input
before checking the preview.
cy.focused().blur();
- DataExplorerBtns.advancedFilterPreviewBanner()
+ ChartBtns.advancedFilterPreviewBanner()
.should('contain.text', 'randomtext = a')
.and('contain.text', 'randomnumber = 22')
.and('contain.text', 'randomnumber = 56')
.and('contain.text', 'OR');
- DataExplorerBtns.advancedFilterApplyBtn().click();
+ ChartBtns.advancedFilterApplyBtn().click();
// a AND (22 OR 56) => 2 rows in sample.csv
- DataExplorerWidgetTableUtils.checkAmountOfRows(2);
+ ChartWidgetTableUtils.checkAmountOfRows(2);
- DataExplorerUtils.saveAndReEditWidget('AdvancedFilterWidget');
- DataExplorerWidgetTableUtils.checkAmountOfRows(2);
+ ChartUtils.saveAndReEditWidget('AdvancedFilterWidget');
+ ChartWidgetTableUtils.checkAmountOfRows(2);
- DataExplorerUtils.selectDataConfig();
- DataExplorerBtns.advancedFilterBtn().should('be.visible');
- DataExplorerBtns.filterAlertBanner()
+ ChartUtils.selectDataConfig();
+ ChartBtns.advancedFilterBtn().should('be.visible');
+ ChartBtns.filterAlertBanner()
.should('be.visible')
.within(() => {
cy.contains('randomtext = a');
@@ -88,13 +86,13 @@ function setAdvancedCondition(
operator: '=' | '!=' | '<' | '<=' | '>' | '>=',
value: string,
) {
- DataExplorerBtns.filterFieldSelect().eq(index).click({ force: true });
- DataExplorerBtns.matOptionByText(field).click();
+ ChartBtns.filterFieldSelect().eq(index).click({ force: true });
+ ChartBtns.matOptionByText(field).click();
- DataExplorerBtns.filterOperatorSelect().eq(index).click({ force: true });
- DataExplorerBtns.matOptionByText(operator).click();
+ ChartBtns.filterOperatorSelect().eq(index).click({ force: true });
+ ChartBtns.matOptionByText(operator).click();
- DataExplorerBtns.filterValueInput()
+ ChartBtns.filterValueInput()
.eq(index)
.clear({ force: true })
.type(value, { force: true });
diff --git a/ui/cypress/tests/dataExplorer/charts/heatmap.spec.ts
b/ui/cypress/tests/chart/chart-types/heatmap.spec.ts
similarity index 80%
rename from ui/cypress/tests/dataExplorer/charts/heatmap.spec.ts
rename to ui/cypress/tests/chart/chart-types/heatmap.spec.ts
index 54d25c3b43..e582cbd37d 100644
--- a/ui/cypress/tests/dataExplorer/charts/heatmap.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/heatmap.spec.ts
@@ -16,23 +16,23 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Heatmap View in Data Explorer', () => {
+describe('Test Heatmap View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
'heatmap',
);
// Check checkbox
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
// Check if heatmap chart is visible
cy.dataCy('heatmap').should('be.visible');
diff --git a/ui/cypress/tests/dataExplorer/charts/histogram.spec.ts
b/ui/cypress/tests/chart/chart-types/histogram.spec.ts
similarity index 80%
rename from ui/cypress/tests/dataExplorer/charts/histogram.spec.ts
rename to ui/cypress/tests/chart/chart-types/histogram.spec.ts
index 86feafeecd..7fc3b04c87 100644
--- a/ui/cypress/tests/dataExplorer/charts/histogram.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/histogram.spec.ts
@@ -16,23 +16,23 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Histogram View in Data Explorer', () => {
+describe('Test Histogram View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
'histogram-chart',
);
// Change field for histogram
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
// Check if histogram chart is displayed
cy.dataCy('histogram-chart').should('be.visible');
diff --git a/ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
b/ui/cypress/tests/chart/chart-types/indicator.spec.ts
similarity index 80%
copy from ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
copy to ui/cypress/tests/chart/chart-types/indicator.spec.ts
index 3fd353f5eb..2589b40e45 100644
--- a/ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/indicator.spec.ts
@@ -16,23 +16,23 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Indicator View in Data Explorer', () => {
+describe('Test Indicator View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
'indicator-chart',
);
// Check checkbox
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
cy.dataCy('data-explorer-select-delta-checkbox').click();
cy.dataCy('indicator-chart').should('be.visible');
diff --git a/ui/cypress/tests/dataExplorer/charts/map.spec.ts
b/ui/cypress/tests/chart/chart-types/map.spec.ts
similarity index 85%
rename from ui/cypress/tests/dataExplorer/charts/map.spec.ts
rename to ui/cypress/tests/chart/chart-types/map.spec.ts
index 1d3f87f835..abf925577f 100644
--- a/ui/cypress/tests/dataExplorer/charts/map.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/map.spec.ts
@@ -16,23 +16,23 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Map View in Data Explorer', () => {
+describe('Test Map View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
'map',
);
// Change marker positions
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
cy.dataCy('data-view-map-select-latitude')
.click()
.get('mat-option')
@@ -53,7 +53,7 @@ describe('Test Map View in Data Explorer', () => {
);
// Change from markers to trace
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
cy.dataCy('data-view-map-select-marker-or-trace')
.click()
.get('mat-option')
diff --git a/ui/cypress/tests/dataExplorer/charts/scatter.smoke.spec.ts
b/ui/cypress/tests/chart/chart-types/scatter.smoke.spec.ts
similarity index 83%
rename from ui/cypress/tests/dataExplorer/charts/scatter.smoke.spec.ts
rename to ui/cypress/tests/chart/chart-types/scatter.smoke.spec.ts
index b6c5d61e89..0f2e07869e 100644
--- a/ui/cypress/tests/dataExplorer/charts/scatter.smoke.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/scatter.smoke.spec.ts
@@ -16,16 +16,16 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Scatter View in Data Explorer', () => {
+describe('Test Scatter View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
'scatter-chart',
diff --git a/ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
b/ui/cypress/tests/chart/chart-types/table.spec.ts
similarity index 68%
rename from ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
rename to ui/cypress/tests/chart/chart-types/table.spec.ts
index 3fd353f5eb..ebb60bd296 100644
--- a/ui/cypress/tests/dataExplorer/charts/indicator.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/table.spec.ts
@@ -16,25 +16,24 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
+import { ChartWidgetTableUtils } from
'../../../support/utils/chart/ChartWidgetTableUtils';
+import { ChartWidget } from '../../../support/model/ChartWidget';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-describe('Test Indicator View in Data Explorer', () => {
+describe('Test Table View in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'view',
PrepareTestDataUtils.dataName,
- 'indicator-chart',
+ ChartWidget.TABLE,
);
- // Check checkbox
- DataExplorerUtils.openVisualizationConfig();
- cy.dataCy('data-explorer-select-delta-checkbox').click();
-
- cy.dataCy('indicator-chart').should('be.visible');
+ // Check if table is displayed correctly
+ ChartWidgetTableUtils.checkAmountOfRows(10);
});
});
diff --git a/ui/cypress/tests/dataExplorer/charts/timeSeriesSave.spec.ts
b/ui/cypress/tests/chart/chart-types/timeSeriesSave.spec.ts
similarity index 82%
rename from ui/cypress/tests/dataExplorer/charts/timeSeriesSave.spec.ts
rename to ui/cypress/tests/chart/chart-types/timeSeriesSave.spec.ts
index 6eed74bd68..f404753723 100644
--- a/ui/cypress/tests/dataExplorer/charts/timeSeriesSave.spec.ts
+++ b/ui/cypress/tests/chart/chart-types/timeSeriesSave.spec.ts
@@ -16,7 +16,7 @@
*
*/
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
const testView1 = 'TestView1';
@@ -24,22 +24,22 @@ const testView2 = 'TestView2';
describe('Test if widget configuration is updated correctly', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
// Create first test data view with one time series widget
- DataExplorerUtils.addDataViewAndTimeSeriesWidget(
+ ChartUtils.addDataViewAndTimeSeriesWidget(
testView1,
PrepareTestDataUtils.dataName,
);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.saveDataViewConfiguration();
cy.wait(1000);
// Create second test data view with one time series widget
- DataExplorerUtils.addDataViewAndTimeSeriesWidget(
+ ChartUtils.addDataViewAndTimeSeriesWidget(
testView2,
PrepareTestDataUtils.dataName,
);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.saveDataViewConfiguration();
});
it('Perform Test', () => {
@@ -49,10 +49,10 @@ describe('Test if widget configuration is updated
correctly', () => {
const runTestCase = () => {
// Visit settings of widget
- DataExplorerUtils.editDataView(testView1);
+ ChartUtils.editDataView(testView1);
// Change first field from line plot to scatter plot
- DataExplorerUtils.openVisualizationConfig();
+ ChartUtils.openVisualizationConfig();
// select type scatter
cy.dataCy('time-series-item-config-toggle').first().click();
diff --git a/ui/cypress/tests/dataExplorer/chartDataPreview.smoke.spec.ts
b/ui/cypress/tests/chart/chartDataPreview.smoke.spec.ts
similarity index 56%
rename from ui/cypress/tests/dataExplorer/chartDataPreview.smoke.spec.ts
rename to ui/cypress/tests/chart/chartDataPreview.smoke.spec.ts
index 9d95809e77..ea89ed1658 100644
--- a/ui/cypress/tests/dataExplorer/chartDataPreview.smoke.spec.ts
+++ b/ui/cypress/tests/chart/chartDataPreview.smoke.spec.ts
@@ -15,34 +15,34 @@
* limitations under the License.
*/
-import { DataExplorerWidget } from '../../support/model/DataExplorerWidget';
+import { ChartWidget } from '../../support/model/ChartWidget';
import { PrepareTestDataUtils } from
'../../support/utils/PrepareTestDataUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
-describe('Test Chart Data Preview in Data Explorer', () => {
+describe('Test Chart Data Preview in Charts', () => {
beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
+ ChartUtils.initDataLakeTests();
});
it('Shows and toggles the chart data preview', () => {
- DataExplorerUtils.addDataViewAndWidget(
+ ChartUtils.addDataViewAndWidget(
'preview-view',
PrepareTestDataUtils.dataName,
- DataExplorerWidget.TIME_SERIES,
+ ChartWidget.TIME_SERIES,
);
- DataExplorerBtns.chartDataPreviewHeader().should('be.visible');
- DataExplorerBtns.chartDataPreviewTable().should('not.exist');
+ ChartBtns.chartDataPreviewHeader().should('be.visible');
+ ChartBtns.chartDataPreviewTable().should('not.exist');
- DataExplorerBtns.chartDataPreviewToggle().click();
+ ChartBtns.chartDataPreviewToggle().click();
- DataExplorerBtns.chartDataPreviewTable().should('be.visible');
- DataExplorerBtns.chartDataPreviewCell('time')
+ ChartBtns.chartDataPreviewTable().should('be.visible');
+ ChartBtns.chartDataPreviewCell('time')
.should('exist')
.and('have.length.at.least', 1);
- DataExplorerBtns.chartDataPreviewToggle().click();
- DataExplorerBtns.chartDataPreviewTable().should('not.exist');
+ ChartBtns.chartDataPreviewToggle().click();
+ ChartBtns.chartDataPreviewTable().should('not.exist');
});
});
diff --git a/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
b/ui/cypress/tests/chart/configuration.smoke.spec.ts
similarity index 67%
rename from ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
rename to ui/cypress/tests/chart/configuration.smoke.spec.ts
index 10bf20f5ff..9080a80515 100644
--- a/ui/cypress/tests/dataExplorer/configuration.smoke.spec.ts
+++ b/ui/cypress/tests/chart/configuration.smoke.spec.ts
@@ -17,37 +17,33 @@
*/
import { PipelineUtils } from '../../support/utils/pipeline/PipelineUtils';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
import { GeneralUtils } from '../../support/utils/GeneralUtils';
import { PrepareTestDataUtils } from
'../../support/utils/PrepareTestDataUtils';
describe('Test Truncate data in datalake', () => {
beforeEach('Setup Test', () => {
cy.initStreamPipesTest();
- DataExplorerUtils.loadRandomDataSetIntoDataLake();
+ ChartUtils.loadRandomDataSetIntoDataLake();
});
it('Perform Test', () => {
- DataExplorerUtils.goToDatalakeConfiguration();
+ ChartUtils.goToDatalakeConfiguration();
cy.dataCy('datalake-total-count-button').click();
// Check if amount of events is correct
- DataExplorerBtns.datalakeNumberEvents()
- .should('be.visible')
- .contains('10');
+ ChartBtns.datalakeNumberEvents().should('be.visible').contains('10');
// Truncate data
GeneralUtils.openMenuForRow(PrepareTestDataUtils.dataName);
- DataExplorerBtns.dataLakeTruncateBtn().should('be.visible').click();
- DataExplorerBtns.confirmDataLakeTruncateBtn()
- .should('be.visible')
- .click();
+ ChartBtns.dataLakeTruncateBtn().should('be.visible').click();
+ ChartBtns.confirmDataLakeTruncateBtn().should('be.visible').click();
cy.dataCy('datalake-total-count-button').click();
// Check if amount of events is zero. The should('have.text, '0') is
required to check for text equality
- DataExplorerBtns.datalakeNumberEvents()
+ ChartBtns.datalakeNumberEvents()
.should('be.visible')
.should($element => {
const text = $element.text().trim();
@@ -59,27 +55,23 @@ describe('Test Truncate data in datalake', () => {
describe('Delete data in datalake', () => {
before('Setup Test', () => {
cy.initStreamPipesTest();
- DataExplorerUtils.loadRandomDataSetIntoDataLake();
+ ChartUtils.loadRandomDataSetIntoDataLake();
PipelineUtils.deletePipeline('Persist prepared_data');
});
it('Perform Test', () => {
- DataExplorerUtils.goToDatalakeConfiguration();
+ ChartUtils.goToDatalakeConfiguration();
cy.dataCy('datalake-total-count-button').click();
// Check if amount of events is correct
- DataExplorerBtns.datalakeNumberEvents()
- .should('be.visible')
- .contains('10');
+ ChartBtns.datalakeNumberEvents().should('be.visible').contains('10');
// Delete data
GeneralUtils.openMenuForRow(PrepareTestDataUtils.dataName);
- DataExplorerBtns.dataLakeDeleteBtn().should('be.visible').click();
- DataExplorerBtns.confirmDataLakeDeleteBtn()
- .should('be.visible')
- .click();
+ ChartBtns.dataLakeDeleteBtn().should('be.visible').click();
+ ChartBtns.confirmDataLakeDeleteBtn().should('be.visible').click();
// Check if amount of events is zero
- DataExplorerBtns.datalakeNumberEvents().should('have.length', 0);
+ ChartBtns.datalakeNumberEvents().should('have.length', 0);
});
});
diff --git a/ui/cypress/tests/chart/deleteViewAndDashboard.spec.ts
b/ui/cypress/tests/chart/deleteViewAndDashboard.spec.ts
new file mode 100644
index 0000000000..f20ecaeb72
--- /dev/null
+++ b/ui/cypress/tests/chart/deleteViewAndDashboard.spec.ts
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+
+describe('Test Deletion of Data View and Dashboard', () => {
+ beforeEach('Setup Test', () => {
+ cy.initStreamPipesTest();
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
+ });
+
+ it('Perform Test', () => {
+ const dashboard = 'TestDashboard';
+ const dataView = 'TestView';
+
+ ChartUtils.goToDatalake();
+
+ ChartUtils.addDataViewAndTableWidget(dataView,
ChartUtils.ADAPTER_NAME);
+
+ ChartUtils.saveDataViewConfiguration();
+
+ ChartUtils.checkRowsViewsTable(1);
+
+ ChartUtils.goToDashboard();
+
+ ChartUtils.createAndEditDashboard(dashboard);
+
+ ChartUtils.addDataViewToDashboard(dataView, true);
+
+ ChartUtils.saveDashboardConfiguration();
+
+ ChartUtils.checkRowsDashboardTable(1);
+
+ // Click "Delete" but cancel action and check if dashboard and view
are still displayed
+ ChartUtils.cancelDeleteDashboard(dashboard);
+
+ ChartUtils.checkRowsDashboardTable(1);
+
+ ChartUtils.goToDatalake();
+
+ ChartUtils.cancelDeleteDataView(dataView);
+
+ ChartUtils.checkRowsViewsTable(1);
+
+ ChartUtils.deleteDataView(dataView);
+
+ ChartUtils.checkRowsViewsTable(0);
+
+ ChartUtils.goToDashboard();
+
+ ChartUtils.editDashboard(dashboard);
+
+ // Validate that data view is removed from dashboard
+ ChartUtils.getEmptyDashboardInformation().should('be.visible');
+
+ ChartUtils.saveDashboardConfiguration();
+
+ ChartUtils.deleteDashboard(dashboard);
+
+ ChartUtils.checkRowsDashboardTable(0);
+ });
+});
diff --git
a/ui/cypress/tests/dataExplorer/filterNumericalStringProperties.spec.ts
b/ui/cypress/tests/chart/filterNumericalStringProperties.spec.ts
similarity index 69%
rename from
ui/cypress/tests/dataExplorer/filterNumericalStringProperties.spec.ts
rename to ui/cypress/tests/chart/filterNumericalStringProperties.spec.ts
index 647f8b0b26..2bd393488b 100644
--- a/ui/cypress/tests/dataExplorer/filterNumericalStringProperties.spec.ts
+++ b/ui/cypress/tests/chart/filterNumericalStringProperties.spec.ts
@@ -16,14 +16,14 @@
*
*/
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerWidgetTableUtils } from
'../../support/utils/dataExplorer/DataExplorerWidgetTableUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartWidgetTableUtils } from
'../../support/utils/chart/ChartWidgetTableUtils';
import { DataLakeFilterConfig } from
'../../support/model/DataLakeFilterConfig';
import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
import { ConnectBtns } from '../../support/utils/connect/ConnectBtns';
import { ConnectUtils } from '../../support/utils/connect/ConnectUtils';
import { FileManagementUtils } from '../../support/utils/FileManagementUtils';
-import { DataExplorerWidget } from '../../support/model/DataExplorerWidget';
+import { ChartWidget } from '../../support/model/ChartWidget';
describe('Validate that filter works for numerical dimension property', () => {
beforeEach('Setup Test', () => {
@@ -46,46 +46,46 @@ describe('Validate that filter works for numerical
dimension property', () => {
});
it('Perform Test', () => {
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
// create table widget and select time range
const startDate = new Date(1737029442000);
const endDate = new Date(1742220659000);
- DataExplorerUtils.clickOrderBy('descending');
+ ChartUtils.clickOrderBy('descending');
- DataExplorerUtils.openVisualizationConfig();
- DataExplorerUtils.selectVisualizationType(DataExplorerWidget.TABLE);
- DataExplorerUtils.selectTimeRange(startDate, endDate);
+ ChartUtils.openVisualizationConfig();
+ ChartUtils.selectVisualizationType(ChartWidget.TABLE);
+ ChartUtils.selectTimeRange(startDate, endDate);
cy.wait(1000);
// validate data in table
- DataExplorerWidgetTableUtils.checkAmountOfRows(2);
+ ChartWidgetTableUtils.checkAmountOfRows(2);
// select filter for tag
- DataExplorerUtils.selectDataConfig();
+ ChartUtils.selectDataConfig();
var filterConfig = new DataLakeFilterConfig('dimensionKey', '1', '=');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
+ ChartUtils.dataConfigAddFilter(filterConfig);
// validate data in table is filtered
- DataExplorerWidgetTableUtils.checkAmountOfRows(1);
+ ChartWidgetTableUtils.checkAmountOfRows(1);
// remove filter
- DataExplorerUtils.dataConfigRemoveFilter();
+ ChartUtils.dataConfigRemoveFilter();
- DataExplorerUtils.selectDataConfig();
+ ChartUtils.selectDataConfig();
filterConfig = new DataLakeFilterConfig('v1', '20', '=');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
+ ChartUtils.dataConfigAddFilter(filterConfig);
// validate data in table is filtered
- DataExplorerWidgetTableUtils.checkAmountOfRows(1);
+ ChartWidgetTableUtils.checkAmountOfRows(1);
// remove filter
- DataExplorerUtils.dataConfigRemoveFilter();
+ ChartUtils.dataConfigRemoveFilter();
// validate data again
- DataExplorerWidgetTableUtils.checkAmountOfRows(2);
+ ChartWidgetTableUtils.checkAmountOfRows(2);
});
});
diff --git a/ui/cypress/tests/dataExplorer/missingDataInDataLake.spec.ts
b/ui/cypress/tests/chart/missingDataInDataLake.spec.ts
similarity index 77%
rename from ui/cypress/tests/dataExplorer/missingDataInDataLake.spec.ts
rename to ui/cypress/tests/chart/missingDataInDataLake.spec.ts
index 32877a46fb..4d0ab1e156 100644
--- a/ui/cypress/tests/dataExplorer/missingDataInDataLake.spec.ts
+++ b/ui/cypress/tests/chart/missingDataInDataLake.spec.ts
@@ -16,9 +16,9 @@
*
*/
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../support/utils/PrepareTestDataUtils';
-import { DataExplorerWidgetTableUtils } from
'../../support/utils/dataExplorer/DataExplorerWidgetTableUtils';
+import { ChartWidgetTableUtils } from
'../../support/utils/chart/ChartWidgetTableUtils';
describe('Test missing properties in data lake', () => {
const dataViewName = 'TestView';
@@ -32,18 +32,18 @@ describe('Test missing properties in data lake', () => {
});
it('Test table with missing properties', () => {
- DataExplorerUtils.addDataViewAndTableWidget(
+ ChartUtils.addDataViewAndTableWidget(
dataViewName,
PrepareTestDataUtils.dataName,
);
- DataExplorerWidgetTableUtils.checkAmountOfRows(5);
+ ChartWidgetTableUtils.checkAmountOfRows(5);
- DataExplorerUtils.selectDataConfig();
+ ChartUtils.selectDataConfig();
cy.dataCy('data-explorer-ignore-missing-values-checkbox')
.children()
.click();
- DataExplorerWidgetTableUtils.checkAmountOfRows(3);
+ ChartWidgetTableUtils.checkAmountOfRows(3);
});
});
diff --git a/ui/cypress/tests/dataExplorer/timeOrderDataView.spec.ts
b/ui/cypress/tests/chart/timeOrderDataView.spec.ts
similarity index 69%
rename from ui/cypress/tests/dataExplorer/timeOrderDataView.spec.ts
rename to ui/cypress/tests/chart/timeOrderDataView.spec.ts
index 276d902cf7..2a3e1e391b 100644
--- a/ui/cypress/tests/dataExplorer/timeOrderDataView.spec.ts
+++ b/ui/cypress/tests/chart/timeOrderDataView.spec.ts
@@ -16,26 +16,26 @@
*
*/
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerWidget } from '../../support/model/DataExplorerWidget';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartWidget } from '../../support/model/ChartWidget';
-describe('Test Time Order in Data Explorer', () => {
+describe('Test Time Order in Charts', () => {
beforeEach('Setup Test', () => {
cy.initStreamPipesTest();
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
});
it('Perform Test with ascending and descending order', () => {
const startDate = new Date('2022-04-01T00:00:00Z');
const endDate = new Date('2022-07-01T23:59:59Z');
- DataExplorerUtils.clickOrderBy('descending');
+ ChartUtils.clickOrderBy('descending');
- DataExplorerUtils.openVisualizationConfig();
- DataExplorerUtils.selectVisualizationType(DataExplorerWidget.TABLE);
- DataExplorerUtils.selectTimeRange(startDate, endDate);
+ ChartUtils.openVisualizationConfig();
+ ChartUtils.selectVisualizationType(ChartWidget.TABLE);
+ ChartUtils.selectTimeRange(startDate, endDate);
cy.wait(1000);
cy.dataCy('data-explorer-table').then($cells => {
@@ -51,12 +51,12 @@ describe('Test Time Order in Data Explorer', () => {
});
// Save and leave view, edit view again and check ascending order
- DataExplorerUtils.saveDataViewConfiguration();
- DataExplorerUtils.editDataView('New chart');
- DataExplorerUtils.clickOrderBy('ascending');
- DataExplorerUtils.openVisualizationConfig();
- DataExplorerUtils.selectVisualizationType(DataExplorerWidget.TABLE);
- DataExplorerUtils.selectTimeRange(startDate, endDate);
+ ChartUtils.saveDataViewConfiguration();
+ ChartUtils.editDataView('New chart');
+ ChartUtils.clickOrderBy('ascending');
+ ChartUtils.openVisualizationConfig();
+ ChartUtils.selectVisualizationType(ChartWidget.TABLE);
+ ChartUtils.selectTimeRange(startDate, endDate);
cy.wait(1000);
cy.dataCy('data-explorer-table').then($cells => {
@@ -72,7 +72,7 @@ describe('Test Time Order in Data Explorer', () => {
});
// Check if dialog window is showing after applying changes to time
settings
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.checkIfConfirmationDialogIsShowing();
+ ChartUtils.goToDatalake();
+ ChartUtils.checkIfConfirmationDialogIsShowing();
});
});
diff --git a/ui/cypress/tests/dataExplorer/timeRangeSelectors.spec.ts
b/ui/cypress/tests/chart/timeRangeSelectors.spec.ts
similarity index 91%
rename from ui/cypress/tests/dataExplorer/timeRangeSelectors.spec.ts
rename to ui/cypress/tests/chart/timeRangeSelectors.spec.ts
index 38de9e38a9..fffc6b8d1c 100644
--- a/ui/cypress/tests/dataExplorer/timeRangeSelectors.spec.ts
+++ b/ui/cypress/tests/chart/timeRangeSelectors.spec.ts
@@ -16,7 +16,7 @@
*
*/
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import {
subDays,
subHours,
@@ -26,7 +26,7 @@ import {
subYears,
} from 'date-fns';
-describe('Test Time Range Selectors in Data Explorer', () => {
+describe('Test Time Range Selectors in Charts', () => {
const periods = [
{
selector: 'last-15-minutes',
@@ -46,20 +46,20 @@ describe('Test Time Range Selectors in Data Explorer', ()
=> {
before('Setup Tests', () => {
cy.initStreamPipesTest();
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
});
it('Perform Test', () => {
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
periods.forEach(period => {
cy.log('Testing period: ' + period.selector);
- DataExplorerUtils.openTimeSelectorMenu();
+ ChartUtils.openTimeSelectorMenu();
// Choosing time period and saving initial start and end dates
cy.dataCy(`time-selector-quick-${period.selector}`).click();
const expectedEndDate = new Date();
- DataExplorerUtils.openTimeSelectorMenu();
+ ChartUtils.openTimeSelectorMenu();
// check if dates can differ from the selected dates
const expectedStartDate = getExpectedStartDate(
expectedEndDate,
@@ -101,7 +101,7 @@ describe('Test Time Range Selectors in Data Explorer', ()
=> {
).to.be.true;
});
- DataExplorerUtils.applyCustomTimeSelection();
+ ChartUtils.applyCustomTimeSelection();
});
});
});
diff --git a/ui/cypress/tests/chart/widgetDataConfiguration.smoke.spec.ts
b/ui/cypress/tests/chart/widgetDataConfiguration.smoke.spec.ts
new file mode 100644
index 0000000000..c0f4b60dfb
--- /dev/null
+++ b/ui/cypress/tests/chart/widgetDataConfiguration.smoke.spec.ts
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+import { DataLakeFilterConfig } from
'../../support/model/DataLakeFilterConfig';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartWidgetTableUtils } from
'../../support/utils/chart/ChartWidgetTableUtils';
+
+describe('Test Table View in Charts', () => {
+ beforeEach('Setup Test', () => {
+ cy.initStreamPipesTest();
+ ChartUtils.loadDataIntoDataLake('datalake/sample.csv');
+ });
+
+ it('Perform Test', () => {
+ /**
+ * Prepare tests
+ */
+ ChartUtils.addDataViewAndTableWidget(
+ 'NewWidget',
+ ChartUtils.ADAPTER_NAME,
+ );
+
+ // Validate that X lines are available
+ ChartWidgetTableUtils.checkAmountOfRows(10);
+
+ // Go back to data configuration
+ ChartUtils.selectDataConfig();
+
+ /**
+ * Test filter configuration
+ */
+ // Test number
+ let filterConfig = new DataLakeFilterConfig('randomnumber', '22', '=');
+ ChartUtils.dataConfigAddFilter(filterConfig);
+ ChartWidgetTableUtils.checkAmountOfRows(2);
+ ChartUtils.validateFilterOptions(['=', '<', '<=', '>=', '>', '!=']);
+ ChartUtils.dataConfigRemoveFilter();
+ ChartWidgetTableUtils.checkAmountOfRows(10);
+
+ // Test number greater then
+ filterConfig = new DataLakeFilterConfig('randomnumber', '50', '>');
+ ChartUtils.dataConfigAddFilter(filterConfig);
+ ChartWidgetTableUtils.checkAmountOfRows(5);
+ ChartUtils.validateFilterOptions(['=', '<', '<=', '>=', '>', '!=']);
+ ChartUtils.dataConfigRemoveFilter();
+
+ // Test number smaller then
+ filterConfig = new DataLakeFilterConfig('randomnumber', '50', '<');
+ ChartUtils.dataConfigAddFilter(filterConfig);
+ ChartWidgetTableUtils.checkAmountOfRows(5);
+ ChartUtils.dataConfigRemoveFilter();
+
+ // Test boolean
+ filterConfig = new DataLakeFilterConfig('randombool', 'true', '=');
+ ChartUtils.dataConfigAddFilter(filterConfig);
+ ChartWidgetTableUtils.checkAmountOfRows(6);
+ ChartUtils.validateFilterOptions(['=', '!=']);
+ ChartUtils.validateAutoCompleteOptions(['true', 'false']);
+ ChartUtils.dataConfigRemoveFilter();
+
+ // Test string & if filter is persisted correctly
+ filterConfig = new DataLakeFilterConfig('randomtext', 'a', '=');
+ ChartUtils.checkIfFilterIsSet(0);
+ ChartUtils.dataConfigAddFilter(filterConfig);
+ ChartUtils.checkIfFilterIsSet(1);
+ ChartWidgetTableUtils.checkAmountOfRows(4);
+ ChartUtils.validateFilterOptions(['=', '!=']);
+ ChartUtils.validateAutoCompleteOptions(['a', 'b', 'c']);
+ ChartUtils.saveAndReEditWidget('NewWidget');
+ ChartUtils.checkIfFilterIsSet(1);
+ ChartWidgetTableUtils.checkAmountOfRows(4);
+ ChartUtils.dataConfigRemoveFilter();
+
+ /**
+ * Test groupBy configuration and if it is persisted correctly
+ */
+ cy.wait(1000);
+ ChartUtils.clickGroupBy('randomtext');
+ cy.wait(1000);
+ cy.dataCy('data-explorer-table-row-randomtext', { timeout: 10000 })
+ .last({ timeout: 10000 })
+ .contains('a', { timeout: 10000 });
+ cy.dataCy('data-explorer-table-row-randomtext', { timeout: 10000 })
+ .first({ timeout: 10000 })
+ .contains('c', { timeout: 10000 });
+ ChartWidgetTableUtils.checkAmountOfRows(10);
+ ChartUtils.saveAndReEditWidget('NewWidget');
+ cy.dataCy('data-explorer-group-by-randomtext')
+ .find('input')
+ .should('be.checked');
+ ChartUtils.clickGroupBy('randomtext');
+ });
+});
diff --git a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
index 00193f3a83..180a05ddff 100644
--- a/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
+++ b/ui/cypress/tests/connect/editAdapter.smoke.spec.ts
@@ -19,8 +19,8 @@
import { ConnectUtils } from '../../support/utils/connect/ConnectUtils';
import { ConnectBtns } from '../../support/utils/connect/ConnectBtns';
import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
import { SharedUtils } from '../../support/utils/shared/SharedUtils';
import { SharedBtns } from '../../support/utils/shared/SharedBtns';
import { ConnectEventSchemaUtils } from
'../../support/utils/connect/ConnectEventSchemaUtils';
@@ -114,23 +114,23 @@ describe('Test Edit Adapter', () => {
storeAndStartEditedAdapter();
// Validate that the data is further persisted in the database by
checking if the amount of events in the data lake changes
- DataExplorerUtils.goToDatalakeConfiguration();
+ ChartUtils.goToDatalakeConfiguration();
- DataExplorerUtils.waitForCountingResults();
+ ChartUtils.waitForCountingResults();
let initialValue;
- DataExplorerUtils.getDatalakeNumberOfEvents().then(value => {
+ ChartUtils.getDatalakeNumberOfEvents().then(value => {
initialValue = value;
});
cy.wait(3000);
- DataExplorerBtns.refreshDataLakeMeasures().click();
+ ChartBtns.refreshDataLakeMeasures().click();
- DataExplorerUtils.waitForCountingResults();
+ ChartUtils.waitForCountingResults();
- DataExplorerUtils.getDatalakeNumberOfEvents().then(newValue => {
+ ChartUtils.getDatalakeNumberOfEvents().then(newValue => {
expect(newValue).not.equal(initialValue);
});
});
diff --git
a/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
b/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
index e1f64d18e7..51d0ca9f8f 100644
--- a/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
+++ b/ui/cypress/tests/connect/editAdapterSettingsAndPipeline.smoke.spec.ts
@@ -22,7 +22,7 @@ import { PipelineUtils } from
'../../support/utils/pipeline/PipelineUtils';
import { PipelineElementBuilder } from
'../../support/builder/PipelineElementBuilder';
import { PipelineBuilder } from '../../support/builder/PipelineBuilder';
import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { GeneralUtils } from '../../support/utils/GeneralUtils';
import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
import { SharedUtils } from '../../support/utils/shared/SharedUtils';
@@ -112,8 +112,8 @@ describe('Test Edit Adapter and Pipeline', () => {
// Visit dashboard
cy.wait(5000);
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
cy.dataCy('data-explorer-field-selection-panel').should(
'include.text',
diff --git a/ui/cypress/tests/connect/rules/schemaRules.smoke.spec.ts
b/ui/cypress/tests/connect/rules/schemaRules.smoke.spec.ts
index 5d4925ffaf..df33a4f88e 100644
--- a/ui/cypress/tests/connect/rules/schemaRules.smoke.spec.ts
+++ b/ui/cypress/tests/connect/rules/schemaRules.smoke.spec.ts
@@ -20,7 +20,7 @@ import { ConnectUtils } from
'../../../support/utils/connect/ConnectUtils';
import { FileManagementUtils } from
'../../../support/utils/FileManagementUtils';
import { ConnectEventSchemaUtils } from
'../../../support/utils/connect/ConnectEventSchemaUtils';
import { ConnectBtns } from '../../../support/utils/connect/ConnectBtns';
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
describe('Connect schema rule transformations', () => {
beforeEach('Setup Test', () => {
@@ -57,7 +57,7 @@ describe('Connect schema rule transformations', () => {
ConnectUtils.startAdapter(adapterConfiguration, true);
- DataExplorerUtils.checkResults(
+ ChartUtils.checkResults(
'Adapter to test rules',
'cypress/fixtures/connect/schemaRules/expected.csv',
true,
diff --git
a/ui/cypress/tests/dataDownloadDialog/dataDownloadDialogTest.smoke.spec.ts
b/ui/cypress/tests/dataDownloadDialog/dataDownloadDialogTest.smoke.spec.ts
index 8762f9a5b2..27f674d611 100644
--- a/ui/cypress/tests/dataDownloadDialog/dataDownloadDialogTest.smoke.spec.ts
+++ b/ui/cypress/tests/dataDownloadDialog/dataDownloadDialogTest.smoke.spec.ts
@@ -18,10 +18,10 @@
import { ExportConfig } from
'../../../projects/streampipes/shared-ui/src/lib/dialog/data-download-dialog/model/export-config.model';
import { DataDownloadDialogUtils } from
'../../support/utils/DataDownloadDialogUtils';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { PrepareTestDataUtils } from
'../../support/utils/PrepareTestDataUtils';
-describe('Test data explorer data download dialog', () => {
+describe('Test chart data download dialog', () => {
before('Setup Test', () => {
cy.initStreamPipesTest();
PrepareTestDataUtils.loadDataIntoDataLake(
@@ -29,11 +29,11 @@ describe('Test data explorer data download dialog', () => {
'json_array',
);
- DataExplorerUtils.addDataViewAndTableWidget(
+ ChartUtils.addDataViewAndTableWidget(
dataViewName,
PrepareTestDataUtils.dataName,
);
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.saveDataViewConfiguration();
});
beforeEach('Setup Test', () => {
diff --git a/ui/cypress/tests/dataExplorer/charts/table.spec.ts
b/ui/cypress/tests/dataExplorer/charts/table.spec.ts
deleted file mode 100644
index 932da3fbd3..0000000000
--- a/ui/cypress/tests/dataExplorer/charts/table.spec.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerWidgetTableUtils } from
'../../../support/utils/dataExplorer/DataExplorerWidgetTableUtils';
-import { DataExplorerWidget } from '../../../support/model/DataExplorerWidget';
-import { PrepareTestDataUtils } from
'../../../support/utils/PrepareTestDataUtils';
-
-describe('Test Table View in Data Explorer', () => {
- beforeEach('Setup Test', () => {
- DataExplorerUtils.initDataLakeTests();
- });
-
- it('Perform Test', () => {
- DataExplorerUtils.addDataViewAndWidget(
- 'view',
- PrepareTestDataUtils.dataName,
- DataExplorerWidget.TABLE,
- );
-
- // Check if table is displayed correctly
- DataExplorerWidgetTableUtils.checkAmountOfRows(10);
- });
-});
diff --git a/ui/cypress/tests/dataExplorer/deleteViewAndDashboard.spec.ts
b/ui/cypress/tests/dataExplorer/deleteViewAndDashboard.spec.ts
deleted file mode 100644
index d868fd31a5..0000000000
--- a/ui/cypress/tests/dataExplorer/deleteViewAndDashboard.spec.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-
-describe('Test Deletion of Data View and Dashboard', () => {
- beforeEach('Setup Test', () => {
- cy.initStreamPipesTest();
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
- });
-
- it('Perform Test', () => {
- const dashboard = 'TestDashboard';
- const dataView = 'TestView';
-
- DataExplorerUtils.goToDatalake();
-
- DataExplorerUtils.addDataViewAndTableWidget(
- dataView,
- DataExplorerUtils.ADAPTER_NAME,
- );
-
- DataExplorerUtils.saveDataViewConfiguration();
-
- DataExplorerUtils.checkRowsViewsTable(1);
-
- DataExplorerUtils.goToDashboard();
-
- DataExplorerUtils.createAndEditDashboard(dashboard);
-
- DataExplorerUtils.addDataViewToDashboard(dataView, true);
-
- DataExplorerUtils.saveDashboardConfiguration();
-
- DataExplorerUtils.checkRowsDashboardTable(1);
-
- // Click "Delete" but cancel action and check if dashboard and view
are still displayed
- DataExplorerUtils.cancelDeleteDashboard(dashboard);
-
- DataExplorerUtils.checkRowsDashboardTable(1);
-
- DataExplorerUtils.goToDatalake();
-
- DataExplorerUtils.cancelDeleteDataView(dataView);
-
- DataExplorerUtils.checkRowsViewsTable(1);
-
- DataExplorerUtils.deleteDataView(dataView);
-
- DataExplorerUtils.checkRowsViewsTable(0);
-
- DataExplorerUtils.goToDashboard();
-
- DataExplorerUtils.editDashboard(dashboard);
-
- // Validate that data view is removed from dashboard
- DataExplorerUtils.getEmptyDashboardInformation().should('be.visible');
-
- DataExplorerUtils.saveDashboardConfiguration();
-
- DataExplorerUtils.deleteDashboard(dashboard);
-
- DataExplorerUtils.checkRowsDashboardTable(0);
- });
-});
diff --git
a/ui/cypress/tests/dataExplorer/widgetDataConfiguration.smoke.spec.ts
b/ui/cypress/tests/dataExplorer/widgetDataConfiguration.smoke.spec.ts
deleted file mode 100644
index 19789e700d..0000000000
--- a/ui/cypress/tests/dataExplorer/widgetDataConfiguration.smoke.spec.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { DataLakeFilterConfig } from
'../../support/model/DataLakeFilterConfig';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerWidgetTableUtils } from
'../../support/utils/dataExplorer/DataExplorerWidgetTableUtils';
-
-describe('Test Table View in Data Explorer', () => {
- beforeEach('Setup Test', () => {
- cy.initStreamPipesTest();
- DataExplorerUtils.loadDataIntoDataLake('datalake/sample.csv');
- });
-
- it('Perform Test', () => {
- /**
- * Prepare tests
- */
- DataExplorerUtils.addDataViewAndTableWidget(
- 'NewWidget',
- DataExplorerUtils.ADAPTER_NAME,
- );
-
- // Validate that X lines are available
- DataExplorerWidgetTableUtils.checkAmountOfRows(10);
-
- // Go back to data configuration
- DataExplorerUtils.selectDataConfig();
-
- /**
- * Test filter configuration
- */
- // Test number
- let filterConfig = new DataLakeFilterConfig('randomnumber', '22', '=');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
- DataExplorerWidgetTableUtils.checkAmountOfRows(2);
- DataExplorerUtils.validateFilterOptions([
- '=',
- '<',
- '<=',
- '>=',
- '>',
- '!=',
- ]);
- DataExplorerUtils.dataConfigRemoveFilter();
- DataExplorerWidgetTableUtils.checkAmountOfRows(10);
-
- // Test number greater then
- filterConfig = new DataLakeFilterConfig('randomnumber', '50', '>');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
- DataExplorerWidgetTableUtils.checkAmountOfRows(5);
- DataExplorerUtils.validateFilterOptions([
- '=',
- '<',
- '<=',
- '>=',
- '>',
- '!=',
- ]);
- DataExplorerUtils.dataConfigRemoveFilter();
-
- // Test number smaller then
- filterConfig = new DataLakeFilterConfig('randomnumber', '50', '<');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
- DataExplorerWidgetTableUtils.checkAmountOfRows(5);
- DataExplorerUtils.dataConfigRemoveFilter();
-
- // Test boolean
- filterConfig = new DataLakeFilterConfig('randombool', 'true', '=');
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
- DataExplorerWidgetTableUtils.checkAmountOfRows(6);
- DataExplorerUtils.validateFilterOptions(['=', '!=']);
- DataExplorerUtils.validateAutoCompleteOptions(['true', 'false']);
- DataExplorerUtils.dataConfigRemoveFilter();
-
- // Test string & if filter is persisted correctly
- filterConfig = new DataLakeFilterConfig('randomtext', 'a', '=');
- DataExplorerUtils.checkIfFilterIsSet(0);
- DataExplorerUtils.dataConfigAddFilter(filterConfig);
- DataExplorerUtils.checkIfFilterIsSet(1);
- DataExplorerWidgetTableUtils.checkAmountOfRows(4);
- DataExplorerUtils.validateFilterOptions(['=', '!=']);
- DataExplorerUtils.validateAutoCompleteOptions(['a', 'b', 'c']);
- DataExplorerUtils.saveAndReEditWidget('NewWidget');
- DataExplorerUtils.checkIfFilterIsSet(1);
- DataExplorerWidgetTableUtils.checkAmountOfRows(4);
- DataExplorerUtils.dataConfigRemoveFilter();
-
- /**
- * Test groupBy configuration and if it is persisted correctly
- */
- cy.wait(1000);
- DataExplorerUtils.clickGroupBy('randomtext');
- cy.wait(1000);
- cy.dataCy('data-explorer-table-row-randomtext', { timeout: 10000 })
- .last({ timeout: 10000 })
- .contains('a', { timeout: 10000 });
- cy.dataCy('data-explorer-table-row-randomtext', { timeout: 10000 })
- .first({ timeout: 10000 })
- .contains('c', { timeout: 10000 });
- DataExplorerWidgetTableUtils.checkAmountOfRows(10);
- DataExplorerUtils.saveAndReEditWidget('NewWidget');
- cy.dataCy('data-explorer-group-by-randomtext')
- .find('input')
- .should('be.checked');
- DataExplorerUtils.clickGroupBy('randomtext');
- });
-});
diff --git
a/ui/cypress/tests/experimental/restartStreamPipes/restartStreamPipes2.ts
b/ui/cypress/tests/experimental/restartStreamPipes/restartStreamPipes2.ts
index 81bbb8bee2..2bed28d3f4 100644
--- a/ui/cypress/tests/experimental/restartStreamPipes/restartStreamPipes2.ts
+++ b/ui/cypress/tests/experimental/restartStreamPipes/restartStreamPipes2.ts
@@ -17,7 +17,7 @@
*/
import { DashboardUtils } from '../../../support/utils/DashboardUtils';
-import { DataExplorerUtils } from
'../../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../../support/utils/chart/ChartUtils';
describe('Validate StreamPipes after restart', () => {
beforeEach('Setup Test', () => {
@@ -26,7 +26,7 @@ describe('Validate StreamPipes after restart', () => {
it('Perform Test', () => {
// Truncate data in db
- DataExplorerUtils.goToDatalakeConfiguration();
+ ChartUtils.goToDatalakeConfiguration();
cy.dataCy('datalake-truncate-btn').should('be.visible').click();
cy.dataCy('confirm-truncate-data-btn', { timeout: 10000 })
.should('be.visible')
diff --git a/ui/cypress/tests/userManagement/testAddAssetOnResourceCreation.ts
b/ui/cypress/tests/userManagement/testAddAssetOnResourceCreation.ts
index 008085ecf3..ca025ecf3d 100644
--- a/ui/cypress/tests/userManagement/testAddAssetOnResourceCreation.ts
+++ b/ui/cypress/tests/userManagement/testAddAssetOnResourceCreation.ts
@@ -23,8 +23,8 @@ import { PipelineUtils } from
'../../support/utils/pipeline/PipelineUtils';
import { PipelineBtns } from '../../support/utils/pipeline/PipelineBtns';
import { AssetUtils } from '../../support/utils/asset/AssetUtils';
import { AdapterBuilder } from '../../support/builder/AdapterBuilder';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
import { ConnectBtns } from '../../support/utils/connect/ConnectBtns';
import { AssetBuilder } from '../../support/builder/AssetBuilder';
@@ -107,35 +107,35 @@ describe('Test that resources can be added to assets on
creation', () => {
it('Check Role Asset Admin in Charts', () => {
UserUtils.switchUser(newUser);
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
- DataExplorerBtns.chartAssetCheckboxBtn().should('exist');
+ ChartBtns.chartAssetCheckboxBtn().should('exist');
UserUtils.toggleUserRole(newUser, UserRole.ROLE_ASSET_ADMIN);
UserUtils.switchUser(newUser);
- DataExplorerUtils.goToDatalake();
- DataExplorerUtils.createAndEditDataView();
+ ChartUtils.goToDatalake();
+ ChartUtils.createAndEditDataView();
- DataExplorerBtns.chartAssetCheckboxBtn().should('not.exist');
+ ChartBtns.chartAssetCheckboxBtn().should('not.exist');
});
it('Check Role Asset Admin in Dashboard', () => {
UserUtils.switchUser(newUser);
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.addNewDashboard('Test');
+ ChartUtils.goToDashboard();
+ ChartUtils.addNewDashboard('Test');
- DataExplorerBtns.dashboardAssetCheckboxBtn().should('exist');
- DataExplorerBtns.closeDashboardCreate().click();
+ ChartBtns.dashboardAssetCheckboxBtn().should('exist');
+ ChartBtns.closeDashboardCreate().click();
UserUtils.toggleUserRole(newUser, UserRole.ROLE_ASSET_ADMIN);
UserUtils.switchUser(newUser);
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.addNewDashboard('Test');
- DataExplorerBtns.dashboardAssetCheckboxBtn().should('not.exist');
+ ChartUtils.goToDashboard();
+ ChartUtils.addNewDashboard('Test');
+ ChartBtns.dashboardAssetCheckboxBtn().should('not.exist');
});
});
diff --git a/ui/cypress/tests/userManagement/testUserRoleCharts.spec.ts
b/ui/cypress/tests/userManagement/testUserRoleCharts.spec.ts
index fb0a9df8ed..b9c829e470 100644
--- a/ui/cypress/tests/userManagement/testUserRoleCharts.spec.ts
+++ b/ui/cypress/tests/userManagement/testUserRoleCharts.spec.ts
@@ -20,7 +20,7 @@ import { UserRole } from
'../../../src/app/_enums/user-role.enum';
import { UserUtils } from '../../support/utils/UserUtils';
import { ConnectUtils } from '../../support/utils/connect/ConnectUtils';
import { User } from '../../support/model/User';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { PermissionUtils } from '../../support/utils/user/PermissionUtils';
describe('Test User Roles for Charts', () => {
@@ -84,7 +84,7 @@ describe('Test User Roles for Charts', () => {
chartIsNotVisible(chartUser1);
UserUtils.switchUser(chartAdmin1);
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
PermissionUtils.changeOwnership(chartName, chartAdmin2.email);
chartIsNotVisible(chartAdmin1);
@@ -118,42 +118,38 @@ describe('Test User Roles for Charts', () => {
function setup() {
UserUtils.switchUser(chartAdmin1);
ConnectUtils.addMachineDataSimulator('simulator', true);
- DataExplorerUtils.addDataViewAndTableWidget(
- chartName,
- 'simulator',
- true,
- );
- DataExplorerUtils.saveDataViewConfiguration();
- DataExplorerUtils.checkAmount(1);
- DataExplorerUtils.goToDatalake();
+ ChartUtils.addDataViewAndTableWidget(chartName, 'simulator', true);
+ ChartUtils.saveDataViewConfiguration();
+ ChartUtils.checkAmount(1);
+ ChartUtils.goToDatalake();
}
function chartIsVisibleAndEditableCanChangePermissions(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfCharts(1);
- DataExplorerUtils.checkChartCanBeEdited(chartName);
+ ChartUtils.checkAmountOfCharts(1);
+ ChartUtils.checkChartCanBeEdited(chartName);
PermissionUtils.validateUserCanChangePermissions(chartName);
}
function chartIsVisibleAndEditableCannotChangePermissions(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfCharts(1);
- DataExplorerUtils.checkChartCanBeEdited(chartName);
+ ChartUtils.checkAmountOfCharts(1);
+ ChartUtils.checkChartCanBeEdited(chartName);
PermissionUtils.validateUserCanNotChangePermissions(chartName);
}
function chartIsVisibleButNotEditable(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfCharts(1);
- DataExplorerUtils.checkChartCanNotBeEdited(chartName);
+ ChartUtils.checkAmountOfCharts(1);
+ ChartUtils.checkChartCanNotBeEdited(chartName);
PermissionUtils.validateUserCanNotChangePermissions(chartName);
}
function chartIsNotVisible(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfCharts(0);
+ ChartUtils.checkAmountOfCharts(0);
}
});
diff --git a/ui/cypress/tests/userManagement/testUserRoleDashboard.spec.ts
b/ui/cypress/tests/userManagement/testUserRoleDashboard.spec.ts
index 59c794985a..a30181341e 100644
--- a/ui/cypress/tests/userManagement/testUserRoleDashboard.spec.ts
+++ b/ui/cypress/tests/userManagement/testUserRoleDashboard.spec.ts
@@ -20,9 +20,9 @@ import { UserRole } from
'../../../src/app/_enums/user-role.enum';
import { UserUtils } from '../../support/utils/UserUtils';
import { ConnectUtils } from '../../support/utils/connect/ConnectUtils';
import { User } from '../../support/model/User';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { PermissionUtils } from '../../support/utils/user/PermissionUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
describe('Test User Roles for Dashboards', () => {
const dashboardName = 'test-dashboard';
@@ -54,7 +54,7 @@ describe('Test User Roles for Dashboards', () => {
it('Dashboard is not shared with other users', () => {
UserUtils.switchUser(dashboardAdmin1);
- DataExplorerUtils.createNewDashboard(dashboardName);
+ ChartUtils.createNewDashboard(dashboardName);
// check admin
dashboardIsVisibleAndEditableCanChangePermissions(UserUtils.adminUser);
@@ -65,7 +65,7 @@ describe('Test User Roles for Dashboards', () => {
it('Make dashboard public', () => {
UserUtils.switchUser(dashboardAdmin1);
- DataExplorerUtils.createNewDashboard(dashboardName);
+ ChartUtils.createNewDashboard(dashboardName);
PermissionUtils.markElementAsPublic(dashboardName);
dashboardIsVisibleAndEditableCanChangePermissions(UserUtils.adminUser);
@@ -77,7 +77,7 @@ describe('Test User Roles for Dashboards', () => {
it('Share dashboard with other user and change ownership', () => {
UserUtils.switchUser(dashboardAdmin1);
- DataExplorerUtils.createNewDashboard(dashboardName);
+ ChartUtils.createNewDashboard(dashboardName);
PermissionUtils.authorizeUser(dashboardName, dashboardAdmin2.email);
@@ -88,7 +88,7 @@ describe('Test User Roles for Dashboards', () => {
dashboardIsNotVisible(dashboardUser1);
UserUtils.switchUser(dashboardAdmin1);
- DataExplorerUtils.goToDashboard();
+ ChartUtils.goToDashboard();
PermissionUtils.changeOwnership(dashboardName, dashboardAdmin2.email);
dashboardIsNotVisible(dashboardAdmin1);
@@ -109,7 +109,7 @@ describe('Test User Roles for Dashboards', () => {
UserUtils.addGroupToUser(dashboardAdminGroup, dashboardAdmin2.name);
UserUtils.switchUser(dashboardAdmin1);
- DataExplorerUtils.createNewDashboard(dashboardName);
+ ChartUtils.createNewDashboard(dashboardName);
PermissionUtils.authorizeGroup(dashboardName, dashboardAdminGroup);
@@ -120,7 +120,7 @@ describe('Test User Roles for Dashboards', () => {
dashboardIsVisibleAndEditableCannotChangePermissions(dashboardAdmin2);
});
- it('Test Dashboard and Data Explorer Permissions', () => {
+ it('Test Dashboard and Charts Permissions', () => {
UserUtils.switchUser(dashboardAdmin1);
ConnectUtils.addMachineDataSimulator('simulator', true);
@@ -128,77 +128,73 @@ describe('Test User Roles for Dashboards', () => {
cy.wait(1000);
addChart('chart2');
- DataExplorerUtils.createNewDashboard(dashboardName);
+ ChartUtils.createNewDashboard(dashboardName);
- DataExplorerUtils.editDashboard(dashboardName);
- DataExplorerUtils.addDataViewToDashboard('chart1', true);
- DataExplorerUtils.addDataViewToDashboard('chart2', true);
- DataExplorerUtils.saveDashboard();
+ ChartUtils.editDashboard(dashboardName);
+ ChartUtils.addDataViewToDashboard('chart1', true);
+ ChartUtils.addDataViewToDashboard('chart2', true);
+ ChartUtils.saveDashboard();
PermissionUtils.markElementAsPublic(dashboardName);
UserUtils.switchUser(dashboardAdmin2);
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.viewDashboard(dashboardName);
- DataExplorerBtns.moreOptionsBtn('chart1').should('exist');
- DataExplorerBtns.moreOptionsBtn('chart2').should('exist');
- DataExplorerBtns.removeWidgetBtn('chart1').should('not.exist');
- DataExplorerBtns.removeWidgetBtn('chart2').should('not.exist');
-
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.editDashboard(dashboardName);
- DataExplorerBtns.moreOptionsBtn('chart1').should('exist');
- DataExplorerBtns.moreOptionsBtn('chart2').should('exist');
- DataExplorerBtns.removeWidgetBtn('chart1').should('exist');
- DataExplorerBtns.removeWidgetBtn('chart2').should('exist');
+ ChartUtils.goToDashboard();
+ ChartUtils.viewDashboard(dashboardName);
+ ChartBtns.moreOptionsBtn('chart1').should('exist');
+ ChartBtns.moreOptionsBtn('chart2').should('exist');
+ ChartBtns.removeWidgetBtn('chart1').should('not.exist');
+ ChartBtns.removeWidgetBtn('chart2').should('not.exist');
+
+ ChartUtils.goToDashboard();
+ ChartUtils.editDashboard(dashboardName);
+ ChartBtns.moreOptionsBtn('chart1').should('exist');
+ ChartBtns.moreOptionsBtn('chart2').should('exist');
+ ChartBtns.removeWidgetBtn('chart1').should('exist');
+ ChartBtns.removeWidgetBtn('chart2').should('exist');
// Validate to add new widget to dashboard
- DataExplorerBtns.createChartBtn().should('not.exist');
- DataExplorerBtns.removeWidgetBtn('chart2').click();
- DataExplorerUtils.saveDashboard();
+ ChartBtns.createChartBtn().should('not.exist');
+ ChartBtns.removeWidgetBtn('chart2').click();
+ ChartUtils.saveDashboard();
UserUtils.switchUser(dashboardUser1);
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.viewDashboard(dashboardName);
- DataExplorerBtns.moreOptionsBtn('chart1').should('exist');
- DataExplorerBtns.moreOptionsBtn('chart2').should('not.exist');
+ ChartUtils.goToDashboard();
+ ChartUtils.viewDashboard(dashboardName);
+ ChartBtns.moreOptionsBtn('chart1').should('exist');
+ ChartBtns.moreOptionsBtn('chart2').should('not.exist');
});
function dashboardIsVisibleAndEditableCanChangePermissions(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfDashboards(1);
- DataExplorerUtils.checkDashboardCanBeEdited(dashboardName);
+ ChartUtils.checkAmountOfDashboards(1);
+ ChartUtils.checkDashboardCanBeEdited(dashboardName);
PermissionUtils.validateUserCanChangePermissions(dashboardName);
}
function dashboardIsVisibleAndEditableCannotChangePermissions(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfDashboards(1);
- DataExplorerUtils.checkDashboardCanBeEdited(dashboardName);
+ ChartUtils.checkAmountOfDashboards(1);
+ ChartUtils.checkDashboardCanBeEdited(dashboardName);
PermissionUtils.validateUserCanNotChangePermissions(dashboardName);
}
function dashboardIsVisibleButNotEditable(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfDashboards(1);
- DataExplorerUtils.checkDashboardCanNotBeEdited(dashboardName);
+ ChartUtils.checkAmountOfDashboards(1);
+ ChartUtils.checkDashboardCanNotBeEdited(dashboardName);
PermissionUtils.validateUserCanNotChangePermissions(dashboardName);
}
function dashboardIsNotVisible(user: User) {
UserUtils.switchUser(user);
- DataExplorerUtils.checkAmountOfDashboards(0);
+ ChartUtils.checkAmountOfDashboards(0);
}
function addChart(chartName: string) {
- DataExplorerUtils.addDataViewAndTableWidget(
- chartName,
- 'simulator',
- true,
- );
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.addDataViewAndTableWidget(chartName, 'simulator', true);
+ ChartUtils.saveDataViewConfiguration();
}
});
diff --git a/ui/cypress/tests/userManagement/testUserRoleDataset.spec.ts
b/ui/cypress/tests/userManagement/testUserRoleDataset.spec.ts
index c855272410..7dc8933f49 100644
--- a/ui/cypress/tests/userManagement/testUserRoleDataset.spec.ts
+++ b/ui/cypress/tests/userManagement/testUserRoleDataset.spec.ts
@@ -20,9 +20,9 @@ import { UserRole } from
'../../../src/app/_enums/user-role.enum';
import { UserUtils } from '../../support/utils/UserUtils';
import { ConnectUtils } from '../../support/utils/connect/ConnectUtils';
import { User } from '../../support/model/User';
-import { DataExplorerUtils } from
'../../support/utils/dataExplorer/DataExplorerUtils';
+import { ChartUtils } from '../../support/utils/chart/ChartUtils';
import { PermissionUtils } from '../../support/utils/user/PermissionUtils';
-import { DataExplorerBtns } from
'../../support/utils/dataExplorer/DataExplorerBtns';
+import { ChartBtns } from '../../support/utils/chart/ChartBtns';
import { DatasetUtils } from '../../support/utils/dataset/DatasetUtils';
import { GeneralUtils } from '../../support/utils/GeneralUtils';
@@ -97,7 +97,7 @@ describe('Test Dataset Permissions', () => {
assertDatasetAvailabilityInCharts(true);
- DataExplorerUtils.goToDatalake();
+ ChartUtils.goToDatalake();
PermissionUtils.authorizeUser(
'test',
@@ -109,11 +109,11 @@ describe('Test Dataset Permissions', () => {
UserUtils.switchUser(chartUser1);
- DataExplorerUtils.checkAmountOfCharts(1);
+ ChartUtils.checkAmountOfCharts(1);
GeneralUtils.openMenuForRow('test');
- DataExplorerBtns.viewWidget('test').click();
+ ChartBtns.viewWidget('test').click();
assertAlertBanner(true);
@@ -123,11 +123,11 @@ describe('Test Dataset Permissions', () => {
UserUtils.switchUser(chartUser1);
- DataExplorerUtils.checkAmountOfCharts(1);
+ ChartUtils.checkAmountOfCharts(1);
GeneralUtils.openMenuForRow('test');
- DataExplorerBtns.viewWidget('test').click();
+ ChartBtns.viewWidget('test').click();
assertAlertBanner(false);
});
@@ -152,7 +152,7 @@ describe('Test Dataset Permissions', () => {
assertAlertBanner(true);
- DataExplorerBtns.discardDashboard().click();
+ ChartBtns.discardDashboard().click();
assertDatasetIsNotVisible(dashboardAdmin1);
@@ -166,18 +166,14 @@ describe('Test Dataset Permissions', () => {
});
function assertDatasetAvailabilityInCharts(available: boolean) {
- DataExplorerUtils.goToDatalake();
- DataExplorerBtns.openNewDataViewBtn().click();
+ ChartUtils.goToDatalake();
+ ChartBtns.openNewDataViewBtn().click();
if (!available) {
cy.get('sp-alert-banner').should('be.visible');
} else {
- DataExplorerUtils.assertSelectDataSet('simulator');
- DataExplorerUtils.addDataViewAndTableWidget(
- 'test',
- 'simulator',
- true,
- );
- DataExplorerUtils.saveDataViewConfiguration();
+ ChartUtils.assertSelectDataSet('simulator');
+ ChartUtils.addDataViewAndTableWidget('test', 'simulator', true);
+ ChartUtils.saveDataViewConfiguration();
}
}
@@ -187,10 +183,10 @@ describe('Test Dataset Permissions', () => {
}
function generateDashboard(name: string) {
- DataExplorerUtils.goToDashboard();
- DataExplorerUtils.createNewDashboard(name);
- DataExplorerUtils.editDashboard(name);
- DataExplorerUtils.addDataViewToDashboard('test', true);
+ ChartUtils.goToDashboard();
+ ChartUtils.createNewDashboard(name);
+ ChartUtils.editDashboard(name);
+ ChartUtils.addDataViewToDashboard('test', true);
}
function assertDatasetIsVisibleAndEditableCanChangePermissions(user: User)
{
UserUtils.switchUser(user);