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