* [test] tc update

Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/01d87727
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/01d87727
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/01d87727

Branch: refs/heads/0.16-dev
Commit: 01d87727e1e39bf6e511af95160935df93ef4528
Parents: fa550bb
Author: gurisxie <279483...@qq.com>
Authored: Thu Aug 10 12:36:09 2017 +0800
Committer: gurisxie <279483...@qq.com>
Committed: Thu Aug 10 12:36:09 2017 +0800

----------------------------------------------------------------------
 test/scripts/modules/picker-event.test.js | 12 +++++++++---
 test/scripts/util.js                      |  3 +++
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/01d87727/test/scripts/modules/picker-event.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/modules/picker-event.test.js 
b/test/scripts/modules/picker-event.test.js
index 9184f9d..9e73fdc 100644
--- a/test/scripts/modules/picker-event.test.js
+++ b/test/scripts/modules/picker-event.test.js
@@ -26,10 +26,16 @@ describe('weex '+goal+' test', function () {
 
   it('#1 '+goal + ' event', () => {
     //TODO :截图比对
-    return driver.waitForElementByName('showPicker', timeout, 2000)
-      .click()
-      .waitForElementByName('Done', timeout, 2000)
+    var self = driver.waitForElementByName('showPicker', timeout, 2000)
+      .click();
+    if(util.isIos()){
+      return self.waitForElementByName('Done', timeout, 2000)
       .click()
       .waitForElementByName('2018-01-01') 
+    }else{
+      return self.waitForElementByName('OK', timeout, 2000)
+      .click()
+      .waitForElementByName('2018-01-1') 
+    }
   })
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/01d87727/test/scripts/util.js
----------------------------------------------------------------------
diff --git a/test/scripts/util.js b/test/scripts/util.js
index 6992429..4b2b3ec 100644
--- a/test/scripts/util.js
+++ b/test/scripts/util.js
@@ -102,6 +102,9 @@ function diffImage(imageAPath, imageB, threshold, 
outputPath) {
 
 
 module.exports = {
+    isIos:function(){
+      return isIOS;
+    },
     getConfig:function(){
         if(browser){
             return androidChromeOpts;

Reply via email to