Skip to content

Commit

Permalink
feat(test): Completed e2e tests for the bounds example.
Browse files Browse the repository at this point in the history
  • Loading branch information
tombatossals committed Dec 19, 2013
1 parent b6c178e commit 1c40d60
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/e2e/03-bounds-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ describe('Loading bounds-example.html', function() {
return ptor.isElementPresent(by.css('img.leaflet-tile-loaded'));
});

element(by.css('img.leaflet-tile-loaded')).click().then(function() {
expect(element(by.model("bounds.southWest.lat")).getAttribute("value")).toBe("39.232253141714885");
expect(element(by.model("bounds.southWest.lng")).getAttribute("value")).toBe("-28.212890625");
expect(element(by.model("bounds.northEast.lat")).getAttribute("value")).toBe("61.18562468142283");
expect(element(by.model("bounds.northEast.lng")).getAttribute("value")).toBe("28.037109375");
expect(element(by.model("bounds.southWest.lat")).getAttribute("value")).toBe("39.232253141714885");
expect(element(by.model("bounds.southWest.lng")).getAttribute("value")).toBe("-28.212890625");
expect(element(by.model("bounds.northEast.lat")).getAttribute("value")).toBe("61.18562468142283");
expect(element(by.model("bounds.northEast.lng")).getAttribute("value")).toBe("28.037109375");

element(by.xpath('.//*[@title="Zoom in"]')).click().then(function(el) {
ptor.sleep(400);
expect(element(by.model("bounds.southWest.lat")).getAttribute("value")).toBe("45.706179285330855");
expect(element(by.model("bounds.southWest.lng")).getAttribute("value")).toBe("-14.150390625");
expect(element(by.model("bounds.northEast.lat")).getAttribute("value")).toBe("56.65622649350222");
expect(element(by.model("bounds.northEast.lng")).getAttribute("value")).toBe("13.974609375");
});

});
});

0 comments on commit 1c40d60

Please sign in to comment.