You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by sospartan <gi...@git.apache.org> on 2017/04/08 13:55:18 UTC

[GitHub] incubator-weex pull request #143: * [android] slider improvement

Github user sospartan commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/143#discussion_r107616417
  
    --- Diff: test/scripts/components/slider-infinite.test.js ---
    @@ -0,0 +1,38 @@
    +'use strict';
    +
    +var _ = require('macaca-utils');
    +var assert = require('chai').assert
    +var wd = require('weex-wd')
    +var path = require('path');
    +var os = require('os');
    +var util = require("../util.js");
    +
    +describe('slider infinite scroll', function () {
    +  this.timeout(util.getTimeoutMills());
    +  var driver = util.createDriver(wd);
    +
    +  before(function () {
    +    return util.init(driver)
    +      .get('wxpage://' + util.getDeviceHost() +'/slider-infinite.js')
    +      .waitForElementByXPath('//div/text[1]',util.getGETActionWaitTimeMills(),1000)
    +  });
    +
    +  after(function () {
    +      return util.quit(driver);
    +  })
    +
    +
    +  it('#1 waiting for auto play', () => {
    +    return driver
    +    .sleep(5000)
    +    .elementByXPath('//div/text')
    +    .text()
    +    .then((text)=>{
    +        var parts = text.split("-");
    +        assert.equal(parts[0], 1);
    +        assert.equal(parts[2] == 1, false);
    --- End diff --
    
    There is a [assert API](http://chaijs.com/api/assert/) 'notEqual' too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---