Skip to content

Commit

Permalink
feat(test): Added a new e2e test for the bounds-example.html
Browse files Browse the repository at this point in the history
  • Loading branch information
tombatossals committed Dec 14, 2013
1 parent d95193c commit 1fa57eb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/e2e/04-custom-parameters-example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
'use strict';

describe('Loading custom-parameters-example.html', function() {

var ptor, driver;
beforeEach(function() {
ptor = protractor.getInstance();
browser.get('/examples/bounds-example.html');
driver = ptor.driver;
});

it('should update the bounds values in the input if clicked the zoom control', function() {
ptor.wait(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");
});
});
});

0 comments on commit 1fa57eb

Please sign in to comment.