Skip to content

Commit

Permalink
Merging pull request #279 from fga-gpp-mds/issue_231_testes_70%_cober…
Browse files Browse the repository at this point in the history
…tura
  • Loading branch information
alaxalves authored Dec 14, 2017
2 parents 1ad2f4e + 1075335 commit ecd3b73
Show file tree
Hide file tree
Showing 39 changed files with 1,256 additions and 100 deletions.
4 changes: 3 additions & 1 deletion build/webpack.test.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var webpackConfig = merge(baseConfig, {
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/test.env'),
'API_URL': JSON.stringify('http://localhost:3000/')
'API_URL': JSON.stringify('http://localhost:3000/'),
'GITHUB_CLIENT_ID': JSON.stringify('cbd5f91719282354f09b'),

})
]
})
Expand Down
68 changes: 34 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/components/GitHub/GitHubCallBack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ export default {
mounted() {
const code = window.location.search.split('=')[1];
const headers = { Authorization: this.token };
this.$store.dispatch('linkGithub', { code, headers, userId: this.userId })
.then(() => {
this.$router.push({ name: 'UserProfile' });
})
})
.catch((e) => {
this.errors.push(e);
});
Expand Down
4 changes: 4 additions & 0 deletions src/components/Projects/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export default {
});
},
isGitHubAuthenticated() {
return this.is_github_authenticated;
},
refreshProjects() {
this.getProjects();
},
Expand Down
1 change: 1 addition & 0 deletions src/components/Releases/EditRelease.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default {
computed: {
...mapState({
token: state => state.auth.token,
releaseId: state => state.clientStatus.releaseId,
}),
},
methods: {
Expand Down
7 changes: 5 additions & 2 deletions src/services/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const auth = {
localStorage.token = res.token;
localStorage.userId = res.id;
localStorage.authenticated = true;
localStorage.isGitHubAuthenticated = res.isGitHubAuthenticated;
},

[LOGOUT](state) {
Expand Down Expand Up @@ -47,7 +46,11 @@ const auth = {
password: credentials.password,
})
.then((response) => {
const res = { token: response.data.auth_token, id: response.data.user.id };
const res = {
token: response.data.auth_token,
id: response.data.user.id,
};

commit(LOGIN, res);
});
},
Expand Down
3 changes: 2 additions & 1 deletion src/services/clientStatus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const clientStatus = {
},

[SET_GITHUB_SLUG](state, slug) {
state.githubSlug = slug;
const localState = state;
localState.githubSlug = slug;
},

[SET_PROJECT_ORIGIN](state, status) {
Expand Down
Loading

0 comments on commit ecd3b73

Please sign in to comment.