mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-17 18:31:29 +00:00
e2e: add step definition for sending a chat mesage
This commit is contained in:
parent
2c9c2123c1
commit
fcc956f809
@ -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()
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user