Skip to content

Commit

Permalink
Nightwatch basic phantom setup
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslavsky committed Dec 16, 2014
1 parent bae1e21 commit 23d13e3
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 106 deletions.
13 changes: 13 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var coveralls = require('gulp-coveralls');
var doc = require('gulp-jsdoc-to-markdown');
var forEach = require('gulp-foreach');
var karma = require('karma').server;
var nightwatch = require('gulp-nightwatch');
var open = require('gulp-open');
var regrep = require('gulp-regex-replace');
var rename = require('gulp-rename');
Expand Down Expand Up @@ -91,6 +92,18 @@ gulp.task('coverage', ['karma-coverage'], function() {
}))
});

//Basic e2e testing
gulp.task('e2e-phantom', function() {
return gulp.src([])
.pipe(nightwatch({
configFile: 'test/config/nightwatch-phantom.json'
}))
});

//Browser compatibility e2e testing
gulp.task('e2e-browsers', function() {
});




Expand Down
105 changes: 0 additions & 105 deletions karma.conf.js

This file was deleted.

2 changes: 1 addition & 1 deletion nightwatch.json → test/config/nightwatch-phantom.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"output_folder" : "test/results",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"globals_path" : "test/lib/nightwatch/globals.js",
"globals_path" : "test/lib/nightwatch/globals-phantom.js",

"selenium" : {
"start_process" : true,
Expand Down
10 changes: 10 additions & 0 deletions test/lib/nightwatch/globals-phantom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var HtmlReporter = require('nightwatch-html-reporter');
var reporter = new HtmlReporter({
openBrowser: false,
reportsDirectory: __dirname + '../../../results/e2e/',
reportFilename: 'chrome.html',
themeName: 'compact'
});
module.exports = {
reporter: reporter.fn
};
22 changes: 22 additions & 0 deletions test/results/e2e/chrome.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Nightwatch HTML Report</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="c:\Users\Alex\Documents\github\textStack\node_modules\nightwatch-html-reporter\lib/themes/compact/compact.css">
<script type="text/javascript" src="c:\Users\Alex\Documents\github\textStack\node_modules\nightwatch-html-reporter\lib/themes/compact/../default/default.js"></script>
</head>
<body>
<h1>Nightwatch Results</h1><a href="#" class="toggleSuccess">Show/Hide Successes</a>
<div id="container">
<div class="suite error">
<div class="name">Sample test<span class="package">(sample)</span></div>
<ul class="testcases">
<li class="testcase success">
<div class="name">Testing if the page title equals &quot;Google&quot;.</div>
</li>
</ul>
</div>
</div>
</body>
</html>

0 comments on commit 23d13e3

Please sign in to comment.