From bba7500ab7d3fc96febb8d3181bf2dd14e9dbe12 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 23 Jun 2012 17:00:58 +0200 Subject: [PATCH] Making Popup tests pass. --- demo/map.html | 2 +- test/spec/api/popup.test.js | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/demo/map.html b/demo/map.html index 7cca289999..0374e68fa1 100644 --- a/demo/map.html +++ b/demo/map.html @@ -6,7 +6,7 @@ diff --git a/test/spec/api/popup.test.js b/test/spec/api/popup.test.js index 51c23fd08d..34d510a127 100644 --- a/test/spec/api/popup.test.js +++ b/test/spec/api/popup.test.js @@ -98,7 +98,12 @@ describe("ol.popup", function() { var container = document.createElement('div'); container.setAttribute('id', 'map'); document.documentElement.appendChild(container); - var map = ol.map({renderTo: 'map'}); + var map = ol.map({ + renderTo: 'map', + layers: [ol.layer.osm()], + center: [0, 0], + zoom: 1 + }); var popup = ol.popup({ map: map, anchor: ol.loc([10,20]), @@ -125,7 +130,12 @@ describe("ol.popup", function() { var container = document.createElement('div'); container.setAttribute('id', 'map'); document.documentElement.appendChild(container); - var map = ol.map({renderTo: 'map'}); + var map = ol.map({ + renderTo: 'map', + layers: [ol.layer.osm()], + center: [0, 0], + zoom: 1 + }); var popup = ol.popup({ map: map, anchor: ol.loc([10,20]), @@ -151,7 +161,12 @@ describe("ol.popup", function() { var container = document.createElement('div'); container.setAttribute('id', 'map'); document.documentElement.appendChild(container); - var map = ol.map({renderTo: 'map'}); + var map = ol.map({ + renderTo: 'map', + layers: [ol.layer.osm()], + center: [0, 0], + zoom: 1 + }); var popup = ol.popup({ map: map }); @@ -175,7 +190,12 @@ describe("ol.popup", function() { var container = document.createElement('div'); container.setAttribute('id', 'map'); document.documentElement.appendChild(container); - var map = ol.map({renderTo: 'map'}); + var map = ol.map({ + renderTo: 'map', + layers: [ol.layer.osm()], + center: [0, 0], + zoom: 1 + }); var point = ol.geom.point([21, 4]); var feat = ol.feature().geometry(point).set('name','foo');