fixed tests, review fixes, now storing local users with downcase screen name for
better compatibility
This commit is contained in:
parent
489f840d84
commit
06d39b62a8
5 changed files with 19 additions and 12 deletions
|
@ -12,6 +12,11 @@ const mutations = {
|
|||
setError: () => {}
|
||||
}
|
||||
|
||||
const actions = {
|
||||
fetchUser: () => {},
|
||||
fetchUserByScreenName: () => {}
|
||||
}
|
||||
|
||||
const testGetters = {
|
||||
findUser: state => getters.findUser(state.users)
|
||||
}
|
||||
|
@ -30,6 +35,7 @@ const extUser = {
|
|||
|
||||
const externalProfileStore = new Vuex.Store({
|
||||
mutations,
|
||||
actions,
|
||||
getters: testGetters,
|
||||
state: {
|
||||
api: {
|
||||
|
@ -88,7 +94,7 @@ const externalProfileStore = new Vuex.Store({
|
|||
currentUser: {
|
||||
credentials: ''
|
||||
},
|
||||
usersObject: [extUser],
|
||||
usersObject: { 100: extUser },
|
||||
users: [extUser]
|
||||
}
|
||||
}
|
||||
|
@ -96,6 +102,7 @@ const externalProfileStore = new Vuex.Store({
|
|||
|
||||
const localProfileStore = new Vuex.Store({
|
||||
mutations,
|
||||
actions,
|
||||
getters: testGetters,
|
||||
state: {
|
||||
api: {
|
||||
|
@ -154,14 +161,13 @@ const localProfileStore = new Vuex.Store({
|
|||
currentUser: {
|
||||
credentials: ''
|
||||
},
|
||||
usersObject: [localUser],
|
||||
usersObject: { 100: localUser, 'testuser': localUser },
|
||||
users: [localUser]
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// It's a little bit more complicated now
|
||||
describe.skip('UserProfile', () => {
|
||||
describe('UserProfile', () => {
|
||||
it('renders external profile', () => {
|
||||
const wrapper = mount(UserProfile, {
|
||||
localVue,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue