Skip to content

Commit

Permalink
finally fixed tests, definitely removed dinghy/dory dependence
Browse files Browse the repository at this point in the history
  • Loading branch information
rmNyro committed Aug 28, 2017
1 parent 68823a6 commit 1816244
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ FROM alpine:latest

USER root

ENV USER docker
ENV HOME /home
ENV USER docker
ENV APP_DIR $HOME/$USER/app

# http://pkg-shadow.alioth.debian.org/features.php
Expand Down
2 changes: 2 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

# Builds the nightwatch docker image

./bin/stop

docker-compose build --pull nightwatch
6 changes: 4 additions & 2 deletions bin/debug_test
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

# Useful for debugging failing tests

docker-compose run --name results -e DEBUG=true nightwatch && docker cp results:/usr/src/app/tests_output .
docker rm -v results
docker-compose run --name nightwatch_grid_results -e DEBUG=true nightwatch \
&& docker cp nightwatch_grid_results:/home/docker/app/tests_output . \
&& docker rm -v nightwatch_grid_results

6 changes: 4 additions & 2 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
# Starts test runner execution of all tests
# TODO: add arguments to specify nodes and number of concurrent nodes, e.g. scale firefox=4

docker-compose run --name results nightwatch && docker cp results:/usr/src/app/tests_output .
docker rm -v results
docker-compose run --name nightwatch_grid_results nightwatch \
&& docker cp nightwatch_grid_results:/home/docker/app/tests_output . \
&& docker rm -v nightwatch_grid_results

2 changes: 1 addition & 1 deletion nightwatch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"src_folders" : ["tests"],
"test_settings" : {
"default" : {
"launch_url": "http://hello.docker",
"launch_url": "http://web",
"selenium_host" : "hub",
"desiredCapabilities": {
"browserName": "chrome"
Expand Down
4 changes: 3 additions & 1 deletion tests/example_test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

var nightwatchConfig = require('../nightwatch.json');

// EXAMPLE ONLY:

module.exports = {
'Nightwatch.js Test' : function (browser) {
console.log('Nightwatch test started');

browser
.url('http://hello.docker')
.url(nightwatchConfig.test_settings.default.launch_url)
.assert.containsText('#test', 'Hello, Docker World!')
.end();

Expand Down

0 comments on commit 1816244

Please sign in to comment.