-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add two new tests for data view * add five new tests for data view * Merge branch 'dev' into dataview-tests * Reset port in cypress.config.ts * Remove test for filter in table.spec.ts * added Utils
- Loading branch information
1 parent
52356ed
commit 166277f
Showing
12 changed files
with
267 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* 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'; | ||
|
||
describe('Test 2d Correlation View in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
DataLakeUtils.initDataLakeTests(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
DataLakeUtils.addDataViewAndWidget('view', 'Persist', '2D Correlation'); | ||
|
||
// Check if scatter plot is displayed | ||
cy.get('g').should('have.class', 'scatterlayer mlayer'); | ||
cy.get('g.points', { timeout: 10000 }) | ||
.children() | ||
.should('have.length', 10); | ||
|
||
// Change from line plot to scatter plot | ||
DataLakeUtils.selectVisualizationConfig(); | ||
cy.get('div').contains('Scatter').click(); | ||
cy.get('div').contains('Density').click(); | ||
|
||
// Check if scatter plot is displayed | ||
cy.get('g').should('have.class', 'contourlayer mlayer'); | ||
}); | ||
}); |
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,36 @@ | ||
/* | ||
* 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'; | ||
|
||
describe('Test Heatmap View in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
DataLakeUtils.initDataLakeTests(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
DataLakeUtils.addDataViewAndWidget('view', 'Persist', 'Heatmap'); | ||
|
||
// Check checkbox | ||
DataLakeUtils.selectVisualizationConfig(); | ||
cy.get('mat-checkbox input').click({ force: true }); | ||
|
||
// Check if heatmap chart is visible | ||
cy.get('sp-data-explorer-heatmap-widget').should('be.visible'); | ||
}); | ||
}); |
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,43 @@ | ||
/* | ||
* 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'; | ||
|
||
describe('Test Indicator View in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
DataLakeUtils.initDataLakeTests(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
DataLakeUtils.addDataViewAndWidget('view', 'Persist', 'Indicator'); | ||
|
||
// Check checkbox | ||
DataLakeUtils.selectVisualizationConfig(); | ||
cy.get('mat-checkbox input').click({ force: true }); | ||
cy.dataCy('data-explorer-select-delta-field') | ||
.click() | ||
.get('mat-option') | ||
.contains('count') | ||
.click(); | ||
|
||
// Check if indicator is displayed | ||
cy.get('g').should('have.class', 'indicatorlayer'); | ||
// Check if delta is displayed | ||
cy.get('text').should('have.class', 'delta'); | ||
}); | ||
}); |
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,61 @@ | ||
/* | ||
* 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'; | ||
|
||
describe('Test Map View in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
DataLakeUtils.initDataLakeTests(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
DataLakeUtils.addDataViewAndWidget('view', 'Persist', 'Map'); | ||
|
||
// Change marker positions | ||
DataLakeUtils.selectVisualizationConfig(); | ||
cy.dataCy('data-view-map-select-latitude') | ||
.click() | ||
.get('mat-option') | ||
.contains('randomnumber (prepared_data #1)') | ||
.click(); | ||
cy.dataCy('data-view-map-select-longitude') | ||
.click() | ||
.get('mat-option') | ||
.contains('randomnumber (prepared_data #1)') | ||
.click(); | ||
|
||
// Check if map with markers is visible | ||
cy.get('sp-data-explorer-map-widget').should('be.visible'); | ||
cy.get('img[alt=Marker]').should( | ||
'have.attr', | ||
'src', | ||
'assets/img/marker-icon.png', | ||
); | ||
|
||
// Change from markers to trace | ||
DataLakeUtils.selectVisualizationConfig(); | ||
cy.dataCy('data-view-map-select-marker-or-trace') | ||
.click() | ||
.get('mat-option') | ||
.contains('Trace') | ||
.click(); | ||
|
||
// Check if trace is visible | ||
cy.get('path').should('have.class', 'leaflet-interactive'); | ||
}); | ||
}); |
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,34 @@ | ||
/* | ||
* 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'; | ||
|
||
describe('Test Table View in Data Explorer', () => { | ||
beforeEach('Setup Test', () => { | ||
DataLakeUtils.initDataLakeTests(); | ||
}); | ||
|
||
it('Perform Test', () => { | ||
DataLakeUtils.addDataViewAndWidget('view', 'Persist', 'Table'); | ||
|
||
// Check if table is displayed correctly | ||
cy.dataCy('data-explorer-table-row-timestamp', { | ||
timeout: 10000, | ||
}).should('have.length', 10); | ||
}); | ||
}); |
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
Oops, something went wrong.