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:
Bart Enkelaar
2020-05-05 16:20:08 +02:00
committed by GitHub
parent 378325a8a2
commit 6e24cf0fe1
10 changed files with 135 additions and 31 deletions

View File

@@ -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({