Skip to content

Commit

Permalink
Fixed testing the bdd integration tests for docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Jun 11, 2015
1 parent 42a5ac7 commit 524a1eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions features/steps/homeSteps.js
Expand Up @@ -15,7 +15,6 @@ module.exports = function() {
this.driver.get(this.baseUrl+'/');

next();

});

this.Then(/^I should see "(.*)" as the page title$/, function (title, next) {
Expand All @@ -25,7 +24,6 @@ module.exports = function() {
expect(pageTitle).to.equal(title);

next();

});

});
Expand All @@ -36,6 +34,7 @@ module.exports = function() {
.then(function(text) {

expect(text).to.equal(heading);

next();
});

Expand Down
4 changes: 4 additions & 0 deletions features/support/world.js
Expand Up @@ -28,6 +28,10 @@ var World = function World(callback) {
this.baseUrl = 'http://127.0.0.1:8001';
}

if (!!process.env.NGINX_PORT_80_TCP){ //if we are executing from a docker container
this.baseUrl = 'http://' + process.env.NGINX_PORT_80_TCP_ADDR; //rewrite it to the nginx container tcp address
}

this.waitFor = function(cssLocator, timeout) {
var waitTimeout = timeout || defaultTimeout;
return driver.wait(function() {
Expand Down

0 comments on commit 524a1eb

Please sign in to comment.