mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix wrong implementation of cucumber test
This commit is contained in:
parent
d9d7c38800
commit
5d440d2e5b
@ -4,6 +4,7 @@ import uuid from 'uuid/v4'
|
|||||||
export default function (params) {
|
export default function (params) {
|
||||||
const {
|
const {
|
||||||
id = uuid(),
|
id = uuid(),
|
||||||
|
slug = '',
|
||||||
title = faker.lorem.sentence(),
|
title = faker.lorem.sentence(),
|
||||||
content = [
|
content = [
|
||||||
faker.lorem.sentence(),
|
faker.lorem.sentence(),
|
||||||
@ -21,6 +22,7 @@ export default function (params) {
|
|||||||
mutation {
|
mutation {
|
||||||
CreatePost(
|
CreatePost(
|
||||||
id: "${id}",
|
id: "${id}",
|
||||||
|
slug: "${slug}",
|
||||||
title: "${title}",
|
title: "${title}",
|
||||||
content: "${content}",
|
content: "${content}",
|
||||||
image: "${image}",
|
image: "${image}",
|
||||||
|
|||||||
@ -30,7 +30,7 @@ export default {
|
|||||||
error,
|
error,
|
||||||
app: { apolloProvider }
|
app: { apolloProvider }
|
||||||
} = context
|
} = context
|
||||||
const idOrSlug = id
|
const idOrSlug = id || slug
|
||||||
|
|
||||||
const variables = { idOrSlug }
|
const variables = { idOrSlug }
|
||||||
const client = apolloProvider.defaultClient
|
const client = apolloProvider.defaultClient
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user