Skip to content

Commit 87ce32c

Browse files
committed
[update]新增vt图层图例 review by cxh
1 parent ed59f71 commit 87ce32c

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
var commonTools = require('../base/commonTools');
2+
module.exports = {
3+
after: function (browser) {
4+
console.log('Closing down...');
5+
browser.end();
6+
},
7+
leaflet_01_layersLegend: function (browser) {
8+
var type = 'leaflet';
9+
var exampleName = '01_layersLegend';
10+
commonTools.openExampleAndLoadMap(browser, type, exampleName);
11+
/*check element exist*/
12+
// browser.waitForElementPresent('.leaflet-popup-content', 10000);
13+
/*check the info showing in leaflet-popup is equal to our expectation*/
14+
browser.elements('css selector', '.panel.panel-primary', function (result) {
15+
console.log('----Hope number of panel to be 2, actual is ' + result.value.length);
16+
});
17+
browser.expect.elements('#layersList label').count.to.equal(9);
18+
browser.click('#layersList input');
19+
browser.click('.btn.btn-default');
20+
browser.expect.elements('#mapLegend>div').count.to.equal(4);
21+
browser.expect.element('#mapLegend div:nth-child(1)').text.to.equal('CoordsysLabel@Jingjin');
22+
browser.expect.element('#mapLegend div:nth-child(3)').text.to.equal('Landuse_R@Jingjin#1');
23+
browser.expect
24+
.elements(
25+
'img[src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAa0lEQVR4XmNgoAWYsXz3f0IYXQ9WAFOMC4DkInMbwBhdLwogxiAYwGsY3QyCeQsZo5sBBtgMErETgWN0QLRB6JrR+UQbhA4oNohir8EANkNAgGSDcAGSDaKai6hmEC5AP4PQswE+jG4GxQAAXHqikucMHGcAAAAASUVORK5CYII="]'
26+
)
27+
.count.to.equal(0);
28+
//测试版权点击的正确性
29+
//commonTools.verifyCopyrightOfLeaflet(browser);
30+
// browser.pause(1000);
31+
// browser.end();
32+
}
33+
};

0 commit comments

Comments
 (0)