Fix tests

This commit is contained in:
Angelina Filippova 2020-06-07 00:37:28 +03:00
parent 12bac96c9d
commit b48e047a07
3 changed files with 6 additions and 6 deletions

View file

@ -11,7 +11,7 @@ export async function fetchStatus(id, authHost, token) {
account: { account: {
id: '9n1bySks25olxWrku0', id: '9n1bySks25olxWrku0',
avatar: 'http://localhost:4000/images/avi.png', avatar: 'http://localhost:4000/images/avi.png',
display_name: 'dolin', nickname: 'dolin',
tags: ['strip_media', 'sandbox', 'disable_any_subscription', 'force_nsfw'], tags: ['strip_media', 'sandbox', 'disable_any_subscription', 'force_nsfw'],
url: 'http://localhost:4000/users/dolin' url: 'http://localhost:4000/users/dolin'
}, },

View file

@ -7,9 +7,9 @@ export let users = [
const userProfile = { avatar: 'avatar.jpg', nickname: 'allis', id: '2', tags: [], roles: { admin: true, moderator: false }, local: true, external: false } const userProfile = { avatar: 'avatar.jpg', nickname: 'allis', id: '2', tags: [], roles: { admin: true, moderator: false }, local: true, external: false }
const userStatuses = [ const userStatuses = [
{ account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'pizza makes everything better', id: '9vJOO3iFPyjNaEhJ5s', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' }, { account: { id: '9n1bySks25olxWrku0', nickname: 'dolin' }, content: 'pizza makes everything better', id: '9vJOO3iFPyjNaEhJ5s', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' },
{ account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'pizza time', id: '9vJPD5XKOdzQ0bvGLY', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' }, { account: { id: '9n1bySks25olxWrku0', nickname: 'dolin' }, content: 'pizza time', id: '9vJPD5XKOdzQ0bvGLY', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' },
{ account: { id: '9n1bySks25olxWrku0', display_name: 'dolin' }, content: 'what is yout favorite pizza?', id: '9jop82OBXeFPYulVjM', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' } { account: { id: '9n1bySks25olxWrku0', nickname: 'dolin' }, content: 'what is yout favorite pizza?', id: '9jop82OBXeFPYulVjM', created_at: '2020-05-22T17:34:34.000Z', visibility: 'public' }
] ]
const filterUsers = (str) => { const filterUsers = (str) => {

View file

@ -45,7 +45,7 @@ describe('Status show page', () => {
expect(wrapper.find('.status-container').isVisible()).toBe(true) expect(wrapper.find('.status-container').isVisible()).toBe(true)
expect(store.state.status.fetchedStatus.id).toBe('9vJOO3iFPyjNaEhJ5s') expect(store.state.status.fetchedStatus.id).toBe('9vJOO3iFPyjNaEhJ5s')
expect(store.state.status.fetchedStatus.account.display_name).toBe('dolin') expect(store.state.status.fetchedStatus.account.nickname).toBe('dolin')
expect(store.state.userProfile.statuses.length).toEqual(3) expect(store.state.userProfile.statuses.length).toEqual(3)
done() done()
}) })
@ -81,7 +81,7 @@ describe('Status show page', () => {
await flushPromises() await flushPromises()
expect(wrapper.find('.status-card').exists()).toBe(true) expect(wrapper.find('.status-card').exists()).toBe(true)
expect(wrapper.find('router-link-stub h3').text()).toBe('dolin') expect(wrapper.find('router-link-stub span.status-account-name').text()).toBe('dolin')
expect(wrapper.find('span.el-tag').text()).not.toBe('Sensitive') expect(wrapper.find('span.el-tag').text()).not.toBe('Sensitive')
expect(wrapper.find('span.el-tag').text()).toBe('Public') expect(wrapper.find('span.el-tag').text()).toBe('Public')
expect(wrapper.find('button.status-actions-button').exists()).toBe(true) expect(wrapper.find('button.status-actions-button').exists()).toBe(true)