Files
monica/tests/cypress/integration/contacts/conversations_spec.js
T
2020-03-20 08:17:59 +01:00

28 lines
909 B
JavaScript
Vendored

describe('Conversations', function () {
beforeEach(function () {
cy.login();
cy.createContact('John', 'Doe', 'Man');
});
it('lets you manage a conversation', function () {
cy.get('[cy-name=conversation-blank-state]').should('be.visible');
// add a conversation
cy.visit('/people');
// this gets the first content of the list
cy.get('tr.people-list-item.bg-white.pointer').click();
cy.get('[cy-name=add-conversation-button]').should('be.visible');
cy.get('[cy-name=add-conversation-button]').click();
cy.url().should('include', '/conversations/create');
cy.get('[name=contactFieldTypeId]').select('Phone');
cy.get('[name=content_1]').type('This is a message');
cy.get('[cy-name=save-conversation-button]').click();
cy.url().should('include', '/people/h:');
cy.get('[cy-name=conversation-blank-state]').should('not.be.visible');
});
});