-
Notifications
You must be signed in to change notification settings - Fork 424
/
layergroup.spec.js
37 lines (29 loc) · 980 Bytes
/
layergroup.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
describe('Edit LayerGroup', () => {
// const mapSelector = '#map';
it('correctly enables geojson featureCollection', () => {
cy.drawShape('FeatureCollectionWithCircles');
cy.toolbarButton('edit').click();
cy.hasVertexMarkers(21);
cy.toolbarButton('edit').click();
cy.hasVertexMarkers(0);
});
it('enables all layers of layerGroup', () => {
cy.drawShape('FeatureCollectionWithCircles');
cy.get('@featurecol').then(feature => {
feature.pm.enable();
});
cy.hasVertexMarkers(21);
cy.get('@featurecol').then(feature => {
feature.pm.disable();
});
cy.hasVertexMarkers(0);
cy.get('@featurecol').then(feature => {
feature.pm.toggleEdit();
});
cy.hasVertexMarkers(21);
cy.get('@featurecol').then(feature => {
feature.pm.toggleEdit();
});
cy.hasVertexMarkers(0);
});
});