mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Geomap: Move tests to panels-suite (#75023)
This commit is contained in:
parent
67bf27d4ed
commit
158c669d1a
@ -1,34 +0,0 @@
|
||||
import { e2e } from '../utils';
|
||||
const DASHBOARD_ID = 'P2jR04WVk';
|
||||
|
||||
describe('Geomap layer controls options', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
|
||||
});
|
||||
|
||||
it('Tests map controls options', () => {
|
||||
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { editPanel: 1 } });
|
||||
|
||||
// Show zoom
|
||||
e2e.components.OptionsGroup.group('Map controls').scrollIntoView().should('exist');
|
||||
cy.get('input[id="controls.showZoom"]').check({ force: true });
|
||||
cy.contains('+');
|
||||
cy.get('.ol-zoom').should('exist');
|
||||
|
||||
// Show attribution
|
||||
cy.get('input[id="controls.showAttribution"]').check({ force: true });
|
||||
cy.get('.ol-attribution').should('exist');
|
||||
|
||||
// Show scale
|
||||
cy.get('input[id="controls.showScale"]').check({ force: true });
|
||||
cy.get('.ol-scale-line').should('exist');
|
||||
|
||||
// Show measure tool
|
||||
cy.get('input[id="controls.showMeasure"]').check({ force: true });
|
||||
e2e.components.PanelEditor.measureButton().should('exist');
|
||||
|
||||
// Show debug
|
||||
cy.get('input[id="controls.showDebug"]').check({ force: true });
|
||||
e2e.components.DebugOverlay.wrapper().should('exist');
|
||||
});
|
||||
});
|
58
e2e/panels-suite/geomap-map-controls.spec.ts
Normal file
58
e2e/panels-suite/geomap-map-controls.spec.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import { e2e } from '../utils';
|
||||
const DASHBOARD_ID = 'P2jR04WVk';
|
||||
|
||||
describe('Geomap layer controls options', () => {
|
||||
beforeEach(() => {
|
||||
e2e.flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
|
||||
});
|
||||
|
||||
it('Tests map controls options', () => {
|
||||
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { editPanel: 1 } });
|
||||
e2e.components.OptionsGroup.group('Map controls').scrollIntoView().should('exist');
|
||||
|
||||
// Show zoom
|
||||
e2e.components.PanelEditor.showZoomField()
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get('input[type="checkbox"]').check({ force: true });
|
||||
});
|
||||
|
||||
cy.contains('+');
|
||||
cy.get('.ol-zoom').should('exist');
|
||||
|
||||
// Show attribution
|
||||
e2e.components.PanelEditor.showAttributionField()
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get('input[type="checkbox"]').check({ force: true });
|
||||
});
|
||||
|
||||
cy.get('.ol-attribution').should('exist');
|
||||
|
||||
// Show scale
|
||||
e2e.components.PanelEditor.showScaleField()
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get('input[type="checkbox"]').check({ force: true });
|
||||
});
|
||||
|
||||
cy.get('.ol-scale-line').should('exist');
|
||||
|
||||
// Show measure tool
|
||||
e2e.components.PanelEditor.showMeasureField()
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get('input[type="checkbox"]').check({ force: true });
|
||||
});
|
||||
|
||||
e2e.components.PanelEditor.measureButton().should('exist');
|
||||
|
||||
// Show debug
|
||||
e2e.components.PanelEditor.showDebugField()
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
cy.get('input[type="checkbox"]').check({ force: true });
|
||||
});
|
||||
e2e.components.DebugOverlay.wrapper().should('exist');
|
||||
});
|
||||
});
|
@ -14,9 +14,7 @@ describe('Geomap spatial operations', () => {
|
||||
e2e.components.TransformTab.newTransform('Spatial operations').scrollIntoView().should('be.visible').click();
|
||||
e2e.components.Transforms.SpatialOperations.actionLabel().type('Prepare spatial field{enter}');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().should('be.visible');
|
||||
|
||||
e2e.components.Transforms.SpatialOperations.location.autoOption().check({ force: true });
|
||||
e2e.components.Transforms.SpatialOperations.location.autoOption().should('be.checked');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().type('Auto{enter}');
|
||||
|
||||
e2e.components.PanelEditor.toggleTableView().click({ force: true });
|
||||
e2e.components.Panels.Visualization.Table.header()
|
||||
@ -33,8 +31,7 @@ describe('Geomap spatial operations', () => {
|
||||
e2e.components.TransformTab.newTransform('Spatial operations').scrollIntoView().should('be.visible').click();
|
||||
e2e.components.Transforms.SpatialOperations.actionLabel().type('Prepare spatial field{enter}');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().should('be.visible');
|
||||
e2e.components.Transforms.SpatialOperations.location.coords.option().check({ force: true });
|
||||
e2e.components.Transforms.SpatialOperations.location.coords.option().should('be.checked');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().type('Coords{enter}');
|
||||
|
||||
e2e.components.Transforms.SpatialOperations.location.coords.latitudeFieldLabel().should('be.visible');
|
||||
e2e.components.Transforms.SpatialOperations.location.coords.latitudeFieldLabel().type('Lat{enter}');
|
||||
@ -57,7 +54,8 @@ describe('Geomap spatial operations', () => {
|
||||
e2e.components.TransformTab.newTransform('Spatial operations').scrollIntoView().should('be.visible').click();
|
||||
e2e.components.Transforms.SpatialOperations.actionLabel().type('Prepare spatial field{enter}');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().should('be.visible');
|
||||
e2e.components.Transforms.SpatialOperations.location.geohash.option().check({ force: true });
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().type('Geohash{enter}');
|
||||
|
||||
e2e.components.Transforms.SpatialOperations.location.geohash
|
||||
.geohashFieldLabel()
|
||||
.should('be.visible')
|
||||
@ -78,8 +76,7 @@ describe('Geomap spatial operations', () => {
|
||||
e2e.components.TransformTab.newTransform('Spatial operations').scrollIntoView().should('be.visible').click();
|
||||
e2e.components.Transforms.SpatialOperations.actionLabel().type('Prepare spatial field{enter}');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().should('be.visible');
|
||||
e2e.components.Transforms.SpatialOperations.location.lookup.option().check({ force: true });
|
||||
e2e.components.Transforms.SpatialOperations.location.lookup.option().should('be.checked');
|
||||
e2e.components.Transforms.SpatialOperations.locationLabel().type('Lookup{enter}');
|
||||
|
||||
e2e.components.Transforms.SpatialOperations.location.lookup.lookupFieldLabel().should('be.visible');
|
||||
e2e.components.Transforms.SpatialOperations.location.lookup.lookupFieldLabel().type('State{enter}');
|
@ -149,6 +149,12 @@ export const Components = {
|
||||
toggleTableView: 'toggle-table-view',
|
||||
|
||||
// [Geomap] Map controls
|
||||
showZoomField: 'Map controls Show zoom control field property editor',
|
||||
showAttributionField: 'Map controls Show attribution field property editor',
|
||||
showScaleField: 'Map controls Show scale field property editor',
|
||||
showMeasureField: 'Map controls Show measure tools field property editor',
|
||||
showDebugField: 'Map controls Show debug field property editor',
|
||||
|
||||
measureButton: 'show measure tools',
|
||||
},
|
||||
PanelInspector: {
|
||||
@ -224,7 +230,7 @@ export const Components = {
|
||||
},
|
||||
SpatialOperations: {
|
||||
actionLabel: 'root Action field property editor',
|
||||
locationLabel: 'root Location field property editor',
|
||||
locationLabel: 'root Location Mode field property editor',
|
||||
location: {
|
||||
autoOption: 'Auto location option',
|
||||
coords: {
|
||||
|
Loading…
Reference in New Issue
Block a user