Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 1fa57eb

Browse files
committed
feat(test): Added a new e2e test for the bounds-example.html
1 parent d95193c commit 1fa57eb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
3+
describe('Loading custom-parameters-example.html', function() {
4+
5+
var ptor, driver;
6+
beforeEach(function() {
7+
ptor = protractor.getInstance();
8+
browser.get('/examples/bounds-example.html');
9+
driver = ptor.driver;
10+
});
11+
12+
it('should update the bounds values in the input if clicked the zoom control', function() {
13+
ptor.wait(function() {
14+
return ptor.isElementPresent(by.css('img.leaflet-tile-loaded'));
15+
});
16+
17+
element(by.css('img.leaflet-tile-loaded')).click().then(function() {
18+
expect(element(by.model("bounds.southWest.lat")).getAttribute("value")).toBe("39.232253141714885");
19+
expect(element(by.model("bounds.southWest.lng")).getAttribute("value")).toBe("-28.212890625");
20+
expect(element(by.model("bounds.northEast.lat")).getAttribute("value")).toBe("61.18562468142283");
21+
expect(element(by.model("bounds.northEast.lng")).getAttribute("value")).toBe("28.037109375");
22+
});
23+
});
24+
});

0 commit comments

Comments
 (0)