aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/components/user_profile.spec.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-01-15 16:35:13 +0000
committerShpuld Shpludson <shp@cock.li>2020-01-15 16:35:13 +0000
commit3ab128e73924ce34d190ff609cb9b081cdffe402 (patch)
treebba013a7d61688b90c1f59a8f9fa6c3323b72a05 /test/unit/specs/components/user_profile.spec.js
parent7c26435e66fd7e142ea4b88fbe51eede32eeb5ce (diff)
parent7397636914a9d3e7fd30373034c25175273ab808 (diff)
Merge branch 'develop' into 'master'
`master` refresh with `develop` See merge request pleroma/pleroma-fe!1028
Diffstat (limited to 'test/unit/specs/components/user_profile.spec.js')
-rw-r--r--test/unit/specs/components/user_profile.spec.js30
1 files changed, 19 insertions, 11 deletions
diff --git a/test/unit/specs/components/user_profile.spec.js b/test/unit/specs/components/user_profile.spec.js
index 41fd9cd0..1b6a47d7 100644
--- a/test/unit/specs/components/user_profile.spec.js
+++ b/test/unit/specs/components/user_profile.spec.js
@@ -12,9 +12,20 @@ const mutations = {
setError: () => {}
}
+const actions = {
+ fetchUser: () => {},
+ fetchUserByScreenName: () => {}
+}
+
const testGetters = {
- userByName: state => getters.userByName(state.users),
- userById: state => getters.userById(state.users)
+ findUser: state => getters.findUser(state.users),
+ mergedConfig: state => ({
+ colors: '',
+ highlight: {},
+ customTheme: {
+ colors: []
+ }
+ })
}
const localUser = {
@@ -31,21 +42,16 @@ const extUser = {
const externalProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
+ fetchers: {},
backendInteractor: backendInteractorService('')
},
interface: {
browserSupport: ''
},
- config: {
- colors: '',
- highlight: {},
- customTheme: {
- colors: []
- }
- },
instance: {
hideUserStats: true
},
@@ -89,7 +95,7 @@ const externalProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [extUser],
+ usersObject: { 100: extUser },
users: [extUser]
}
}
@@ -97,9 +103,11 @@ const externalProfileStore = new Vuex.Store({
const localProfileStore = new Vuex.Store({
mutations,
+ actions,
getters: testGetters,
state: {
api: {
+ fetchers: {},
backendInteractor: backendInteractorService('')
},
interface: {
@@ -155,7 +163,7 @@ const localProfileStore = new Vuex.Store({
currentUser: {
credentials: ''
},
- usersObject: [localUser],
+ usersObject: { 100: localUser, 'testuser': localUser },
users: [localUser]
}
}