aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cypress/e2e/pages/article.cy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cypress/e2e/pages/article.cy.ts')
-rw-r--r--tests/cypress/e2e/pages/article.cy.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cypress/e2e/pages/article.cy.ts b/tests/cypress/e2e/pages/article.cy.ts
index cf64015..abe6629 100644
--- a/tests/cypress/e2e/pages/article.cy.ts
+++ b/tests/cypress/e2e/pages/article.cy.ts
@@ -46,4 +46,17 @@ describe('Article', () => {
'exist'
);
});
+
+ it('can submit a new comment', () => {
+ const comment = {
+ author: 'Jerome37',
+ email: 'Etha19@example.net',
+ content: 'Commodi sed quia.',
+ };
+ cy.findByRole('textbox', { name: /Nom/ }).type(comment.author);
+ cy.findByRole('textbox', { name: /E-mail/ }).type(comment.email);
+ cy.findByRole('textbox', { name: /Commentaire/ }).type(comment.content);
+ cy.findByRole('button', { name: /Publier/ }).click();
+ cy.findByText(/Merci/i).should('be.visible');
+ });
});