diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-12-11 18:47:59 +0100 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-12-11 18:55:07 +0100 | 
| commit | 1c20e06da5a9817c15c80ca5a25cfacf8eeb0485 (patch) | |
| tree | 0162c375602baa70e51d38bdec143dc645628e96 /tests/fixtures/wp-posts.fixture.ts | |
| parent | 93db24b7f7650abac1bb7095026e3a1f367b0c0a (diff) | |
test(services): add tests for createComment mutation
* add Jest test
* add a Cypress test in article pages spec
Diffstat (limited to 'tests/fixtures/wp-posts.fixture.ts')
| -rw-r--r-- | tests/fixtures/wp-posts.fixture.ts | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/tests/fixtures/wp-posts.fixture.ts b/tests/fixtures/wp-posts.fixture.ts index 7adc928..a512c51 100644 --- a/tests/fixtures/wp-posts.fixture.ts +++ b/tests/fixtures/wp-posts.fixture.ts @@ -174,4 +174,35 @@ export const wpPostsFixture = [      slug: '/post-4',      title: 'Post 4',    }, +  { +    acfPosts: null, +    author: { +      node: { +        name: 'Claudia78', +      }, +    }, +    commentCount: 1, +    contentParts: { +      afterMore: +        'Dolor quidem cumque animi consectetur consequuntur eos dolores porro reiciendis. Repellat tempore unde vel. Sed eos neque veritatis incidunt rerum totam molestiae consequatur. Voluptas laboriosam non atque. Ipsam nulla voluptate molestias ut. Doloremque reprehenderit id aut sequi totam sit assumenda et odit.', +      beforeMore: +        'In minus nihil ut. Et et exercitationem consequatur. Maiores neque voluptas mollitia ut. Doloremque reiciendis quam.', +    }, +    databaseId: 36, +    date: '2023-01-23', +    featuredImage: null, +    info: { +      wordsCount: 450, +    }, +    modified: '2023-01-23', +    seo: { +      metaDesc: 'Omnis quo commodi nam aut eum officiis veritatis eligendi.', +      title: 'non vel ad', +    }, +    /* I don't want to mock all the requests so I need an existing slug. The +     * solution is only temporary since if I write another article, I would +     * need to update the slug... */ +    slug: '/version-2022-bonjour-next-js', +    title: 'porro adipisci adipisci', +  },  ] satisfies WPPost[]; | 
