mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Vue component unit test isolation (#12154)
* Issue 10786 - Add unit test for Home component * Issue 10786 - Improve test setup and test invite parameter variations * Issue 10786 - Improve Vue.js test isolation by adding async keyword to dispatch function * Issue 10786 - Missing action does not need to be awaited * Use localVue for groupsUtilities test and revert partial zone fix
This commit is contained in:
@@ -913,6 +913,7 @@ export default {
|
||||
if (username.length < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$store.dispatch('auth:verifyUsername', {
|
||||
username: this.username,
|
||||
}).then(res => {
|
||||
@@ -942,15 +943,7 @@ export default {
|
||||
groupInvite,
|
||||
});
|
||||
|
||||
let redirectTo;
|
||||
|
||||
if (this.$route.query.redirectTo) {
|
||||
redirectTo = this.$route.query.redirectTo;
|
||||
} else {
|
||||
redirectTo = '/';
|
||||
}
|
||||
|
||||
window.location.href = redirectTo;
|
||||
window.location.href = this.$route.query.redirectTo || '/';
|
||||
},
|
||||
playButtonClick () {
|
||||
Analytics.track({
|
||||
@@ -968,7 +961,7 @@ export default {
|
||||
} else {
|
||||
try {
|
||||
await hello(network).logout();
|
||||
} catch (e) {} // eslint-disable-line
|
||||
} catch (e) {} // eslint-disable-line
|
||||
|
||||
const redirectUrl = `${window.location.protocol}//${window.location.host}`;
|
||||
const auth = await hello(network).login({
|
||||
|
||||
Reference in New Issue
Block a user