mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
more tests
This commit is contained in:
parent
9bf4371915
commit
c24636313c
@ -90,5 +90,6 @@
|
||||
|
||||
<body>
|
||||
<div id="map" style="position: absolute; bottom: 0; right: 0; height:200px; width: 200px;"></div>
|
||||
<img src="" alt="" id="fakeTile" style="display:none;">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -132,4 +132,21 @@ describe("offline enabler library", function()
|
||||
});
|
||||
});
|
||||
|
||||
async.it("returns placeholder urls when offline", function(done)
|
||||
{
|
||||
require(["dojo/dom"], function(dom)
|
||||
{
|
||||
var fakeTile = dom.byId('fakeTile');
|
||||
|
||||
g_basemapLayer.goOnline();
|
||||
var onlineUrl = g_basemapLayer.getTileUrl(14,6178,8023);
|
||||
expect(onlineUrl).toEqual('http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/14/6178/8023');
|
||||
|
||||
g_basemapLayer.goOffline();
|
||||
var offlineUrl = fakeTile.src = g_basemapLayer.getTileUrl(14,6178,8023);
|
||||
expect(offlineUrl).toEqual('void:14-6178-8023');
|
||||
done();
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user