describe('The Room Page', () => {
  it('displays new room entry with author name', () => {
    // todo: mock all the graphql queries and mutations

    cy.viewport('macbook-15');
    cy.apolloLogin('rahel.cueni', 'test');
    cy.visit('/room/ein-historisches-festival');

    cy.get('[data-cy=add-room-entry-button]').click();
    cy.get('.add-content-element:first-of-type').click();
    cy.get('[data-cy=choose-text-widget]').click();
    cy.get('[data-cy=modal-title-input] > .modal-input__inputfield').type('some title');

    let text = 'something should be here';
    cy.get('[data-cy=text-form-input]').type(text);
    cy.get('[data-cy=modal-save-button]').click();

    cy.get('.room-entry__content:first').should('contain', text).should('contain', 'Rahel Cueni');
  });
});
