From fcc956f809487d669af8d77983ae68e034948cf8 Mon Sep 17 00:00:00 2001 From: mahula Date: Tue, 6 May 2025 21:31:51 +0200 Subject: [PATCH] e2e: add step definition for sending a chat mesage --- .../I_send_a_chat_message_to{string}.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cypress/support/step_definitions/Chat.Message.Notification/I_send_a_chat_message_to{string}.js diff --git a/cypress/support/step_definitions/Chat.Message.Notification/I_send_a_chat_message_to{string}.js b/cypress/support/step_definitions/Chat.Message.Notification/I_send_a_chat_message_to{string}.js new file mode 100644 index 000000000..794c2539e --- /dev/null +++ b/cypress/support/step_definitions/Chat.Message.Notification/I_send_a_chat_message_to{string}.js @@ -0,0 +1,22 @@ +import { defineStep } from '@badeball/cypress-cucumber-preprocessor' +import 'cypress-network-idle' + +defineStep('I send a chat message to {string}', (recipientName) => { + cy.visit('/chat') + cy.waitForNetworkIdle(2000) + cy.get('vue-advanced-chat') + .should('be.visible') + cy.get('.vac-add-icon') + .click() + cy.wait(500) + cy.get('#search-user-to-add-to-group') + // .clear() + .type(recipientName) + cy.get('.ds-select-option') + .contains(recipientName) + .click() + cy.get('#roomTextarea') + .type('Hey there!') + cy.get('#vac-icon-send') + .click() +}) \ No newline at end of file