-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added initial e2e and server side tests
- Loading branch information
Showing
5 changed files
with
81 additions
and
2 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
.elasticbeanstalk/ | ||
.jshintrc | ||
./public/bundle.js | ||
npm-debug.log |
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,20 @@ | ||
// To run this test, enter | ||
// $ npm run client | ||
describe('Emanie (prior to log in)', function() { | ||
|
||
it('should load page', function (client, done) { | ||
client | ||
.url('http://localhost:8000') | ||
.waitForElementVisible('body', 1000) | ||
.assert.title('Emanie') // remove this | ||
.assert.visible('.navbar-inverse') | ||
.assert.visible('.form.control') | ||
.pause(1000); | ||
}); | ||
|
||
after(function(client, done) { | ||
client.end(function() { | ||
done(); | ||
}); | ||
}); | ||
}); |
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,37 @@ | ||
{ | ||
"src_folders" : ["clientTests/e2e/client.js"], | ||
"output_folder" : "clientTests/reports", | ||
"custom_commands_path" : "", | ||
"custom_assertions_path" : "", | ||
"page_objects_path" : "clientTests/pages", | ||
"globals_path" : "", | ||
|
||
"selenium" : { | ||
"start_process" : true, | ||
"server_path" : "./node_modules/selenium-standalone/.selenium/selenium-server/2.53.1-server.jar", | ||
"log_path" : "", | ||
"host": "127.0.0.1", | ||
"port" : 4444, | ||
"cli_args" : { | ||
"webdriver.chrome.driver": "./node_modules/selenium-standalone/.selenium/chromedriver/2.25-x64-chromedriver" | ||
} | ||
}, | ||
|
||
"test_runner" : "mocha", | ||
"test_settings" : { | ||
"default" : { | ||
"launch_url" : "http://localhost:8000", | ||
"selenium_port" : 4444, | ||
"selenium_host" : "localhost", | ||
"silent": true, | ||
"screenshots" : { | ||
"enabled" : false, | ||
"path" : "clientTests/screenshots" | ||
}, | ||
"desiredCapabilities": { | ||
"browserName": "chrome", | ||
"javascriptEnabled": true | ||
} | ||
} | ||
} | ||
} |
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
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,16 @@ | ||
var should = require('should'); | ||
var supertest = require('supertest'); | ||
var server = supertest.agent('http://localhost:8000'); | ||
|
||
// Start up server prior to running test. | ||
describe('server',function(){ | ||
it('should connect to server', function(done){ | ||
server | ||
.get('/') | ||
.expect(200) | ||
.end(function(err,res){ | ||
res.status.should.equal(200); | ||
done(); | ||
}); | ||
}); | ||
}); |