e2e: add step definition for sending a chat mesage

This commit is contained in:
mahula 2025-05-06 21:31:51 +02:00
parent 2c9c2123c1
commit fcc956f809

View File

@ -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()
})