import {getMinimalMe} from '../../../support/helpers'; describe('Article page', () => { const slug = 'this-article-has-a-slug'; const operations = { MeQuery: getMinimalMe({}), RoomEntryQuery: { roomEntry: { slug, id: 'room-entry-id', title: 'Some Room Entry, yay!', comments: { edges: [], }, }, }, }; beforeEach(() => { cy.setup(); }); it('goes to article and leaves a comment', () => { cy.mockGraphqlOps({ operations, }); const commentText = 'First! 🖐️'; cy.visit(`/article/${slug}`); 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); }); });