forked from reisborw/FAQ
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 pull request reisborw#29 from 5001CEM-1920SEPJAN/cucumber
Cucumber
- Loading branch information
Showing
19 changed files
with
345 additions
and
35 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
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
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,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 & | ||
|
||
# wait for the tests to complete | ||
sleep 100 | ||
|
||
# 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,33 @@ | ||
Feature: Register an account | ||
The user should be able to register an account. | ||
|
||
Scenario: register page | ||
Given The browser is open on the home page | ||
When I click on the "register" field | ||
Then take a screenshot called "regsiter-page" in "register" | ||
And the first "title" should be "Game Hub | Create an account" | ||
And the first "h1" should be "CREATE AN ACCOUNT" | ||
And the "h1" number "1" should be "Sign Up" | ||
And the unordered list in header should be "Home Login Register" | ||
|
||
Scenario: create an account without profile picture | ||
Given The browser is open on the register page | ||
And I enter "Sam Smith" in the "name" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
Then take a screenshot called "regsitered" in "register" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Vasper123 Add Logout" | ||
|
||
Scenario: create another account with profile picture | ||
Given The browser is open on the register page | ||
And I enter "Emma Jones" in the "name" field | ||
And I enter "Gamer123" in the "username" field | ||
And I enter "1234" in the "password" field | ||
And I click on the "submit" field | ||
Then take a screenshot called "regsitered-another" in "register" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Gamer123 Add Logout" |
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,33 @@ | ||
Feature: Login to an account | ||
The user should be able to login to an account. | ||
|
||
Scenario: login page | ||
Given The browser is open on the home page | ||
When I click on the "login" field | ||
Then take a screenshot called "login-page" in "login" | ||
And the first "title" should be "Game Hub | Login" | ||
And the first "h1" should be "LOGIN" | ||
And the "h1" number "1" should be "Login" | ||
And the unordered list in header should be "Home Login Register" | ||
|
||
Scenario: login to an account | ||
Given The browser is open on the login page | ||
When I click on the "login" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
Then take a screenshot called "logged-in" in "login" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Vasper123 Add Logout" | ||
|
||
Scenario: login to another account | ||
Given The browser is open on the login page | ||
When I click on the "login" field | ||
And I enter "Gamer123" in the "username" field | ||
And I enter "1234" in the "password" field | ||
And I click on the "submit" field | ||
Then take a screenshot called "logged-in-another" in "login" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Gamer123 Add Logout" |
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,15 @@ | ||
Feature: Logout an account | ||
The user should be able to logout an account. | ||
|
||
Scenario: logout an account | ||
Given The browser is open on the home page | ||
When I click on the "login" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
And I click on the "logout" field | ||
Then take a screenshot called "logged-out" in "logout" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Login Register" | ||
|
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,32 @@ | ||
Feature: Create a question | ||
The user should be able to create a question. | ||
|
||
Scenario: createQuestion page | ||
Given The browser is open on the home page | ||
When I click on the "login" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
And I click on the "add" field | ||
Then take a screenshot called "createquestion-page" in "addQuestion" | ||
And the first "title" should be "Game Hub | Create a question" | ||
And the first "h1" should be "CREATE A QUESTION" | ||
And the "h1" number "1" should be "Create a Question" | ||
And the unordered list in header should be "Home Vasper123 Add Logout" | ||
|
||
Scenario: create a question without image | ||
Given The browser is open on the home page | ||
When I click on the "login" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
And I click on the "add" field | ||
And I enter "Call of Duty" in the "title" field | ||
And I enter "How to find pack-a-punch on Die Riese" in the "body" field | ||
And I click on the "submit" field | ||
Then take a screenshot called "question-created" in "addQuestion" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Vasper123 Add Logout" | ||
And the first "h2" should be "Call of Duty" | ||
And the first "h3" should be "How to find pack-a-punch on Die Riese" |
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,17 @@ | ||
Feature: Edit a profile | ||
The user should be able to edit thier profile. | ||
|
||
Scenario: profile page | ||
Given The browser is open on the login page | ||
When I click on the "login" field | ||
And I enter "Vasper123" in the "username" field | ||
And I enter "123" in the "password" field | ||
And I click on the "submit" field | ||
And I click on the "profile" field | ||
Then take a screenshot called "profile-page" in "profile" | ||
And the first "title" should be "Game Hub | Sam Smith's Profile" | ||
And the first "h1" should be "SAM SMITH'S PROFILE" | ||
|
||
And the "h1" number "1" should be "Profile" | ||
|
||
And the unordered list in header should be "Home Vasper123 Add Logout" |
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,25 @@ | ||
Feature: Open Home page | ||
The user should be able to view the home page. | ||
|
||
Scenario: home page | ||
Given The browser is open on the home page | ||
Then take a screenshot called "home-page" in "home" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Login Register" | ||
|
||
Scenario: home page link | ||
Given The browser is open on the register page | ||
When I click on the "home" field | ||
Then take a screenshot called "home-page-another" in "home" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Login Register" | ||
|
||
Scenario: home page logo button | ||
Given The browser is open on the login page | ||
When I click on the "logo" field | ||
Then take a screenshot called "home-page-button" in "home" | ||
And the first "title" should be "Game Hub | Welcome to the GameHub" | ||
And the first "h1" should be "WELCOME TO THE GAMEHUB" | ||
And the unordered list in header should be "Home Login Register" |
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
+258 KB
public/images/wolf-armour.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.