You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/04/11 06:38:45 UTC
[14/18] incubator-weex git commit: * [ios] use test-id for macaca
test case
* [ios] use test-id for macaca test case
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/c1442510
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/c1442510
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/c1442510
Branch: refs/heads/0.12-dev
Commit: c1442510634fb723efbce429e08010456a2196d9
Parents: 93987a9
Author: acton393 <zh...@gmail.com>
Authored: Mon Apr 10 14:10:54 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Mon Apr 10 14:14:51 2017 +0800
----------------------------------------------------------------------
test/pages/image-onload.vue | 2 +-
test/scripts/components/image-onload.test.js | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c1442510/test/pages/image-onload.vue
----------------------------------------------------------------------
diff --git a/test/pages/image-onload.vue b/test/pages/image-onload.vue
index 77d6020..cec8a8e 100644
--- a/test/pages/image-onload.vue
+++ b/test/pages/image-onload.vue
@@ -1,7 +1,7 @@
<template>
<div>
<image style="width: 500;height: 500;" src="https://gw.alicdn.com/tps/TB1bEMYKXXXXXaLaXXXXXXXXXXX-360-388.png" @load="onload"></image>
- <text style="font-size:30">{{size}}</text>
+ <text test-id='imgSize' style="font-size:30">{{size}}</text>
</div>
</template>
<script>
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/c1442510/test/scripts/components/image-onload.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/image-onload.test.js b/test/scripts/components/image-onload.test.js
index f2b3410..4233c3f 100644
--- a/test/scripts/components/image-onload.test.js
+++ b/test/scripts/components/image-onload.test.js
@@ -14,7 +14,7 @@ describe('image onload', function () {
before(function () {
return util.init(driver)
.get(util.getPage('/image-onload.js'))
- .waitForElementByXPath('//div/text[1]',util.getGETActionWaitTimeMills(),1000)
+ .waitForElementById('imgSize',util.getGETActionWaitTimeMills(),1000)
});
after(function () {
@@ -25,7 +25,7 @@ describe('image onload', function () {
it('#1 download image', () => {
return driver
.sleep(5000)
- .elementByXPath('//div/text')
+ .elementById('imgSize')
.text()
.then((text)=>{
if(text == '-1,-1') {