This repository has been archived by the owner on Aug 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
André Goulart
committed
Nov 17, 2015
1 parent
a3493ad
commit 8131bc8
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
var MockServer = require('mockserver'); | ||
|
||
module.exports = { | ||
setUp: function(callback) { | ||
this.client = require('../nightwatch.js').init(); | ||
|
||
callback(); | ||
}, | ||
|
||
testSuccess: function(test) { | ||
var client = this.client.api; | ||
client.waitForUrl('http://localhost/', 100, 0, function callback(result) { | ||
test.equal(result, 'http://localhost/'); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
testFailure: function(test) { | ||
var client = this.client.api; | ||
client.waitForUrl('http://localhost2/', 600, 0, function callback(result) { | ||
test.equal(result, 'http://localhost/'); | ||
test.done(); | ||
}); | ||
}, | ||
|
||
tearDown: function(callback) { | ||
this.client = null; | ||
// clean up | ||
callback(); | ||
} | ||
}; |