forked from xkjyeah/vue-google-maps
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(v3): fix all e2e tests accordingly with the new api
- Loading branch information
Showing
28 changed files
with
216 additions
and
136 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
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 |
---|---|---|
@@ -1,6 +1,12 @@ | ||
/* eslint-disable prettier/prettier */ | ||
/* eslint-disable no-useless-escape */ | ||
describe('KmlLayer component', () => { | ||
it('should have a kml icon in the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=kml-layer]').click(); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('.gmv-map-container').should('be.visible'); | ||
cy.get('[src^="https\:\/\/maps\.googleapis\.com\/maps\/vt\?pb\=\!1m5\!1m4\!1i11\!2i329\!3i794\!4i256\!2m15\!1e2\!2skml\%3AcXOw0bjKUSmlnTN2l67v0Sai6WfXhSSWuyNaDD0mAzh6xfi2fYnBo78Y2Eg\!4m2\!1sks\!2sts\%"]').should('exist'); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,52 +1,65 @@ | ||
describe('MarkerIcon component', () => { | ||
it('should add 4 markers on the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 4); | ||
}); | ||
|
||
it('should hide 2 markers from the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('#visibility').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 2); | ||
afterEach(() => { | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
}); | ||
|
||
it('should make visible again the 2 hidden markers on the map', function () { | ||
it('should add 4 markers on the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('#visibility').click(); | ||
cy.get('#visibility').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 4); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 4); | ||
}); | ||
|
||
it('should destroy 2 markers from the map', function () { | ||
it('should hide 2 markers from the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('#visibility2').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 2); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 2); | ||
}); | ||
|
||
it('should re-build the 2 destroyed markers on the map', function () { | ||
it('should make visible again the 2 hidden markers on the map', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('#visibility2').click(); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 2); | ||
cy.get('#visibility2').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 4); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 4); | ||
}); | ||
|
||
it('should empty the markers array from the map removing 2 of the 4 markers', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('#empty').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 2); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 2); | ||
}); | ||
|
||
it('should fill the markers array from the map adding the 2 removed markers', function () { | ||
cy.visit('/'); | ||
cy.get('button[name=marker]').click(); | ||
cy.get('.gmv-map').should('be.visible'); | ||
cy.get('.gm-style').should('be.visible'); | ||
cy.get('#empty').click(); | ||
cy.get('#empty').click(); | ||
cy.get('.gmv-map').find('map').should('have.length', 4); | ||
cy.get('.gmv-map') | ||
.find('[class="GMAMP-maps-pin-view"]') | ||
.should('have.length', 4); | ||
}); | ||
}); |
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.