From 741073c187a8188ae11f63e66066effeea7d24b2 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 19 Aug 2021 16:49:45 +0200 Subject: [PATCH] Add emoji bar and comment input to article view --- .../frontend/rooms/article-page.spec.js | 6 +-- client/src/components/rooms/CommentInput.vue | 40 +++++++++++++++++++ client/src/pages/article.vue | 5 +++ client/src/styles/_mixins.scss | 21 ++++++++++ 4 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 client/src/components/rooms/CommentInput.vue diff --git a/client/cypress/integration/frontend/rooms/article-page.spec.js b/client/cypress/integration/frontend/rooms/article-page.spec.js index f0d3398f..f9926d9b 100644 --- a/client/cypress/integration/frontend/rooms/article-page.spec.js +++ b/client/cypress/integration/frontend/rooms/article-page.spec.js @@ -15,10 +15,10 @@ describe('Article page', () => { operations }); - const commentText = 'First!'; + const commentText = 'First! 🖐️'; cy.visit('/article/this-article-has-a-slug'); - cy.getByDataCy('emoji-button').should('have.length', 9); - cy.getByDataCy('add-comment-input').type(commentText); + cy.getByDataCy('comment-textarea').type(commentText); + cy.getByDataCy('emoji-button').should('have.length', 9).first().click(); cy.getByDataCy('submit-comment').should('contain', 'Kommentar teilen').click(); cy.getByDataCy('comment').first().should('contain', commentText); }); diff --git a/client/src/components/rooms/CommentInput.vue b/client/src/components/rooms/CommentInput.vue new file mode 100644 index 00000000..c1d557e7 --- /dev/null +++ b/client/src/components/rooms/CommentInput.vue @@ -0,0 +1,40 @@ +