Skip to content

Commit

Permalink
remove tests, they are supposed to fail now.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickarlt committed Jun 1, 2015
1 parent 30a2369 commit 2ba8e22
Showing 1 changed file with 0 additions and 80 deletions.
80 changes: 0 additions & 80 deletions spec/Layers/FeatureLayer/FeatureLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,86 +409,6 @@ describe('L.esri.Layers.FeatureLayer', function () {
expect(layer.getFeature(3).options.color).to.equal('red');
});

it('should update L.CircleMarker symbology if a relevant attribute is updated', function(){
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
timeField: 'time',
pointToLayer: function(feature, latlng){
if (feature.properties.type === 'good') {
return L.circleMarker(latlng, {
color: 'purple'
});
}
else if (feature.properties.type === 'bad') {
return L.circleMarker(latlng, {
color: 'yellow'
});
}
else
return L.circleMarker(latlng, {
color: 'black'
});
}
}).addTo(map);

layer.createLayers(pointFeatures);

expect(layer.getFeature(1).options.color).to.equal('purple');
expect(layer.getFeature(2).options.color).to.equal('yellow');

var updatedFeature = {
type: 'Feature',
id: 1,
geometry: {
type: 'Point',
coordinates: [-122, 45]
},
properties: {
time: new Date('January 1 2014').valueOf(),
type: 'bad'
}
}
var bogusCoords = "2:6";
layer._addFeatures([updatedFeature], bogusCoords);
expect(layer.getFeature(1).options.color).to.equal('yellow');
});

it('should update polyline symbology if a relevant attribute is updated', function(){
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
timeField: 'time',
style: function(feature){
if (feature.properties.type === 'good') {
return { color: 'purple' };
}
else if (feature.properties.type === 'bad') {
return { color: 'yellow' };
}
else
return { color: 'black' };
}
}).addTo(map);

layer.createLayers(features);

expect(layer.getFeature(1).options.color).to.equal('purple');
expect(layer.getFeature(2).options.color).to.equal('yellow');

var updatedFeature = {
type: 'Feature',
id: 1,
geometry: {
type: 'LineString',
coordinates: [[-122, 45], [-121, 40]]
},
properties: {
time: new Date('January 1 2014').valueOf(),
type: 'the worst'
}
}
var bogusCoords = "2:6";
layer._addFeatures([updatedFeature], bogusCoords);
expect(layer.getFeature(1).options.color).to.equal('black');
});

it('should propagate events from individual features', function(){
var spy = sinon.spy();
layer.on('click', spy);
Expand Down

0 comments on commit 2ba8e22

Please sign in to comment.