2023-09-08 10:51:59 -05:00
|
|
|
import { e2e } from '../utils';
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
const DASHBOARD_ID = 'P2jR04WVk';
|
|
|
|
|
|
|
|
const MAP_LAYERS_TYPE = 'Map layers Layer type';
|
|
|
|
const MAP_LAYERS_DATA = 'Map layers Data';
|
|
|
|
const MAP_LAYERS_GEOJSON = 'Map layers GeoJSON URL';
|
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
describe('Geomap layer types', () => {
|
|
|
|
beforeEach(() => {
|
2023-09-27 05:33:00 -05:00
|
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Tests changing the layer type', () => {
|
2022-09-07 13:29:03 -05:00
|
|
|
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { editPanel: 1 } });
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).should('be.visible');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('markers');
|
|
|
|
|
|
|
|
// Heatmap
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Heatmap{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('heatmap');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('be.visible');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
// GeoJSON
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('GeoJSON{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('geojson');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('not.exist');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_GEOJSON).should('be.visible');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
// Open Street Map
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Open Street Map{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('osm-standard');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('not.exist');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_GEOJSON).should('not.exist');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
// CARTO basemap
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('CARTO basemap{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('carto');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Show labels').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Theme').should('be.visible');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
// ArcGIS MapServer
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('ArcGIS MapServer{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('esri-xyz');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Server instance').should('be.visible');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2022-09-07 13:29:03 -05:00
|
|
|
|
|
|
|
// XYZ Tile layer
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('XYZ Tile layer{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('xyz');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers URL template').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Attribution').should('be.visible');
|
2024-09-30 04:49:02 -05:00
|
|
|
// e2e.components.PanelEditor.General.content().should('be.visible');
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2022-09-07 13:29:03 -05:00
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
it.skip('Tests changing the layer type (alpha)', () => {
|
2022-09-07 13:29:03 -05:00
|
|
|
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { editPanel: 1 } });
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).should('be.visible');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('markers');
|
|
|
|
|
|
|
|
// Icon at last point (Alpha)
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Icon at last point{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('last-point-tracker');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('be.visible');
|
|
|
|
e2e.components.PanelEditor.General.content().should('be.visible');
|
|
|
|
|
|
|
|
// Dynamic GeoJSON (Alpha)
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Dynamic GeoJSON{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('dynamic-geojson');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_GEOJSON).should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers ID Field').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.General.content().should('be.visible');
|
|
|
|
|
|
|
|
// Night / Day (Alpha)
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Night / Day{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('dayNight');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Show').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Night region color').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Display sun').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.General.content().should('be.visible');
|
|
|
|
|
|
|
|
// Route (Alpha)
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_TYPE).type('Route{enter}');
|
|
|
|
cy.get('[data-testid="layer-drag-drop-list"]').contains('route');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel(MAP_LAYERS_DATA).should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Location').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Style').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.OptionsPane.fieldLabel('Map layers Line width').should('be.visible');
|
|
|
|
e2e.components.PanelEditor.General.content().should('be.visible');
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2022-09-07 13:29:03 -05:00
|
|
|
});
|