Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

test(multi): added Internet Explorer 11 to ciConf.js (SauceLabs) #777

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion debugging/failureConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

// ----- Options to be passed to minijasminenode.
jasmineNodeOpts: {
Expand Down
3 changes: 2 additions & 1 deletion debugging/timeoutConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

// ----- Options to be passed to minijasminenode.
jasmineNodeOpts: {
Expand Down
6 changes: 4 additions & 2 deletions docs/browser-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ exports.config = {
app: 'safari'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000')
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000')
};
```

Expand All @@ -248,7 +249,8 @@ exports.config = {
deviceName: 'iPad Simulator'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000')
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000')
};

```
Expand Down
3 changes: 2 additions & 1 deletion referenceConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ exports.config = {
//
// A base URL for your application under test. Calls to protractor.get()
// with relative paths will be prepended with this.
baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

// Selector for the element housing the angular app - this defaults to
// body, but is necessary if ng-app is on a descendant of <body>
Expand Down
3 changes: 2 additions & 1 deletion spec/altRootConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ exports.config = {
// Selector for the element housing the angular app.
rootElement: 'div#nested-ng-app',

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

jasmineNodeOpts: {
onComplete: null,
Expand Down
14 changes: 8 additions & 6 deletions spec/basic/actions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,34 @@ describe('using an ActionSequence', function() {
/*
it('should navigate back and forward properly', function() {
var port = process.env.HTTP_PORT || '8000';
var host = process.env.HTTP_HOST || 'localhost';
browser.get('index.html#/repeater');
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');

browser.navigate().back();
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/form');
toEqual('http://'+host+':'+port+'/index.html#/form');

browser.navigate().forward();
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');
});
*/

it('should navigate back and forward properly from link', function() {
var port = process.env.HTTP_PORT || '8000';
var host = process.env.HTTP_HOST || 'localhost';
element(by.linkText('repeater')).click();
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');

browser.navigate().back();
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/form');
toEqual('http://'+host+':'+port+'/index.html#/form');

browser.navigate().forward();
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');
});
});
13 changes: 7 additions & 6 deletions spec/basic/lib_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var util = require('util');
var port = process.env.HTTP_PORT || '8000';
var host = process.env.HTTP_HOST || 'localhost';

describe('no protractor at all', function() {
it('should still do normal tests', function() {
Expand Down Expand Up @@ -32,15 +33,15 @@ describe('protractor library', function() {
function() {
browser.get('index.html');
expect(browser.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/form');
toEqual('http://'+host+':'+port+'/index.html#/form');

browser.driver.findElement(protractor.By.linkText('repeater')).click();
expect(browser.driver.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');

browser.navigate().back();
expect(browser.driver.getCurrentUrl()).
toEqual('http://localhost:'+port+'/index.html#/form');
toEqual('http://'+host+':'+port+'/index.html#/form');
});

it('should export other webdriver classes onto the global protractor',
Expand Down Expand Up @@ -96,11 +97,11 @@ describe('protractor library', function() {
it('should get the absolute URL', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).
toEqual('http://localhost:'+port+'/index.html#/form');
toEqual('http://'+host+':'+port+'/index.html#/form');

element(by.linkText('repeater')).click();
expect(browser.getLocationAbsUrl()).
toEqual('http://localhost:'+port+'/index.html#/repeater');
toEqual('http://'+host+':'+port+'/index.html#/repeater');
});

it('should navigate to another url with setLocation', function() {
Expand All @@ -109,7 +110,7 @@ describe('protractor library', function() {
browser.setLocation('/repeater');

expect(browser.getLocationAbsUrl()).
toEqual('http://localhost:' + port + '/index.html#/repeater');
toEqual('http://'+host+':' + port + '/index.html#/repeater');
});
});
});
3 changes: 2 additions & 1 deletion spec/basicConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
9 changes: 8 additions & 1 deletion spec/ciConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ exports.config = {
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER,
'name': 'Protractor smoke tests'
}, {
'browserName': 'internet explorer',
'version': '11',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER,
'name': 'Protractor smoke tests'
}],

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
3 changes: 2 additions & 1 deletion spec/cucumberConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
3 changes: 2 additions & 1 deletion spec/junitOutputConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ exports.config = {
}
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),
};
4 changes: 3 additions & 1 deletion spec/login/login_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
describe('pages with login', function() {
it('should log in with a non-Angular page', function() {
browser.get('http://localhost:8000/index.html');
var port = process.env.HTTP_PORT || '8000';
var host = process.env.HTTP_HOST || 'localhost';
browser.get('http://'+host+':'+port+'/index.html');

var angularElement = element(by.model('username'));
expect(angularElement.getAttribute('value')).toEqual('Anon');
Expand Down
3 changes: 2 additions & 1 deletion spec/mochaConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
3 changes: 2 additions & 1 deletion spec/multiConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ exports.config = {
'browserName': 'firefox'
}],

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
3 changes: 2 additions & 1 deletion spec/onPrepareConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

onPrepare: function() {
browser.params.password = '12345';
Expand Down
3 changes: 2 additions & 1 deletion spec/onPrepareStringConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:' + (process.env.HTTP_PORT || '8000'),
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

onPrepare: 'onPrepare/startup.js'
};
3 changes: 2 additions & 1 deletion spec/suitesConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:8000',
baseUrl: 'http://' + (process.env.HTTP_HOST || 'localhost') +
':' + (process.env.HTTP_PORT || '8000'),

params: {
login: {
Expand Down
5 changes: 3 additions & 2 deletions spec/withLoginConf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// This is the configuration file showing how a suite of tests might
// handle log-in using the onPrepare field.
var port = + (process.env.HTTP_PORT || '8000'),
baseUrl = 'http://localhost:8000';
var port = + (process.env.HTTP_PORT || '8000');
var host = process.env.HTTP_HOST || 'localhost';
var baseUrl = 'http://' + host + ':' + port;

exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
Expand Down