Missing requires in tests

This commit is contained in:
Tim Schaub
2016-08-11 22:49:08 -06:00
parent 85d4fb6ac4
commit 5643d3ec77
4 changed files with 24 additions and 29 deletions
+20 -28
View File
@@ -300,13 +300,14 @@ describe('ol.format.WFS', function() {
' </ogc:Or>' + ' </ogc:Or>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.or(f.equalTo('name', 'New York'), f.equalTo('area', 1234)) filter: ol.format.ogc.filter.or(
ol.format.ogc.filter.equalTo('name', 'New York'),
ol.format.ogc.filter.equalTo('area', 1234))
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -341,20 +342,19 @@ describe('ol.format.WFS', function() {
' </ogc:Or>' + ' </ogc:Or>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.or( filter: ol.format.ogc.filter.or(
f.and( ol.format.ogc.filter.and(
f.greaterThan('area', 100), ol.format.ogc.filter.greaterThan('area', 100),
f.greaterThanOrEqualTo('pop', 20000) ol.format.ogc.filter.greaterThanOrEqualTo('pop', 20000)
), ),
f.and( ol.format.ogc.filter.and(
f.lessThan('area', 100), ol.format.ogc.filter.lessThan('area', 100),
f.lessThanOrEqualTo('pop', 20000) ol.format.ogc.filter.lessThanOrEqualTo('pop', 20000)
) )
) )
}); });
@@ -374,13 +374,12 @@ describe('ol.format.WFS', function() {
' </ogc:PropertyIsBetween>' + ' </ogc:PropertyIsBetween>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.between('area', 100, 1000) filter: ol.format.ogc.filter.between('area', 100, 1000)
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -396,13 +395,12 @@ describe('ol.format.WFS', function() {
' </ogc:PropertyIsNull>' + ' </ogc:PropertyIsNull>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.isNull('area') filter: ol.format.ogc.filter.isNull('area')
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -419,13 +417,12 @@ describe('ol.format.WFS', function() {
' </ogc:PropertyIsLike>' + ' </ogc:PropertyIsLike>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.like('name', 'New*') filter: ol.format.ogc.filter.like('name', 'New*')
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -442,13 +439,12 @@ describe('ol.format.WFS', function() {
' </ogc:PropertyIsLike>' + ' </ogc:PropertyIsLike>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.like('name', 'New*', '*', '.', '!', false) filter: ol.format.ogc.filter.like('name', 'New*', '*', '.', '!', false)
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -467,13 +463,12 @@ describe('ol.format.WFS', function() {
' </ogc:Not>' + ' </ogc:Not>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.not(f.equalTo('name', 'New York')) filter: ol.format.ogc.filter.not(ol.format.ogc.filter.equalTo('name', 'New York'))
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
}); });
@@ -500,15 +495,14 @@ describe('ol.format.WFS', function() {
' </ogc:And>' + ' </ogc:And>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'urn:ogc:def:crs:EPSG::4326', srsName: 'urn:ogc:def:crs:EPSG::4326',
featureNS: 'http://www.openplans.org/topp', featureNS: 'http://www.openplans.org/topp',
featurePrefix: 'topp', featurePrefix: 'topp',
featureTypes: ['states'], featureTypes: ['states'],
filter: f.and( filter: ol.format.ogc.filter.and(
f.equalTo('name', 'New York'), ol.format.ogc.filter.equalTo('name', 'New York'),
f.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326') ol.format.ogc.filter.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326')
) )
}); });
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text)); expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -534,11 +528,10 @@ describe('ol.format.WFS', function() {
' </ogc:Intersects>' + ' </ogc:Intersects>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'EPSG:4326', srsName: 'EPSG:4326',
featureTypes: ['area'], featureTypes: ['area'],
filter: f.intersects( filter: ol.format.ogc.filter.intersects(
'the_geom', 'the_geom',
new ol.geom.Polygon([[ new ol.geom.Polygon([[
[10, 20], [10, 20],
@@ -572,11 +565,10 @@ describe('ol.format.WFS', function() {
' </ogc:Within>' + ' </ogc:Within>' +
' </ogc:Filter>' + ' </ogc:Filter>' +
'</wfs:Query>'; '</wfs:Query>';
var f = ol.format.ogc.filter;
var serialized = new ol.format.WFS().writeGetFeature({ var serialized = new ol.format.WFS().writeGetFeature({
srsName: 'EPSG:4326', srsName: 'EPSG:4326',
featureTypes: ['area'], featureTypes: ['area'],
filter: f.within( filter: ol.format.ogc.filter.within(
'the_geom', 'the_geom',
new ol.geom.Polygon([[ new ol.geom.Polygon([[
[10, 20], [10, 20],
+1
View File
@@ -1,5 +1,6 @@
goog.provide('ol.test.geom.flat.transform'); goog.provide('ol.test.geom.flat.transform');
goog.require('ol.geom');
goog.require('ol.geom.MultiPolygon'); goog.require('ol.geom.MultiPolygon');
goog.require('ol.geom.flat.transform'); goog.require('ol.geom.flat.transform');
+2 -1
View File
@@ -3,11 +3,12 @@ goog.provide('ol.test.interaction.Select');
goog.require('ol.Collection'); goog.require('ol.Collection');
goog.require('ol.Feature'); goog.require('ol.Feature');
goog.require('ol.Map'); goog.require('ol.Map');
goog.require('ol.MapBrowserEvent');
goog.require('ol.MapBrowserPointerEvent'); goog.require('ol.MapBrowserPointerEvent');
goog.require('ol.View'); goog.require('ol.View');
goog.require('ol.geom.Polygon'); goog.require('ol.geom.Polygon');
goog.require('ol.interaction.Select');
goog.require('ol.interaction.Interaction'); goog.require('ol.interaction.Interaction');
goog.require('ol.interaction.Select');
goog.require('ol.layer.Vector'); goog.require('ol.layer.Vector');
goog.require('ol.pointer.PointerEvent'); goog.require('ol.pointer.PointerEvent');
goog.require('ol.source.Vector'); goog.require('ol.source.Vector');
+1
View File
@@ -1,5 +1,6 @@
goog.provide('ol.test.source.TileSource'); goog.provide('ol.test.source.TileSource');
goog.require('ol');
goog.require('ol.Tile'); goog.require('ol.Tile');
goog.require('ol.TileRange'); goog.require('ol.TileRange');
goog.require('ol.proj'); goog.require('ol.proj');