11var commonTools = require ( '../base/commonTools' ) ;
22module . exports = {
3- 'leaflet_iPortalWebmap' : function ( browser ) {
4- var type = 'leaflet' ;
5- var exampleName = 'iPortalWebmap' ;
6- commonTools . openExampleAndLoadMap ( browser , type , exampleName ) ;
7- /*check elements exist*/
8- browser . waitForElementPresent ( '.leaflet-layer' , 10000 ) ;
9- browser . waitForElementPresent ( '.leaflet-tile-container.leaflet-zoom-animated' , 10000 ) ;
10- browser . waitForElementPresent ( '.leaflet-tile-container.leaflet-zoom-animated img' , 10000 ) ;
11- browser . waitForElementPresent ( '.leaflet-pane.leaflet-marker-pane' , 10000 ) ;
12- browser . waitForElementPresent ( '.leaflet-pane.leaflet-marker-pane img' , 10000 ) ;
13- browser . pause ( 1000 ) ;
14- browser . elements ( 'class name' , 'leaflet-layer' , function ( result ) {
15- this . assert . equal ( result . value . length , 2 , "expect Number of leaflet-layer to be 2, actual is " + result . value . length ) ;
16- } ) ;
17- //1.3.1版本会多生成一个空的 leaflet-tile-container 待确认问题
18- // browser.elements('class name', 'leaflet-tile-container', function (result) {
19- // this.assert.equal(result.value.length, 2, "expect Number of leaflet-tile-container to be 2, actual is " + result.value.length);
20- // });
21- browser . elements ( 'class name' , 'leaflet-marker-icon' , function ( result ) {
22- this . assert . ok ( result . value . length > 0 , "expect Number of marker to be greater than 0, actual is " + result . value . length ) ;
23- } ) ;
24- browser . useXpath ( ) . click ( '//*[@id="map"]/div[1]/div[4]/img[22]' , function ( ) {
25- this . waitForElementPresent ( '//*[@id="map"]/div[1]/div[6]/div/div[1]/div' , 10000 ) ;
26- var popupInfo = '届' ;
27- browser . expect . element ( '//*[@id="map"]/div[1]/div[6]/div/div[1]/div' ) . text . to . be . contain ( popupInfo ) ;
28- } ) ;
29- ////验证版权跳转正确性
30- ////iClient logo
31- //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
32- //browser.pause(1000);
33- //browser.windowHandles(function (result) {
34- // browser.switchWindow(result.value[1]);
35- // browser.assert.urlEquals('http://iclient.supermap.io/');
36- // browser.closeWindow();
37- // browser.switchWindow(result.value[0]);
38- // browser.pause(1000);
39- //});
40- ////天地图
41- //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[2]/a[2]');
42- //browser.pause(1000);
43- //browser.windowHandles(function (result) {
44- // browser.switchWindow(result.value[1]);
45- // browser.assert.urlEquals('http://www.tianditu.com/');
46- // browser.closeWindow();
47- // browser.switchWindow(result.value[0]);
48- // browser.pause(1000);
49- //});
50- ////SuperMap iClient
51- //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[2]/span/a');
52- //browser.pause(1000);
53- //browser.windowHandles(function (result) {
54- // browser.switchWindow(result.value[1]);
55- // browser.assert.urlEquals('http://iclient.supermap.io/');
56- // browser.closeWindow();
57- //});
58- browser . pause ( 1000 ) ;
59- browser . end ( ) ;
60- }
3+ // 'leaflet_iPortalWebmap': function (browser) {
4+ // var type = 'leaflet';
5+ // var exampleName = 'iPortalWebmap';
6+ // commonTools.openExampleAndLoadMap(browser, type, exampleName);
7+ // /*check elements exist*/
8+ // browser.waitForElementPresent('.leaflet-layer', 10000);
9+ // browser.waitForElementPresent('.leaflet-tile-container.leaflet-zoom-animated', 10000);
10+ // browser.waitForElementPresent('.leaflet-tile-container.leaflet-zoom-animated img', 10000);
11+ // browser.waitForElementPresent('.leaflet-pane.leaflet-marker-pane', 10000);
12+ // browser.waitForElementPresent('.leaflet-pane.leaflet-marker-pane img', 10000);
13+ // browser.pause(1000);
14+ // browser.elements('class name', 'leaflet-layer', function (result) {
15+ // this.assert.equal(result.value.length, 2, "expect Number of leaflet-layer to be 2, actual is " + result.value.length);
16+ // });
17+ // //1.3.1版本会多生成一个空的 leaflet-tile-container 待确认问题
18+ // // browser.elements('class name', 'leaflet-tile-container', function (result) {
19+ // // this.assert.equal(result.value.length, 2, "expect Number of leaflet-tile-container to be 2, actual is " + result.value.length);
20+ // // });
21+ // browser.elements('class name', 'leaflet-marker-icon', function (result) {
22+ // this.assert.ok(result.value.length > 0, "expect Number of marker to be greater than 0, actual is " + result.value.length);
23+ // });
24+ // browser.useXpath().click('//*[@id="map"]/div[1]/div[4]/img[22]', function () {
25+ // this.waitForElementPresent('//*[@id="map"]/div[1]/div[6]/div/div[1]/div', 10000);
26+ // var popupInfo = '届';
27+ // browser.expect.element('//*[@id="map"]/div[1]/div[6]/div/div[1]/div').text.to.be.contain(popupInfo);
28+ // });
29+ // ////验证版权跳转正确性
30+ // ////iClient logo
31+ // //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
32+ // //browser.pause(1000);
33+ // //browser.windowHandles(function (result) {
34+ // // browser.switchWindow(result.value[1]);
35+ // // browser.assert.urlEquals('http://iclient.supermap.io/');
36+ // // browser.closeWindow();
37+ // // browser.switchWindow(result.value[0]);
38+ // // browser.pause(1000);
39+ // // });
40+ // ////天地图
41+ // //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[2]/a[2]');
42+ // //browser.pause(1000);
43+ // //browser.windowHandles(function (result) {
44+ // // browser.switchWindow(result.value[1]);
45+ // // browser.assert.urlEquals('http://www.tianditu.com/');
46+ // // browser.closeWindow();
47+ // // browser.switchWindow(result.value[0]);
48+ // // browser.pause(1000);
49+ // // });
50+ // ////SuperMap iClient
51+ // //browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[2]/span/a');
52+ // //browser.pause(1000);
53+ // //browser.windowHandles(function (result) {
54+ // // browser.switchWindow(result.value[1]);
55+ // // browser.assert.urlEquals('http://iclient.supermap.io/');
56+ // // browser.closeWindow();
57+ // // });
58+ // browser.pause(1000);
59+ // browser.end();
60+ // }
6161} ;
0 commit comments