diff --git a/core/views/profile.hbs b/core/views/profile.hbs index 40e6348..41bf004 100644 --- a/core/views/profile.hbs +++ b/core/views/profile.hbs @@ -3,8 +3,8 @@

Profile

-

-

+

+

diff --git a/cucumberTest.sh b/cucumberTest.sh index 095f4c6..3071283 100755 --- a/cucumberTest.sh +++ b/cucumberTest.sh @@ -13,7 +13,7 @@ rm -rf *.db # [ ! -d "node_modules" ] && echo "INSTALLING MODULES" && npm install # start the web server in background mode -# node index.js& +node index.js& # run the test suite in background mode node_modules/.bin/cucumber-js ./features -r ./steps & diff --git a/features/E-profile.feature b/features/E-profile.feature index 8f3c0a6..f31841c 100644 --- a/features/E-profile.feature +++ b/features/E-profile.feature @@ -1,17 +1,27 @@ Feature: Edit a profile - The user should be able to edit thier 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 + 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 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" + + Scenario: change profile avatar + 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 + And I click on the "profile" field + And I enter image "public/images/tests/python-logo.png" in the "avatar-input" field + And I click on the "submit" field + Then take a screenshot called "avatar" in "profile" + diff --git a/package.json b/package.json index d723a28..a4a5973 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "linter": "node_modules/.bin/eslint .", "test": "jest --coverage --detectOpenHandles", "unit": "node_modules/.bin/jest --coverage --runInBand tests/unit/", - "cucumber": "./cucumberTest.sh" + "cucumber": "cucumberTest.sh" }, "jest": { "projects": [ diff --git a/public/images/tests/python-logo.png b/public/images/tests/python-logo.png new file mode 100644 index 0000000..20afc89 Binary files /dev/null and b/public/images/tests/python-logo.png differ diff --git a/public/images/tests/wolf-armour.png b/public/images/tests/wolf-armour.png new file mode 100644 index 0000000..40810eb Binary files /dev/null and b/public/images/tests/wolf-armour.png differ