Skip to content

Commit

Permalink
have safariIgnoreFraudWarning test actually test something (fix #3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Jul 29, 2014
1 parent 86fa90a commit 576af5e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/functional/common/webview/basics-base.js
Expand Up @@ -5,7 +5,7 @@ var env = require('../../../helpers/env'),
webviewHelper = require("../../../helpers/webview"),
loadWebView = webviewHelper.loadWebView,
isChrome = webviewHelper.isChrome,
Asserter = require('wd').Asserter,
ChaiAsserter = require('../../../helpers/asserter.js').ChaiAsserter,
Q = require('q'),
spinTitle = webviewHelper.spinTitle,
spinWait = require('../../../helpers/spin.js').spinWait,
Expand Down Expand Up @@ -232,13 +232,13 @@ module.exports = function (desired) {
.nodeify(done);
});
it('should not display a phishing warning with safariIgnoreFraudWarning @skip-chrome', function (done) {
var titleToBecomeRight = new Asserter(function (driver) {
var titleToBecomeRight = new ChaiAsserter(function (driver) {
return driver
.title()
.should.eventually.contain("I am another page title");
});
driver
.get(env.TEST_END_POINT + 'guinea-pig2.html')
.get(env.PHISHING_END_POINT + 'guinea-pig2.html')
.waitFor(titleToBecomeRight, 10000, 500)
.nodeify(done);
});
Expand Down
32 changes: 32 additions & 0 deletions test/functional/ios/safari/webview/special-caps-specs.js
@@ -0,0 +1,32 @@
"use strict";

var env = require('../../../../helpers/env.js'),
_ = require('underscore'),
setup = require("../../../common/setup-base.js"),
webviewHelper = require("../../../../helpers/webview.js"),
loadWebView = webviewHelper.loadWebView,
desired = require('./desired.js'),
ChaiAsserter = require('../../../../helpers/asserter.js').ChaiAsserter;

describe('safari - webview - special capabilities', function () {
var driver;
var specialCaps = _.clone(desired);
specialCaps.safariIgnoreFraudWarning = true;
setup(this, specialCaps, {'no-reset': true}).then(function (d) { driver = d; });

beforeEach(function (done) {
loadWebView(specialCaps, driver).nodeify(done);
});

it('should not display a phishing warning with safariIgnoreFraudWarning @skip-chrome', function (done) {
var titleToBecomeRight = new ChaiAsserter(function (driver) {
return driver
.title()
.should.eventually.contain("I am another page title");
});
driver
.get(env.PHISHING_END_POINT + 'guinea-pig2.html')
.waitFor(titleToBecomeRight, 10000, 500)
.nodeify(done);
});
});
1 change: 1 addition & 0 deletions test/helpers/env.js
Expand Up @@ -178,5 +178,6 @@ env.TEST_END_POINT = 'http://localhost:' + env.LOCAL_APPIUM_PORT + '/test/';
env.GUINEA_TEST_END_POINT = env.TEST_END_POINT + 'guinea-pig';
env.CHROME_TEST_END_POINT = 'http://10.0.2.2:' + env.LOCAL_APPIUM_PORT + '/test/';
env.CHROME_GUINEA_TEST_END_POINT = env.CHROME_TEST_END_POINT + 'guinea-pig';
env.PHISHING_END_POINT = env.TEST_END_POINT.replace('http://', 'http://foo:bar@');

module.exports = env;

0 comments on commit 576af5e

Please sign in to comment.