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
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
# descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
@ -89,7 +89,7 @@ export const updateGroupMutation = () => {
|
|||||||
deleted
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
# descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
@ -165,7 +165,7 @@ export const groupQuery = () => {
|
|||||||
deleted
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
# descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
|
|||||||
@ -303,6 +303,7 @@ describe('in mode', () => {
|
|||||||
slug: 'the-group',
|
slug: 'the-group',
|
||||||
about: 'We will change the world!',
|
about: 'We will change the world!',
|
||||||
description: 'Some description' + descriptionAdditional100,
|
description: 'Some description' + descriptionAdditional100,
|
||||||
|
descriptionExcerpt: 'Some description' + descriptionAdditional100,
|
||||||
groupType: 'public',
|
groupType: 'public',
|
||||||
actionRadius: 'regional',
|
actionRadius: 'regional',
|
||||||
locationName: 'Hamburg, Germany',
|
locationName: 'Hamburg, Germany',
|
||||||
@ -553,7 +554,7 @@ describe('in mode', () => {
|
|||||||
describe('query groups', () => {
|
describe('query groups', () => {
|
||||||
describe('in general finds only listed groups – no hidden groups where user is none or pending member', () => {
|
describe('in general finds only listed groups – no hidden groups where user is none or pending member', () => {
|
||||||
describe('without any filters', () => {
|
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: {} })
|
const result = await query({ query: groupQuery(), variables: {} })
|
||||||
expect(result).toMatchObject({
|
expect(result).toMatchObject({
|
||||||
data: {
|
data: {
|
||||||
@ -561,6 +562,7 @@ describe('in mode', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: 'my-group',
|
id: 'my-group',
|
||||||
slug: 'the-best-group',
|
slug: 'the-best-group',
|
||||||
|
descriptionExcerpt: 'Some description' + descriptionAdditional100,
|
||||||
locationName: 'Hamburg, Germany',
|
locationName: 'Hamburg, Germany',
|
||||||
location: expect.objectContaining({
|
location: expect.objectContaining({
|
||||||
name: 'Hamburg',
|
name: 'Hamburg',
|
||||||
@ -572,6 +574,7 @@ describe('in mode', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: 'others-group',
|
id: 'others-group',
|
||||||
slug: 'uninteresting-group',
|
slug: 'uninteresting-group',
|
||||||
|
descriptionExcerpt: 'We love it like it is!?' + descriptionAdditional100,
|
||||||
locationName: null,
|
locationName: null,
|
||||||
location: null,
|
location: null,
|
||||||
myRole: null,
|
myRole: null,
|
||||||
@ -579,6 +582,7 @@ describe('in mode', () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: 'third-hidden-group',
|
id: 'third-hidden-group',
|
||||||
slug: 'third-investigative-journalism-group',
|
slug: 'third-investigative-journalism-group',
|
||||||
|
descriptionExcerpt: 'We research …' + descriptionAdditional100,
|
||||||
myRole: 'usual',
|
myRole: 'usual',
|
||||||
locationName: null,
|
locationName: null,
|
||||||
location: 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
|
slug: 'the-new-group-for-our-country', // changing the slug is tested in the slugifyMiddleware
|
||||||
about: 'We will change the land!',
|
about: 'We will change the land!',
|
||||||
description: 'Some country relevant description' + descriptionAdditional100,
|
description: 'Some country relevant description' + descriptionAdditional100,
|
||||||
|
descriptionExcerpt:
|
||||||
|
'Some country relevant description' + descriptionAdditional100,
|
||||||
actionRadius: 'national',
|
actionRadius: 'national',
|
||||||
// avatar, // test this as result
|
// avatar, // test this as result
|
||||||
myRole: 'owner',
|
myRole: 'owner',
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export const createGroupMutation = () => {
|
|||||||
deleted
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
# descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
@ -44,7 +44,7 @@ export const createGroupMutation = () => {
|
|||||||
name
|
name
|
||||||
icon
|
icon
|
||||||
}
|
}
|
||||||
locationName # test this as result
|
locationName
|
||||||
myRole
|
myRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ export const updateGroupMutation = () => {
|
|||||||
deleted
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
@ -94,7 +94,7 @@ export const updateGroupMutation = () => {
|
|||||||
icon
|
icon
|
||||||
}
|
}
|
||||||
# avatar # test this as result
|
# avatar # test this as result
|
||||||
locationName # test this as result
|
locationName
|
||||||
myRole
|
myRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ export const groupQuery = (i18n) => {
|
|||||||
deleted
|
deleted
|
||||||
about
|
about
|
||||||
description
|
description
|
||||||
descriptionExcerpt # test this as result
|
descriptionExcerpt
|
||||||
groupType
|
groupType
|
||||||
actionRadius
|
actionRadius
|
||||||
categories {
|
categories {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user