You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/04/12 08:05:50 UTC
[1/6] incubator-weex git commit: * [test] update elem by id testcase
Repository: incubator-weex
Updated Branches:
refs/heads/0.12-dev c22d8e4b8 -> b92bf6fec
* [test] update elem by id testcase
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/24e8ba07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/24e8ba07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/24e8ba07
Branch: refs/heads/0.12-dev
Commit: 24e8ba07a18fbaa457e45137806fa437f2993ca9
Parents: 2ee570a
Author: sospartan <so...@apache.org>
Authored: Wed Apr 12 15:34:58 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed Apr 12 15:34:58 2017 +0800
----------------------------------------------------------------------
package.json | 2 +-
test/pages/slider-infinite.vue | 11 ++++++++---
test/scripts/components/slider-infinite.test.js | 15 +++++++++------
3 files changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24e8ba07/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 9195bad..b2c4fd4 100644
--- a/package.json
+++ b/package.json
@@ -158,7 +158,7 @@
"weex-components": "^0.2.0",
"weex-loader": "^0.4.0",
"weex-vdom-tester": "^0.2.0",
- "weex-wd": "^1.0.21",
+ "weex-wd": "^1.0.22",
"wwp": "^0.3.5",
"xml2map": "^1.0.2"
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24e8ba07/test/pages/slider-infinite.vue
----------------------------------------------------------------------
diff --git a/test/pages/slider-infinite.vue b/test/pages/slider-infinite.vue
index b65a889..4559a25 100644
--- a/test/pages/slider-infinite.vue
+++ b/test/pages/slider-infinite.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <text>{{d1}}</text>
+ <text test-id="txt1">{{d1}}</text>
<slider auto-play="true" @change="change" style="width: 750px;height: 400px;background-color: blue" interval="500" infinite="false">
<div style="flex: 1;background-color: beige;align-items: center;" v-for="item in items">
<text style="font-size: 60px;">
@@ -10,8 +10,8 @@
<indicator style="height: 20px"></indicator>
</slider>
- <text style="margin-top:60">{{d2}}</text>
- <slider auto-play="true" @change="change2" style="width: 750px;height: 400px;background-color: blue;" interval="500">
+ <text test-id="txt2" style="margin-top:60">{{d2}}</text>
+ <slider :auto-play="is_auto" @change="change2" style="width: 750px;height: 400px;background-color: blue;" interval="500">
<div style="flex: 1;background-color: beige;align-items: center;" v-for="item in items">
<text style="font-size: 60px;">
{{item}}
@@ -30,12 +30,17 @@
d1:0,
d2:0,
items: [],
+ is_auto: true
}
},
created: function () {
for (var index = 0; index < itemCount ; index++) {
this.items[index] = 'Page: ' + index;
}
+ let self = this
+ setTimeout(function(){
+ self.is_auto = false
+ },5000);
},
methods: {
change: function(e){
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/24e8ba07/test/scripts/components/slider-infinite.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/slider-infinite.test.js b/test/scripts/components/slider-infinite.test.js
index 5c96d3a..b3f37a4 100644
--- a/test/scripts/components/slider-infinite.test.js
+++ b/test/scripts/components/slider-infinite.test.js
@@ -14,23 +14,26 @@ describe('slider infinite scroll', function () {
before(function () {
return util.init(driver)
.get(util.getPage('/slider-infinite.js'))
- .waitForElementByXPath('//div/text[1]',util.getGETActionWaitTimeMills(),1000)
+ .waitForElementById('txt1',util.getGETActionWaitTimeMills(),1000)
});
after(function () {
- return util.quit(driver);
+ // return util.quit(driver);
})
it('#1 waiting for auto play', () => {
return driver
.sleep(5000)
- .elementByXPath('//div/text')
+ .elementById('txt1')
.text()
.then((text)=>{
- var parts = text.split("-");
- assert.equal(parts[0], 1);
- assert.equal(parts[2] == 1, false);
+ assert.equal(text, 1);
+ })
+ .elementById('txt2')
+ .text()
+ .then((text)=>{
+ assert.equal(text>2, true);
})
})
});
[6/6] incubator-weex git commit: Merge branch 'android-opaticy' of
github.com:YorkShen/incubator-weex into 0.12-dev This closes #256
Posted by so...@apache.org.
Merge branch 'android-opaticy' of github.com:YorkShen/incubator-weex into 0.12-dev
This closes #256
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/b92bf6fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/b92bf6fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/b92bf6fe
Branch: refs/heads/0.12-dev
Commit: b92bf6fecd5973adb9e28cbe930093352874a23b
Parents: f475d4a 2deccfd
Author: sospartan <so...@apache.org>
Authored: Wed Apr 12 16:05:30 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed Apr 12 16:05:30 2017 +0800
----------------------------------------------------------------------
.../main/java/com/taobao/weex/ui/component/WXComponent.java | 6 ++++--
.../src/test/java/com/taobao/weex/ui/component/WXTextTest.java | 5 ++---
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[2/6] incubator-weex git commit: Merge branch '0.12-dev' of
https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.12-dev
Posted by so...@apache.org.
Merge branch '0.12-dev' of https://git-wip-us.apache.org/repos/asf/incubator-weex into 0.12-dev
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/64b08576
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/64b08576
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/64b08576
Branch: refs/heads/0.12-dev
Commit: 64b08576b6e916dcc8f4c87d5917f8073fc4d38e
Parents: 24e8ba0 c22d8e4
Author: sospartan <so...@apache.org>
Authored: Wed Apr 12 15:35:05 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed Apr 12 15:35:05 2017 +0800
----------------------------------------------------------------------
.../com/taobao/weex/ui/view/IRenderResult.java | 221 ++-----------------
1 file changed, 17 insertions(+), 204 deletions(-)
----------------------------------------------------------------------
[4/6] incubator-weex git commit: * [android] Fix opacity issue
Posted by so...@apache.org.
* [android] Fix opacity issue
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2deccfdb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2deccfdb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2deccfdb
Branch: refs/heads/0.12-dev
Commit: 2deccfdbf761ce932c0c03c76454b532daf04148
Parents: c22d8e4
Author: YorkShen <sh...@gmail.com>
Authored: Wed Apr 12 15:57:03 2017 +0800
Committer: YorkShen <sh...@gmail.com>
Committed: Wed Apr 12 15:57:03 2017 +0800
----------------------------------------------------------------------
.../main/java/com/taobao/weex/ui/component/WXComponent.java | 6 ++++--
.../src/test/java/com/taobao/weex/ui/component/WXTextTest.java | 5 ++---
2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2deccfdb/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index 52cad7c..5aa791a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1059,8 +1059,10 @@ public abstract class WXComponent<T extends View> implements IWXObject, IWXActi
}
public void setOpacity(float opacity) {
- if (opacity >= 0 && opacity <= 1 && mHost.getAlpha() != opacity && isLayerTypeEnabled()) {
- mHost.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ if (opacity >= 0 && opacity <= 1 && mHost.getAlpha() != opacity) {
+ if (isLayerTypeEnabled()) {
+ mHost.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ }
mHost.setAlpha(opacity);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2deccfdb/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java
index 108a2e9..0181457 100644
--- a/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java
+++ b/android/sdk/src/test/java/com/taobao/weex/ui/component/WXTextTest.java
@@ -26,9 +26,8 @@ import com.taobao.weex.dom.TestDomObject;
import com.taobao.weex.dom.WXDomObject;
import com.taobao.weex.dom.WXTextDomObject;
import com.taobao.weex.dom.flex.Spacing;
-
import com.taobao.weex.ui.SimpleComponentHolder;
-import org.apache.tools.ant.taskdefs.EchoXML;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -157,7 +156,7 @@ public class WXTextTest {
prop.put(Constants.Name.OPACITY, 0.8f);
mWXText.updateProperties(prop);
assertTrue(mWXText.getHostView().isEnabled());
- assertTrue(mWXText.getHostView().getAlpha()>=0.799 && mWXText.getHostView().getAlpha()<=0.811);
+ assertEquals(0.8f, mWXText.getHostView().getAlpha(), 0.001f);
prop.put(Constants.Name.DISABLED, "true");
mWXText.updateProperties(prop);
[5/6] incubator-weex git commit: * [test] skip recycler test
Posted by so...@apache.org.
* [test] skip recycler test
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/f475d4ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/f475d4ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/f475d4ae
Branch: refs/heads/0.12-dev
Commit: f475d4ae1a19de1ff55aa18b02e829835407a0c5
Parents: 076d11b
Author: sospartan <so...@apache.org>
Authored: Wed Apr 12 16:04:40 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed Apr 12 16:04:40 2017 +0800
----------------------------------------------------------------------
test/scripts/components/recycler.test.js | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/f475d4ae/test/scripts/components/recycler.test.js
----------------------------------------------------------------------
diff --git a/test/scripts/components/recycler.test.js b/test/scripts/components/recycler.test.js
index f03f08c..c83534d 100644
--- a/test/scripts/components/recycler.test.js
+++ b/test/scripts/components/recycler.test.js
@@ -15,13 +15,11 @@ const isApproximate = (x, y) => {
return Math.abs(x - y) <= (isAndroid ? 2 : 1.5)
}
-describe('recycler', function () {
+describe('recycler @ignore_android', function () {
this.timeout(util.getTimeoutMills())
const driver = util.createDriver(wd)
before(function () {
-
- console.log(util.getPage('/components/recycler.js'))
return util.init(driver)
.get(util.getPage('/components/recycler.js'))
.waitForElementById('waterfall',util.getGETActionWaitTimeMills(),1000)
[3/6] incubator-weex git commit: * [test] fix CI script
Posted by so...@apache.org.
* [test] fix CI script
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/076d11bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/076d11bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/076d11bb
Branch: refs/heads/0.12-dev
Commit: 076d11bbc78f0052b3cd60d21e7af425a96e82dd
Parents: 64b0857
Author: sospartan <so...@apache.org>
Authored: Wed Apr 12 15:54:25 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Wed Apr 12 15:54:25 2017 +0800
----------------------------------------------------------------------
dangerfile.js | 9 +++++++++
test/ci-funcs.sh | 1 +
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/076d11bb/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index b206e6e..35eb696 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -144,8 +144,17 @@ const copyright_header_components = [
'with the License\\. You may obtain a copy of the License at'
];
+//path prefix
+const ignoreCopyrightVerifyPath = [
+ 'test'
+]
codefiles.forEach(filepath => {
+ for(var i=ignoreCopyrightVerifyPath.length-1;i>=0;i--){
+ if(filepath.startsWith(ignoreCopyrightVerifyPath[i])){
+ return
+ }
+ }
const content = fs.readFileSync(filepath).toString();
for (const line of copyright_header_components) {
if (!content.match(new RegExp(line))) {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/076d11bb/test/ci-funcs.sh
----------------------------------------------------------------------
diff --git a/test/ci-funcs.sh b/test/ci-funcs.sh
index c6d0fd6..8db51f6 100644
--- a/test/ci-funcs.sh
+++ b/test/ci-funcs.sh
@@ -98,6 +98,7 @@ function test_cpt {
if [ $target = $target_android ]; then
./test/serve.sh 2&>1 > /dev/null &
+ set -eu
# export ANDROID_HOME=/usr/local/opt/android-sdk
cd android && ./run-ci.sh && cd $TRAVIS_BUILD_DIR
waitForEmulator