mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Test locations in group resolvers
This commit is contained in:
parent
a52c3b488e
commit
57f7a43d09
@ -42,7 +42,12 @@ export const createGroupMutation = gql`
|
||||
name
|
||||
icon
|
||||
}
|
||||
# locationName # test this as result
|
||||
locationName
|
||||
location {
|
||||
name
|
||||
nameDE
|
||||
nameEN
|
||||
}
|
||||
myRole
|
||||
}
|
||||
}
|
||||
@ -89,7 +94,12 @@ export const updateGroupMutation = gql`
|
||||
icon
|
||||
}
|
||||
# avatar # test this as result
|
||||
# locationName # test this as result
|
||||
locationName
|
||||
location {
|
||||
name
|
||||
nameDE
|
||||
nameEN
|
||||
}
|
||||
myRole
|
||||
}
|
||||
}
|
||||
@ -154,7 +164,12 @@ export const groupQuery = gql`
|
||||
avatar {
|
||||
url
|
||||
}
|
||||
# locationName # test this as result
|
||||
locationName
|
||||
location {
|
||||
name
|
||||
nameDE
|
||||
nameEN
|
||||
}
|
||||
myRole
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ describe('in mode', () => {
|
||||
groupType: 'public',
|
||||
actionRadius: 'regional',
|
||||
categoryIds,
|
||||
// locationName, // test this as result
|
||||
locationName: 'Hamburg, Germany',
|
||||
}
|
||||
})
|
||||
|
||||
@ -304,6 +304,12 @@ describe('in mode', () => {
|
||||
description: 'Some description' + descriptionAdditional100,
|
||||
groupType: 'public',
|
||||
actionRadius: 'regional',
|
||||
locationName: 'Hamburg, Germany',
|
||||
location: expect.objectContaining({
|
||||
name: 'Hamburg',
|
||||
nameDE: 'Hamburg',
|
||||
nameEN: 'Hamburg',
|
||||
}),
|
||||
},
|
||||
},
|
||||
errors: undefined,
|
||||
@ -539,6 +545,7 @@ describe('in mode', () => {
|
||||
groupType: 'public',
|
||||
actionRadius: 'regional',
|
||||
categoryIds,
|
||||
locationName: 'Hamburg, Germany',
|
||||
},
|
||||
})
|
||||
})
|
||||
@ -554,6 +561,12 @@ describe('in mode', () => {
|
||||
expect.objectContaining({
|
||||
id: 'my-group',
|
||||
slug: 'the-best-group',
|
||||
locationName: 'Hamburg, Germany',
|
||||
location: expect.objectContaining({
|
||||
name: 'Hamburg',
|
||||
nameDE: 'Hamburg',
|
||||
nameEN: 'Hamburg',
|
||||
}),
|
||||
myRole: 'owner',
|
||||
}),
|
||||
expect.objectContaining({
|
||||
@ -2642,6 +2655,7 @@ describe('in mode', () => {
|
||||
groupType: 'public',
|
||||
actionRadius: 'regional',
|
||||
categoryIds,
|
||||
locationName: 'Hamburg, Germany',
|
||||
},
|
||||
})
|
||||
})
|
||||
@ -2663,7 +2677,7 @@ describe('in mode', () => {
|
||||
description: 'Some country relevant description' + descriptionAdditional100,
|
||||
actionRadius: 'national',
|
||||
// avatar, // test this as result
|
||||
// locationName, // test this as result
|
||||
locationName: 'Berlin, Germany',
|
||||
},
|
||||
}),
|
||||
).resolves.toMatchObject({
|
||||
@ -2676,7 +2690,12 @@ describe('in mode', () => {
|
||||
description: 'Some country relevant description' + descriptionAdditional100,
|
||||
actionRadius: 'national',
|
||||
// avatar, // test this as result
|
||||
// locationName, // test this as result
|
||||
locationName: 'Berlin, Germany',
|
||||
location: expect.objectContaining({
|
||||
name: 'Berlin',
|
||||
nameDE: 'Berlin',
|
||||
nameEN: 'Berlin',
|
||||
}),
|
||||
myRole: 'owner',
|
||||
},
|
||||
},
|
||||
|
||||
@ -12,6 +12,7 @@ export const userFragment = gql`
|
||||
deleted
|
||||
}
|
||||
`
|
||||
|
||||
export const locationAndBadgesFragment = (lang) => gql`
|
||||
fragment locationAndBadges on User {
|
||||
location {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user