From d360bb99e276d59dda3e1b29064c793094d217bd Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Thu, 3 Nov 2022 11:16:15 +0100 Subject: [PATCH] openvidu-components: Added e2e test for testing url message --- .../e2e/webcomponent.test.ts | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/openvidu-components-angular/e2e/webcomponent.test.ts b/openvidu-components-angular/e2e/webcomponent.test.ts index e84002ad..bfd890c0 100644 --- a/openvidu-components-angular/e2e/webcomponent.test.ts +++ b/openvidu-components-angular/e2e/webcomponent.test.ts @@ -1280,6 +1280,52 @@ describe('Testing panels', () => { }); }); +describe('Testing CHAT features', () => { + let browser: WebDriver; + let utils: OpenViduComponentsPO; + + async function createChromeBrowser(): Promise { + return await new Builder() + .forBrowser(WebComponentConfig.browserName) + .withCapabilities(WebComponentConfig.browserCapabilities) + .setChromeOptions(WebComponentConfig.browserOptions) + .usingServer(WebComponentConfig.seleniumAddress) + .build(); + } + + beforeEach(async () => { + browser = await createChromeBrowser(); + utils = new OpenViduComponentsPO(browser); + }); + + afterEach(async () => { + await browser.quit(); + }); + + it('should send an url message and converts in a link', async () => { + await browser.get(`${url}?prejoin=false`); + + await utils.checkLayoutPresent(); + + const chatButton = await utils.waitForElement('#chat-panel-btn'); + await chatButton.click(); + + await utils.waitForElement('.sidenav-menu'); + await utils.waitForElement('.input-container'); + expect(await utils.isPresent('.input-container')).to.be.true; + + + const input = await utils.waitForElement('#chat-input'); + await input.sendKeys('demos.openvidu.io'); + + await utils.clickOn('#send-btn'); + + await utils.waitForElement('.msg-content a'); + expect(await utils.isPresent('.msg-content a')).to.be.true; + }); +}); + + describe('Testing captions features', () => { let browser: WebDriver; let utils: OpenViduComponentsPO;