mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Test 'descriptionExcerpt' in all relevant group resolvers
This commit is contained in:
parent
e53e502587
commit
bba4ca0fc6
@ -35,7 +35,7 @@ export const createGroupMutation = () => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
# descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
@ -89,7 +89,7 @@ export const updateGroupMutation = () => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
# descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
@ -165,7 +165,7 @@ export const groupQuery = () => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
# descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
|
||||
@ -303,6 +303,7 @@ describe('in mode', () => {
|
||||
slug: 'the-group',
|
||||
about: 'We will change the world!',
|
||||
description: 'Some description' + descriptionAdditional100,
|
||||
descriptionExcerpt: 'Some description' + descriptionAdditional100,
|
||||
groupType: 'public',
|
||||
actionRadius: 'regional',
|
||||
locationName: 'Hamburg, Germany',
|
||||
@ -553,7 +554,7 @@ describe('in mode', () => {
|
||||
describe('query groups', () => {
|
||||
describe('in general finds only listed groups – no hidden groups where user is none or pending member', () => {
|
||||
describe('without any filters', () => {
|
||||
it('finds all listed groups – including the set locations', async () => {
|
||||
it('finds all listed groups – including the set descriptionExcerpts and locations', async () => {
|
||||
const result = await query({ query: groupQuery(), variables: {} })
|
||||
expect(result).toMatchObject({
|
||||
data: {
|
||||
@ -561,6 +562,7 @@ describe('in mode', () => {
|
||||
expect.objectContaining({
|
||||
id: 'my-group',
|
||||
slug: 'the-best-group',
|
||||
descriptionExcerpt: 'Some description' + descriptionAdditional100,
|
||||
locationName: 'Hamburg, Germany',
|
||||
location: expect.objectContaining({
|
||||
name: 'Hamburg',
|
||||
@ -572,6 +574,7 @@ describe('in mode', () => {
|
||||
expect.objectContaining({
|
||||
id: 'others-group',
|
||||
slug: 'uninteresting-group',
|
||||
descriptionExcerpt: 'We love it like it is!?' + descriptionAdditional100,
|
||||
locationName: null,
|
||||
location: null,
|
||||
myRole: null,
|
||||
@ -579,6 +582,7 @@ describe('in mode', () => {
|
||||
expect.objectContaining({
|
||||
id: 'third-hidden-group',
|
||||
slug: 'third-investigative-journalism-group',
|
||||
descriptionExcerpt: 'We research …' + descriptionAdditional100,
|
||||
myRole: 'usual',
|
||||
locationName: null,
|
||||
location: null,
|
||||
@ -2713,6 +2717,8 @@ describe('in mode', () => {
|
||||
slug: 'the-new-group-for-our-country', // changing the slug is tested in the slugifyMiddleware
|
||||
about: 'We will change the land!',
|
||||
description: 'Some country relevant description' + descriptionAdditional100,
|
||||
descriptionExcerpt:
|
||||
'Some country relevant description' + descriptionAdditional100,
|
||||
actionRadius: 'national',
|
||||
// avatar, // test this as result
|
||||
myRole: 'owner',
|
||||
|
||||
@ -35,7 +35,7 @@ export const createGroupMutation = () => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
# descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
@ -44,7 +44,7 @@ export const createGroupMutation = () => {
|
||||
name
|
||||
icon
|
||||
}
|
||||
locationName # test this as result
|
||||
locationName
|
||||
myRole
|
||||
}
|
||||
}
|
||||
@ -84,7 +84,7 @@ export const updateGroupMutation = () => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
@ -94,7 +94,7 @@ export const updateGroupMutation = () => {
|
||||
icon
|
||||
}
|
||||
# avatar # test this as result
|
||||
locationName # test this as result
|
||||
locationName
|
||||
myRole
|
||||
}
|
||||
}
|
||||
@ -156,7 +156,7 @@ export const groupQuery = (i18n) => {
|
||||
deleted
|
||||
about
|
||||
description
|
||||
descriptionExcerpt # test this as result
|
||||
descriptionExcerpt
|
||||
groupType
|
||||
actionRadius
|
||||
categories {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user