Fix tests
This commit is contained in:
parent
727f72f058
commit
e211e26d16
4 changed files with 14 additions and 14 deletions
|
@ -1,14 +1,14 @@
|
|||
const reports = [
|
||||
{ created_at: '2019-05-21T21:35:33.000Z', account: { display_name: 'Benjamin Fame', tags: [] }, actor: {}, state: 'open', id: '2', content: 'This is a report', statuses: [] },
|
||||
{ created_at: '2019-05-20T22:45:33.000Z', account: { display_name: 'Alice Pool', tags: [] }, actor: {}, state: 'resolved', id: '1', content: 'Please block this user', statuses: [] },
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { display_name: 'Nick Keys', tags: [] }, actor: {}, state: 'closed', id: '3', content: '', statuses: [] },
|
||||
{ created_at: '2019-05-21T21:35:33.000Z', account: { display_name: 'Benjamin Fame', tags: [] }, actor: {}, state: 'open', id: '5', content: 'This is a report', statuses: [] },
|
||||
{ created_at: '2019-05-20T22:45:33.000Z', account: { display_name: 'Alice Pool', tags: [] }, actor: {}, state: 'resolved', id: '7', content: 'Please block this user', statuses: [
|
||||
{ account: { display_name: 'Alice Pool', avatar: '' }, visibility: 'public', sensitive: false, id: '11', content: 'Hey!', url: '', created_at: '2019-05-10T21:35:33.000Z' },
|
||||
{ account: { display_name: 'Alice Pool', avatar: '' }, visibility: 'unlisted', sensitive: true, id: '10', content: 'Bye!', url: '', created_at: '2019-05-10T21:00:33.000Z' }
|
||||
{ created_at: '2019-05-21T21:35:33.000Z', account: { nickname: 'benjamin', tags: [] }, actor: {}, state: 'open', id: '2', content: 'This is a report', statuses: [] },
|
||||
{ created_at: '2019-05-20T22:45:33.000Z', account: { nickname: 'alice', tags: [] }, actor: {}, state: 'resolved', id: '1', content: 'Please block this user', statuses: [] },
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { nickname: 'nick_keys', tags: [] }, actor: {}, state: 'closed', id: '3', content: '', statuses: [] },
|
||||
{ created_at: '2019-05-21T21:35:33.000Z', account: { nickname: 'benjamin', tags: [] }, actor: {}, state: 'open', id: '5', content: 'This is a report', statuses: [] },
|
||||
{ created_at: '2019-05-20T22:45:33.000Z', account: { nickname: 'alice', tags: [] }, actor: {}, state: 'resolved', id: '7', content: 'Please block this user', statuses: [
|
||||
{ account: { nickname: 'alice', avatar: '' }, visibility: 'public', sensitive: false, id: '11', content: 'Hey!', url: '', created_at: '2019-05-10T21:35:33.000Z' },
|
||||
{ account: { nickname: 'alice', avatar: '' }, visibility: 'unlisted', sensitive: true, id: '10', content: 'Bye!', url: '', created_at: '2019-05-10T21:00:33.000Z' }
|
||||
] },
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { display_name: 'Nick Keys', tags: [] }, actor: {}, state: 'closed', id: '6', content: '', statuses: [] },
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { display_name: 'Nick Keys', tags: [] }, actor: {}, state: 'closed', id: '4', content: '', statuses: [] }
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { nickname: 'nick_keys', tags: [] }, actor: {}, state: 'closed', id: '6', content: '', statuses: [] },
|
||||
{ created_at: '2019-05-18T13:01:33.000Z', account: { nickname: 'nick_keys', tags: [] }, actor: {}, state: 'closed', id: '4', content: '', statuses: [] }
|
||||
]
|
||||
|
||||
export async function fetchReports(filter, page, pageSize, authHost, token) {
|
||||
|
|
|
@ -13,7 +13,7 @@ export async function fetchStatusesByInstance({ instance, authHost, token, pageS
|
|||
? [{
|
||||
'account': {
|
||||
'avatar': 'http://localhost:4000/images/avi.png',
|
||||
'display_name': 'sky',
|
||||
'nickname': 'sky',
|
||||
'url': 'http://localhost:4000/users/sky'
|
||||
},
|
||||
'content': 'A nice young couple contacted us from Brazil to decorate their newly acquired apartment.',
|
||||
|
@ -29,7 +29,7 @@ export async function fetchStatusesByInstance({ instance, authHost, token, pageS
|
|||
{
|
||||
'account': {
|
||||
'avatar': 'http://localhost:4000/images/avi.png',
|
||||
'display_name': 'sky',
|
||||
'nickname': 'sky',
|
||||
'url': 'http://localhost:4000/users/sky'
|
||||
},
|
||||
'content': 'A nice young couple contacted us from Brazil to decorate their newly acquired apartment.',
|
||||
|
@ -42,7 +42,7 @@ export async function fetchStatusesByInstance({ instance, authHost, token, pageS
|
|||
{
|
||||
'account': {
|
||||
'avatar': 'http://localhost:4000/images/avi.png',
|
||||
'display_name': 'sky',
|
||||
'nickname': 'sky',
|
||||
'url': 'http://localhost:4000/users/sky'
|
||||
},
|
||||
'content': 'the happiest man ever',
|
||||
|
|
|
@ -4,7 +4,7 @@ export let users = [
|
|||
{ active: false, deactivated: true, id: 'abc', nickname: 'john', local: true, external: false, roles: { admin: false, moderator: false }, tags: ['strip_media'] }
|
||||
]
|
||||
|
||||
const userProfile = { avatar: 'avatar.jpg', display_name: 'Allis', 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 = []
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ describe('Statuses', () => {
|
|||
await flushPromises()
|
||||
|
||||
expect(wrapper.vm.selectedUsers.length).toEqual(1)
|
||||
expect(wrapper.vm.selectedUsers[0].display_name).toBe('sky')
|
||||
expect(wrapper.vm.selectedUsers[0].nickname).toBe('sky')
|
||||
done()
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue