vertinho
Version:
Library to make conference apps and softphones through WebSockets with FreeSWITCH mod_verto.
26 lines (23 loc) • 809 B
JavaScript
const Nightmare = require('nightmare');
const run = async (done) => {
Nightmare({ show: process.env.SHOW_NIGHTMARE })
.wait(2000)
.goto('http://localhost:8080/demo/')
.click('#create-verto-btn')
.click('#call-btn')
.wait('#remote-video')
.wait(() => document.querySelector('#remote-video').paused === false)
.wait(() => document.querySelector('#local-video-from-remote').paused === false)
.wait(Number(process.env.WAIT_AFTER_CALL || 0))
.click('#hangup-btn')
.wait(() => document.querySelector('#remote-video').paused === true)
.wait(() => document.querySelector('#local-video-from-remote').paused === true)
.end()
.then(done);
};
try {
jest.setTimeout(10 * 1000);
test('Call and hangout by demo UI', run);
} catch (err) {
run(() => undefined);
}