-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#156100325 Start game and save gamelog #24
Conversation
- seed database to see how the game works - add modals that queries user if they want to start game
- implement the game history/game log saving feature - [Delivers #156100325]
- add test for the save game history feature - [Finishes #156100325]
- seed database to see how the game works - add modals that queries user if they want to start game
- implement the game history/game log saving feature - [Delivers #156100325]
- add test for the save game history feature - [Finishes #156100325]
…ela/nazgul-cfh into feature/156100325/start-game
…ites #156100323 search and invite functionality
#156100325 start game and create game history
- provide user a feedback upon failed sign in or sign up attempt [Delivers #156500637]
- provide user a feedback upon failed log in or sign up attempt [Delivers #156842461]
test/user/user.search.js
Outdated
.send(searchQuery) | ||
.expect(200, done) | ||
.expect((res) => { | ||
expect(res.body.user.email).to.equal('efosaokpugie@gmail.com') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon semi
test/user/user.search.js
Outdated
.send(searchQuery) | ||
.expect(200, done) | ||
.expect((res) => { | ||
expect(res.body.user.email).to.equal('efosaokpugie@gmail.com') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon semi
@@ -0,0 +1,28 @@ | |||
const request = require('supertest'); | |||
const app = require('../../server'); | |||
const { expect } = require('chai'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unable to resolve path to module 'chai' import/no-unresolved
@@ -0,0 +1,28 @@ | |||
const request = require('supertest'); | |||
const app = require('../../server'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unable to resolve path to module '../../server' import/no-unresolved
@@ -0,0 +1,28 @@ | |||
const request = require('supertest'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unable to resolve path to module 'supertest' import/no-unresolved
public/js/services/game.js
Outdated
'x-access-token': localStorage.getItem('userData') | ||
}, | ||
} | ||
}).then(null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 8 spaces but found 6 indent
public/js/services/game.js
Outdated
headers: { | ||
'x-access-token': localStorage.getItem('userData') | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 10 spaces but found 8 indent
public/js/services/game.js
Outdated
gameLog, | ||
headers: { | ||
'x-access-token': localStorage.getItem('userData') | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 12 spaces but found 10 indent
public/js/services/game.js
Outdated
data: { | ||
gameLog, | ||
headers: { | ||
'x-access-token': localStorage.getItem('userData') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 14 spaces but found 12 indent
public/js/services/game.js
Outdated
url: `/api/games/${game.gameID}/start`, | ||
data: { | ||
gameLog, | ||
headers: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected indentation of 12 spaces but found 10 indent
mode = mode || 'joinGame'; | ||
room = room || ''; | ||
createPrivate = createPrivate || false; | ||
const userID = window.user ? user._id : 'unauthenticated'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'user' is not defined no-undef
} | ||
} | ||
for (i = 0; i < removed.length; i++) { | ||
for (let k = 0; k < game.table.length; k++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unary operator '++' used no-plusplus
} | ||
} | ||
} | ||
for (i = 0; i < removed.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unary operator '++' used no-plusplus
_.pluck(data.table, 'player') | ||
); | ||
for (i = 0; i < added.length; i++) { | ||
for (let j = 0; j < data.table.length; j++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unary operator '++' used no-plusplus
_.pluck(game.table, 'player'), | ||
_.pluck(data.table, 'player') | ||
); | ||
for (i = 0; i < added.length; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unary operator '++' used no-plusplus
); | ||
const removed = _.difference( | ||
_.pluck(game.table, 'player'), | ||
_.pluck(data.table, 'player') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'_' is not defined no-undef
_.pluck(game.table, 'player') | ||
); | ||
const removed = _.difference( | ||
_.pluck(game.table, 'player'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'_' is not defined no-undef
_.pluck(data.table, 'player'), | ||
_.pluck(game.table, 'player') | ||
); | ||
const removed = _.difference( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'_' is not defined no-undef
} else { | ||
const added = _.difference( | ||
_.pluck(data.table, 'player'), | ||
_.pluck(game.table, 'player') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'_' is not defined no-undef
What does this PR do?
This PR makes it possible to easily start the game and then create a game history/log
Description of Task to be completed?
Seed the remote database with questions answers
How should this be manually tested?
clone the repository
cd
into the cloned directoryrun
npm install
to update the node packagesrun
npm start
next to start the application.when the application starts navigate to the signup or login page at
https://nazgul-cfh-staging.herokuapp.com/#!/signup
orhttps://nazgul-cfh-staging.herokuapp.com/#!/signin
respectively.signup or login and then navigate to the game page by clicking
play with strangers
when you are successfully signed in.ensure that you are up to the minimum number of 3 players before starting the game.
Any background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
#156100325
Screenshots (if appropriate)
N/A
Questions:
N/A