26 lines
687 B
JavaScript
26 lines
687 B
JavaScript
import {getMinimalMe} from '../../../support/helpers';
|
|
|
|
describe('Article page', () => {
|
|
const operations = {
|
|
MeQuery: getMinimalMe({}),
|
|
RoomEntryQuery: {}
|
|
};
|
|
|
|
beforeEach(() => {
|
|
cy.setup();
|
|
});
|
|
|
|
it('goes to article and leaves a comment', () => {
|
|
cy.mockGraphqlOps({
|
|
operations
|
|
});
|
|
|
|
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('submit-comment').should('contain', 'Kommentar teilen').click();
|
|
cy.getByDataCy('comment').first().should('contain', commentText);
|
|
});
|
|
});
|