-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(#3091): Add option to configure time ordering * Remove deprecated model * Fix checkstyle * test: Add time order test + minor changes (#3113) * added time order test + minor changes * minor changes for e2e test --------- Co-authored-by: Marcelfrueh <[email protected]>
- Loading branch information
1 parent
542e822
commit 6048c0d
Showing
28 changed files
with
218 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* 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 { DataLakeUtils } from '../../support/utils/datalake/DataLakeUtils'; | ||
import { DataLakeBtns } from '../../support/utils/datalake/DataLakeBtns'; | ||
|
||
describe('Test Time Order in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
cy.initStreamPipesTest(); | ||
DataLakeUtils.loadDataIntoDataLake('datalake/sample.csv', false); | ||
DataLakeUtils.goToDatalake(); | ||
DataLakeUtils.createAndEditDataView('TestView'); | ||
}); | ||
|
||
it('Perform Test with ascending and descending order', () => { | ||
const startDate = new Date(1653871499055); | ||
const endDate = new Date(1653871608093); | ||
|
||
DataLakeUtils.clickOrderBy('descending'); | ||
|
||
DataLakeUtils.openVisualizationConfig(); | ||
DataLakeUtils.selectVisualizationType('Table'); | ||
DataLakeUtils.selectTimeRange(startDate, endDate); | ||
cy.wait(1000); | ||
|
||
cy.dataCy('data-explorer-table').then($cells => { | ||
const strings = $cells.map((index, cell) => cell.innerText).get(); | ||
|
||
// Check for date strings if order is descending | ||
const dateStrings = strings.filter((_, index) => index % 4 === 0); | ||
const dates = dateStrings.map(dateStr => new Date(dateStr)); | ||
const timestamps = dates.map(date => date.getTime()); | ||
for (let i = 0; i < timestamps.length - 1; i++) { | ||
expect(timestamps[i]).to.be.at.least(timestamps[i + 1]); | ||
} | ||
}); | ||
|
||
// Save and leave view, edit view again and check ascending order | ||
DataLakeBtns.saveDataViewButton(); | ||
DataLakeBtns.editDataViewButton('NewWidget'); | ||
DataLakeUtils.clickOrderBy('ascending'); | ||
DataLakeUtils.openVisualizationConfig(); | ||
DataLakeUtils.selectVisualizationType('Table'); | ||
DataLakeUtils.selectTimeRange(startDate, endDate); | ||
cy.wait(1000); | ||
|
||
cy.dataCy('data-explorer-table').then($cells => { | ||
const strings = $cells.map((index, cell) => cell.innerText).get(); | ||
|
||
// Check for date strings if order is ascending | ||
const dateStrings = strings.filter((_, index) => index % 4 === 0); | ||
const dates = dateStrings.map(dateStr => new Date(dateStr)); | ||
const timestamps = dates.map(date => date.getTime()); | ||
for (let i = 0; i < timestamps.length - 1; i++) { | ||
expect(timestamps[i]).to.be.at.most(timestamps[i + 1]); | ||
} | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
...w-designer-panel/data-settings/group-selection-panel/group-selection-panel.component.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.