Skip to content

Commit d89d6a0

Browse files
修改leaflet部分VT版权标志点击方式
1 parent 0bee6ad commit d89d6a0

File tree

7 files changed

+9
-6
lines changed

7 files changed

+9
-6
lines changed

examples-test/base/commonTools.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ var commonTools = ({
195195
/*leaflet: verify correctness of copyright*/
196196
verifyCopyrightOfLeaflet: function (browser) {
197197
//iClient logo
198-
browser.click('.iclient-leaflet-logo.leaflet-control a');
198+
browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
199199
browser.pause(1000);
200200
browser.windowHandles(function (result) {
201201
browser.switchWindow(result.value[1]);
@@ -221,6 +221,7 @@ var commonTools = ({
221221
browser.switchWindow(result.value[1]);
222222
browser.assert.urlEquals('http://iclient.supermapol.com/');
223223
browser.closeWindow();
224+
browser.switchWindow(result.value[0]);
224225
});
225226
}
226227

examples-test/leaflet/06_trafficTransferAnalystServiceIT.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ module.exports = {
4343
browser.assert.equal(result.value.length, 3, "expect Number of marker after click '抚松路' in '方案2' to be 3, actual is " + result.value.length);
4444
});
4545
});
46+
browser.pause(1000);
4647
//测试版权点击的正确性
4748
commonTools.verifyCopyrightOfLeaflet(browser);
4849
browser.pause(1000);

examples-test/leaflet/WMSLayerIT.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
commonTools.cmpTestTileWithStdTile(browser, type, exampleName, 0, 0, 256, 256);
1010
//测试版权点击的正确性
1111
commonTools.verifyCopyrightOfLeaflet(browser);
12-
browser(1000);
12+
browser.pause(1000);
1313
browser.end();
1414
}
1515
};

examples-test/leaflet/baiduLayerIT.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
commonTools.cmpTestTileWithStdTile(browser, type, exampleName, 0, 0, 128, 128);
1010
//验证版权跳转正确性
1111
//iClient logo
12-
browser.click('.iclient-leaflet-logo.leaflet-control a');
12+
browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
1313
browser.pause(1000);
1414
browser.windowHandles(function (result) {
1515
browser.switchWindow(result.value[1]);

examples-test/leaflet/iPortalWebmapIT.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
});
2828
//验证版权跳转正确性
2929
//iClient logo
30-
browser.click('.iclient-leaflet-logo.leaflet-control a');
30+
browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
3131
browser.pause(1000);
3232
browser.windowHandles(function (result) {
3333
browser.switchWindow(result.value[1]);

examples-test/leaflet/tiandituLayer_llIT.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
commonTools.cmpTestTileWithStdTile(browser, type, exampleName, 0, 0, 128, 128);
1010
//验证版权跳转正确性
1111
//iClient logo
12-
browser.click('.iclient-leaflet-logo.leaflet-control a');
12+
browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
1313
browser.pause(1000);
1414
browser.windowHandles(function (result) {
1515
browser.switchWindow(result.value[1]);

examples-test/leaflet/tiandituLayer_mercatorIT.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
commonTools.cmpTestTileWithStdTile(browser, type, exampleName, 0, 0, 128, 128);
1010
//验证版权跳转正确性
1111
//iClient logo
12-
browser.click('.iclient-leaflet-logo.leaflet-control a');
12+
browser.useXpath().click('//*[@id="map"]/div[2]/div[4]/div[1]/a');
1313
browser.pause(1000);
1414
browser.windowHandles(function (result) {
1515
browser.switchWindow(result.value[1]);
@@ -35,6 +35,7 @@ module.exports = {
3535
browser.switchWindow(result.value[1]);
3636
browser.assert.urlEquals('http://iclient.supermapol.com/');
3737
browser.closeWindow();
38+
browser.switchWindow(result.value[0]);
3839
});
3940
browser.pause(1000);
4041
browser.end();

0 commit comments

Comments
 (0)