Skip to content

Commit

Permalink
[WIP] Chrome fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrayner committed Oct 24, 2018
1 parent a436e8c commit d0a1f0d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
11 changes: 7 additions & 4 deletions test/midway/api-el-suffix-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ require('../helpers/setup');
exports.test = function function_name (
suffix, extraDesc, suffixPartials, criterias, _skip) {
describe('api-el-' + extraDesc + ' ' + env.ENV_DESC, _skip, function() {
beforeEach(function(done) {
setTimeout(function() { console.log('timeout'); done(); }, 1000);
});

var partials = {};

var browser;
Expand All @@ -16,10 +20,9 @@ exports.test = function function_name (
var elementFuncName = 'element' + suffix;
partials['browser.' + elementFuncName] = suffixPartials.one;
it('browser.' + elementFuncName, function() {
return Q.all([
browser[elementFuncName](criterias.valid).should.eventually.exist,
browser[elementFuncName](criterias.invalid).should.be.rejectedWith(/status: 7/)
]);
return browser
[elementFuncName](criterias.valid).should.eventually.exist
[elementFuncName](criterias.invalid).should.be.rejectedWith(/status: 7/)
});

var elementFuncNameOrNull = 'element' + suffix + 'OrNull';
Expand Down
14 changes: 6 additions & 8 deletions test/midway/element-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ require('../helpers/setup');
var path = require('path');

describe('element ' + env.ENV_DESC, function() {
beforeEach(function(done) {
setTimeout(function() { console.log('timeout'); done(); }, 500);
});

var partials = {};

var browser;
Expand Down Expand Up @@ -103,10 +107,7 @@ describe('element ' + env.ENV_DESC, function() {
it('element.isDisplayed', function() {
return browser
.elementByCss("#theDiv .displayed").then(function(el) {
return Q.all([
el.isDisplayed().should.eventually.be.ok,
el.displayed().should.eventually.be.ok,
]);
return el.isDisplayed().should.eventually.be.ok;
})
.elementByCss("#theDiv .hidden").then(function(el) {
return el.isDisplayed().should.eventually.not.be.ok;
Expand All @@ -121,10 +122,7 @@ describe('element ' + env.ENV_DESC, function() {
it('element.isEnabled', function() {
return browser
.elementByCss("#theDiv .enabled").then(function(el) {
return Q.all([
el.isEnabled().should.eventually.be.ok,
el.enabled().should.eventually.be.ok,
]);
return el.isEnabled().should.eventually.be.ok;
})
.elementByCss("#theDiv .disabled").then(function(el) {
return el.isEnabled().should.eventually.not.be.ok;
Expand Down
11 changes: 7 additions & 4 deletions test/midway/multi/init-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('init ' + env.ENV_DESC,function() {

before(function() {
browser = wd.promiseChainRemote(env.REMOTE_CONFIG);
setTimeout(function(){ console.log('timeout'); }, 500);
return browser.configureLogging();
});

Expand All @@ -38,10 +39,12 @@ describe('init ' + env.ENV_DESC,function() {
it("default should be firefox", function() {
browser.defaultCapabilities.browserName.should.equal('firefox');
browser.defaultCapabilities.javascriptEnabled.should.be.ok;
return browser
.init(buildDesired( this.runnable().parent.title + " #1",
undefined, env.DESIRED.platform ))
.sessionCapabilities().should.eventually.have.property('browserName', 'firefox');

var init = browser
.init(buildDesired( this.runnable().parent.title + " #1",
undefined, env.DESIRED.platform ));

return init.sessionCapabilities().should.eventually.have.property('browserName', 'firefox');
});

it("setting browser default", function() {
Expand Down

0 comments on commit d0a1f0d

Please sign in to comment.