tweaking test names and tags

This commit is contained in:
sebv
2014-05-14 16:53:33 +08:00
parent 0f1df46840
commit d3f85b7d54
3 changed files with 24 additions and 38 deletions

View File

@@ -1,33 +1,29 @@
"use strict";
var env = require('../../../helpers/env')
, setup = require("../../common/setup-base");
var setup = require("../../common/setup-base");
describe("safari - screenshot", function () {
// TODO: enable safari tests on ci
describe('screenshots (' + env.DEVICE + ')', function () {
var driver;
setup(this, {browserName: 'safari'}).then(function (d) { driver = d; });
describe('safari - screenshots', function () {
var driver;
setup(this, {browserName: 'safari'}).then(function (d) { driver = d; });
it('should get an app screenshot', function (done) {
driver
.takeScreenshot()
.should.eventually.exist
.nodeify(done);
});
it('should get an app screenshot in landscape mode', function (done) {
driver.takeScreenshot().then(function (screenshot1) {
screenshot1.should.exist;
return driver
.setOrientation("LANDSCAPE")
// A useless error does often exist here, let's ignore it
.catch(function () {})
.takeScreenshot().then(function (screenshot2) {
screenshot2.should.exist;
screenshot2.should.not.eql(screenshot1);
});
}).sleep(3000) // cooldown
it('should get an app screenshot', function (done) {
driver
.takeScreenshot()
.should.eventually.exist
.nodeify(done);
});
});
it('should get an app screenshot in landscape mode', function (done) {
driver.takeScreenshot().then(function (screenshot1) {
screenshot1.should.exist;
return driver
.setOrientation("LANDSCAPE")
// A useless error does often exist here, let's ignore it
.catch(function () {})
.takeScreenshot().then(function (screenshot2) {
screenshot2.should.exist;
screenshot2.should.not.eql(screenshot1);
});
}).sleep(3000) // cooldown
.nodeify(done);
});
});

View File

@@ -4,7 +4,7 @@ var setup = require("../../common/setup-base")
, desired = require('./desired')
, _ = require('underscore');
describe('webview', function () {
describe('webview - basics', function () {
var driver;

View File

@@ -132,17 +132,6 @@ env.ANDROID = env.DEVICE.match(/android/i);
env.LAUNCH_TIMEOUT = process.env.LAUNCH_TIMEOUT ? JSON.parse(process.env.LAUNCH_TIMEOUT) :
(env.IOS71 ? {"global": 60000, "afterSimLaunch": 10000} : 60000);
// caps overide for sauce
if (env.SAUCE) {
if (env.DEVICE === 'IOS') {
env.CAPS.version = "6.1";
env.CAPS.platform = "Mac 10.8";
} else if (env.CAPS.device === 'Android') {
env.CAPS.version = "4.2";
env.CAPS.platform = "LINUX";
}
}
env.CAPS.launchTimeout = env.LAUNCH_TIMEOUT;
if (env.IOS) {
@@ -174,6 +163,7 @@ if (env.SAUCE && env.TARBALL) {
'appium-startup-args': 'minimal'
//'appium-startup-args': '-m'
};
env.CAPS.tags=[env.DEVICE];
}
// rest enf points