Skip to content
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

Merged
merged 56 commits into from
Apr 23, 2018

Conversation

iidrees
Copy link
Contributor

@iidrees iidrees commented Apr 23, 2018

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 directory
run npm install to update the node packages
run 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 or https://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

iidrees and others added 30 commits April 10, 2018 18:41
- 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]
…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]
@iidrees iidrees temporarily deployed to nazgul-cfh-staging-pr-24 April 23, 2018 14:55 Inactive
.send(searchQuery)
.expect(200, done)
.expect((res) => {
expect(res.body.user.email).to.equal('efosaokpugie@gmail.com')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon semi

.send(searchQuery)
.expect(200, done)
.expect((res) => {
expect(res.body.user.email).to.equal('efosaokpugie@gmail.com')

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');

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');

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');

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

'x-access-token': localStorage.getItem('userData')
},
}
}).then(null, null);

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

headers: {
'x-access-token': localStorage.getItem('userData')
},
}

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

gameLog,
headers: {
'x-access-token': localStorage.getItem('userData')
},

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

data: {
gameLog,
headers: {
'x-access-token': localStorage.getItem('userData')

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

url: `/api/games/${game.gameID}/start`,
data: {
gameLog,
headers: {

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

@coveralls
Copy link

coveralls commented Apr 23, 2018

Pull Request Test Coverage Report for Build 350

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.947%

Totals Coverage Status
Change from base Build 328: 0.0%
Covered Lines: 30
Relevant Lines: 38

💛 - Coveralls

@iidrees iidrees temporarily deployed to nazgul-cfh-staging-pr-24 April 23, 2018 17:07 Inactive
mode = mode || 'joinGame';
room = room || '';
createPrivate = createPrivate || false;
const userID = window.user ? user._id : 'unauthenticated';

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++) {

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++) {

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++) {

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++) {

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')

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'),

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(

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')

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

@iidrees iidrees temporarily deployed to nazgul-cfh-staging-pr-24 April 23, 2018 18:02 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants