Skip to content

Commit

Permalink
more build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 1, 2016
1 parent f6f300e commit e72015e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
20 changes: 19 additions & 1 deletion lib/commands/touchAction.js
Expand Up @@ -11,9 +11,12 @@
* - wait (pass ms (as milliseconds))
* - release (no arguments)
*
* If you use the touchAction command with a selector you don't need to pass the selector to each
* action. It will be propagated by the internally (if no x or y parameters are given).
*
* <example>
:touchAction.js
it('should do a touch action', function () {
it('should do a touch gesture', function () {
var screen = browser.element('//UITextbox');
// simple touch action on element
Expand All @@ -26,6 +29,12 @@
actions: 'tap', x: 300, y:200
})
// simple touch action using selector and x y variables
// tap location is 30px right and 20px down relative from the center of the element
browser.touchAction({
actions: 'tap', x: 30, y:20, selector: '//UIAApplication[1]/UIAElement[2]'
})
// multi action on an element (drag&drop)
screen.touchAction([
'press',
Expand All @@ -46,6 +55,15 @@
'release'
]))
});
:multiTouchAction.js
it('should do a multitouch gesture', function () {
// drag&drop with two fingers 200px down
browser.touchAction([
[{action: 'press', x: 10, y: 10}, { action: 'moveTo', x: 0, y: 200 }, 'release'],
[{action: 'press', x: 100, y: 10}, { action: 'moveTo', x: 0, y: 200 }, 'release']]
])
})
* </example>
*
* @param {String} selector selector to execute the touchAction on
Expand Down
2 changes: 1 addition & 1 deletion test/spec/desktop/close.js
Expand Up @@ -19,7 +19,7 @@ describe('close', () => {
(await this.client.getTabIds()).should.have.length(2)

// close window
await this.client.close().pause(1000);
await this.client.close().pause(2000);
(await this.client.getTabIds()).should.have.length(1);

// test if there is only one tab open
Expand Down
4 changes: 2 additions & 2 deletions test/spec/functional/chaiPromises.js
Expand Up @@ -10,13 +10,13 @@ describe('chai-as-promised', () => {
})

it('should handle a single promise', function () {
return this.client.getTitle().should.eventually.equal('WebdriverJS Testpage')
return this.client.getTitle().should.eventually.equal('WebdriverIO Testpage')
})

it('should allow chaining of further promises', function () {
return this.client
.isVisible('body').should.eventually.be.true
.getTitle().should.eventually.equal('WebdriverJS Testpage')
.getTitle().should.eventually.equal('WebdriverIO Testpage')
})

it('should handle failed assertions', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/mobile/context.js
Expand Up @@ -23,6 +23,6 @@ describe('context', () => {

it('should be able to switch to native context', async function () {
await this.client.context(labels.NATIVE_APP_CONTEXT);
(await this.client.context()).value.should.contain(labels.WEBVIEW_CONTEXT)
(await this.client.context()).value.should.contain(labels.NATIVE_APP_CONTEXT)
})
})
File renamed without changes.

0 comments on commit e72015e

Please sign in to comment.