Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge branch 'master' of https://github.coventry.ac.uk/web/dynamic-we…
- Loading branch information
Showing
13 changed files
with
148 additions
and
38 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
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
BIN
+0 Bytes
(100%)
exercises/01_dynamic_websites/bookshop.db
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# force the script to exit on first fail | ||
set -e | ||
|
||
# create any directories needed by the test script | ||
mkdir -p screenshots | ||
|
||
# delete any local databases (if you are using them) | ||
rm -rf *.db | ||
|
||
# install packages if none found | ||
# [ ! -d "node_modules" ] && echo "INSTALLING MODULES" && npm install | ||
|
||
# start the web server in background mode | ||
node index.js& | ||
|
||
# run the test suite in background mode | ||
node_modules/.bin/cucumber-js ./features -r ./steps & | ||
sleep 2 | ||
|
||
# wait for the tests to complete | ||
sleep 5 | ||
|
||
# kill the web server | ||
pkill node |
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,23 @@ | ||
Feature: Adding Items | ||
The user should be able to add items to the list. | ||
|
||
Scenario: add single item | ||
Given The browser is open on the home page | ||
When I enter "bread" in the "item" field | ||
When I enter "42" in the "qty" field | ||
When I click on the submit button | ||
Then the heading should be "ToDo List" | ||
Then the list should contain "1" rows | ||
Then the list should contain a single entry for "bread" | ||
Then the item should be "bread" | ||
Then the "bread" quantity should be "42" | ||
|
||
Scenario: add multiple items | ||
Given The browser is open on the home page | ||
When I enter "butter" in the "item" field | ||
When I enter "24" in the "qty" field | ||
When I click on the submit button | ||
Then the heading should be "ToDo List" | ||
Then the list should contain "2" rows | ||
Then the list should contain a single entry for "bread" | ||
Then the item should be "bread" |
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
mkdir screenshots | ||
mkdir trace | ||
set -e | ||
echo hello | ||
mkdir -p screenshots | ||
mkdir -p trace | ||
rm -rf *.db | ||
# [ ! -d "node_modules" ] && echo "INSTALLING MODULES" && npm install | ||
node index.js& | ||
node_modules/.bin/jest --runInBand --detectOpenHandles acceptance\ tests/* | ||
kill %1 | ||
read -p "Press enter to continue" | ||
|
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,19 @@ | ||
|
||
'use strict' | ||
|
||
module.exports = class Messages { | ||
constructor() { | ||
console.log('constructor') | ||
this.messages = [] | ||
return this | ||
} | ||
extractData() { | ||
|
||
} | ||
add() { | ||
|
||
} | ||
getAll() { | ||
|
||
} | ||
} |
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