Skip to content

Commit

Permalink
fix cypress errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nstjean committed Feb 24, 2020
1 parent 1b9b3a4 commit 32aa273
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cypress/integration/eonetFiresLayer.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('Eonet fires layer', function() {
it('adds markers on click', function() {
cy.openWindow('/example/index.html#lat=43.00&lon=-83.00&zoom=3&layers=Standard')
cy.openWindow('/example/index.html#lat=43.00&lon=-80.00&zoom=4&layers=Standard')
cy.wait(200)
cy.window().then((win) => {
cy.fixture('eonetFiresLayer').then((data) => {
Expand All @@ -15,7 +15,7 @@ describe('Eonet fires layer', function() {
})

it('should have the layer name added to the hash', function() {
cy.hash().should('eq', '#lat=43.00&lon=-82.97&zoom=3&layers=Standard,eonetFiresLayer')
cy.hash().should('eq', '#lat=43.00&lon=-80.00&zoom=4&layers=Standard,eonetFiresLayer')
})

it('has default markers in default mode', function() {
Expand All @@ -39,7 +39,7 @@ describe('Eonet fires layer', function() {

it('removes markers from the map and the layer name from the hash when clicked again', function() {
cy.get('#menu-eonetFiresLayer label').click({ force: true })
cy.hash().should('eq', '#lat=43.00&lon=-82.97&zoom=3&layers=Standard')
cy.hash().should('eq', '#lat=43.00&lon=-80.00&zoom=4&layers=Standard')
cy.get('.leaflet-marker-pane').children().should('have.length', 0)
cy.get('.leaflet-overlay-pane svg g').children().should('have.length', 0)
})
Expand Down
11 changes: 10 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<!-- Required for setting hash:true -->
<script src="../lib/leaflet-fullUrlHash.js"></script>

<!-- Required for search control -->
<script src="../node_modules/leaflet-google-places-autocomplete/src/js/leaflet-gplaces-autocomplete.js"></script>
<link rel="stylesheet" href="../node_modules/leaflet-google-places-autocomplete/src/css/leaflet-gplaces-autocomplete.css">
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAOLUQngEmJv0_zcG1xkGq-CXIPpLQY8iQ&libraries=places"></script>

<!-- Required for purpleLayer -->
<script src="../node_modules/heatmap.js/build/heatmap.min.js"></script> -->
<script src="../node_modules/leaflet-heatmap/leaflet-heatmap.js"></script>
Expand All @@ -37,6 +42,9 @@
<script src="https://unpkg.com/esri-leaflet@2.2.3/dist/esri-leaflet.js"></script>
<script src="https://unpkg.com/esri-leaflet-renderers@2.0.6"></script>

<!-- Required for windRose Layer -->
<script src="../src/windRoseLayer.js"></script>

<!-- Required for Unearthing Layer -->
<script src="../lib/glify.js"></script>

Expand All @@ -51,4 +59,5 @@
<script src="./layers.js"></script>

</body>
</html>
</html>

3 changes: 2 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"port": 8080,
"include": [
"./node_modules/cypress",
"cypress/**/*.js"
]
}
}

0 comments on commit 32aa273

Please sign in to comment.