mirror of
https://github.com/appium/appium.git
synced 2026-02-09 11:18:51 -06:00
Merge pull request #2643 from Jonahss/master
stabilized android webview tests
This commit is contained in:
@@ -4,6 +4,4 @@ var androidWebviewTests = require('../common/android-webview-base');
|
||||
|
||||
// TODO: androidWebviewTests is using an app built by selendroid. Need to build it once
|
||||
// and save it into asset so that it can be used by android tests
|
||||
// TODO: when I run it on android I don't see the WEBVIEW context, this needs
|
||||
// to be investigated
|
||||
describe('android - web_view @skip-ci @skip-android-all', androidWebviewTests);
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
"use strict";
|
||||
|
||||
var env = require('../../helpers/env')
|
||||
, setup = require("./setup-base");
|
||||
, setup = require("./setup-base")
|
||||
, Asserter = require('wd').Asserter;
|
||||
|
||||
var desired = {
|
||||
app: "sample-code/apps/selendroid-test-app.apk",
|
||||
@@ -14,10 +15,17 @@ module.exports = function () {
|
||||
var driver;
|
||||
setup(this, desired).then(function (d) { driver = d; });
|
||||
|
||||
var webviewContextAvailable = new Asserter(
|
||||
function (driver) {
|
||||
return driver
|
||||
.contexts().should.eventually.have.length(2);
|
||||
}
|
||||
);
|
||||
|
||||
beforeEach(function (done) {
|
||||
driver
|
||||
.waitForElementByName('buttonStartWebviewCD').click()
|
||||
.sleep(500)
|
||||
.waitFor(webviewContextAvailable, 1000, 100)
|
||||
.context('WEBVIEW')
|
||||
.nodeify(done);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user