From c19438ec37d0f3d3ed0ff62b126f26d9e7584fa7 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Sun, 27 Feb 2022 09:26:28 +0100 Subject: [PATCH] test: remove "new" tests done using find . -name 'test.js' -exec git rm \{\} \; --- src/content/datachannel/basic/test/test.js | 37 --------------- .../datachannel/datatransfer/test/test.js | 24 ---------- .../datachannel/filetransfer/test/test.js | 29 ------------ src/content/devices/input-output/test/test.js | 31 ------------ src/content/getusermedia/gum/test/test.js | 20 -------- src/content/getusermedia/record/test/test.js | 23 --------- .../getusermedia/resolution/test/test.js | 32 ------------- src/content/peerconnection/audio/test/test.js | 20 -------- src/content/peerconnection/dtmf/test/test.js | 32 ------------- .../peerconnection/multiple/test/test.js | 31 ------------ .../peerconnection/munge-sdp/test/test.js | 47 ------------------- src/content/peerconnection/pc1/test/test.js | 36 -------------- .../perfect-negotiation/test/test.js | 36 -------------- .../peerconnection/restart-ice/test/test.js | 40 ---------------- .../peerconnection/trickle-ice/test/test.js | 21 --------- .../peerconnection/upgrade/test/test.js | 45 ------------------ 16 files changed, 504 deletions(-) delete mode 100644 src/content/datachannel/basic/test/test.js delete mode 100644 src/content/datachannel/datatransfer/test/test.js delete mode 100644 src/content/datachannel/filetransfer/test/test.js delete mode 100644 src/content/devices/input-output/test/test.js delete mode 100644 src/content/getusermedia/gum/test/test.js delete mode 100644 src/content/getusermedia/record/test/test.js delete mode 100644 src/content/getusermedia/resolution/test/test.js delete mode 100644 src/content/peerconnection/audio/test/test.js delete mode 100644 src/content/peerconnection/dtmf/test/test.js delete mode 100644 src/content/peerconnection/multiple/test/test.js delete mode 100644 src/content/peerconnection/munge-sdp/test/test.js delete mode 100644 src/content/peerconnection/pc1/test/test.js delete mode 100644 src/content/peerconnection/perfect-negotiation/test/test.js delete mode 100644 src/content/peerconnection/restart-ice/test/test.js delete mode 100644 src/content/peerconnection/trickle-ice/test/test.js delete mode 100644 src/content/peerconnection/upgrade/test/test.js diff --git a/src/content/datachannel/basic/test/test.js b/src/content/datachannel/basic/test/test.js deleted file mode 100644 index b4b4a0a5f..000000000 --- a/src/content/datachannel/basic/test/test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should transfer text over data channel': (browser) => { - const path = '/src/content/datachannel/basic/index.html'; - const url = 'file://' + process.cwd() + path; - - // Disable this until https://github.com/webrtc/samples/pull/1110 is merged - if (browser.options.desiredCapabilities.browserName === 'safari') { - browser.end(); - return; - } - - browser - .url(url) - .click('#startButton') - .expect.element('#sendButton').to.be.enabled.before(50); - browser.expect.element('#dataChannelSend').to.be.enabled.before(50); - - browser.setValue('#dataChannelSend', 'HELLO, WORLD!'); - browser - .click('#sendButton') - .pause(50) - .assert.value('#dataChannelReceive', 'HELLO, WORLD!'); - - browser - .click('#closeButton') - .expect.element('#sendButton').to.not.be.enabled.before(50); - - browser.end(); - } -}; \ No newline at end of file diff --git a/src/content/datachannel/datatransfer/test/test.js b/src/content/datachannel/datatransfer/test/test.js deleted file mode 100644 index 274d22f45..000000000 --- a/src/content/datachannel/datatransfer/test/test.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should transfer data over data channel': (browser) => { - const path = '/src/content/datachannel/datatransfer/index.html'; - const url = 'file://' + process.cwd() + path; - - // Disable this until https://github.com/webrtc/samples/pull/1110 is merged - if (browser.options.desiredCapabilities.browserName === 'safari') { - browser.end(); - return; - } - - browser.url(url).waitForElementVisible('#sendTheData'); - browser.click('#sendTheData'); - browser.expect.element('#transferStatus').text.to.equal('Data transfer completed successfully!'); - browser.end(); - } -}; diff --git a/src/content/datachannel/filetransfer/test/test.js b/src/content/datachannel/filetransfer/test/test.js deleted file mode 100644 index 5f932fe8b..000000000 --- a/src/content/datachannel/filetransfer/test/test.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ - -export default { - 'It should transfer a file over a datachannel': (browser) => { - const path = '/src/content/datachannel/filetransfer/index.html'; - const url = 'file://' + process.cwd() + path; - - // Disable this until https://github.com/webrtc/samples/pull/1110 is merged - if (browser.options.desiredCapabilities.browserName === 'safari') { - browser.end(); - return; - } - - browser.url(url).waitForElementVisible('#fileInput', 1000); - browser.waitForElementNotVisible('#download', 100, 'File download link is not visible'); - browser.expect.element('#sendFile').to.not.be.enabled.before(1000); - browser.setValue('#fileInput', process.cwd() + '/src/content/devices/multi/images/poster.jpg'); - browser.expect.element('#sendFile').to.be.enabled.before(1000); - browser.click('#sendFile'); - browser.waitForElementVisible('#download', 10000, 'File download link is visible'); - browser.end(); - } -}; \ No newline at end of file diff --git a/src/content/devices/input-output/test/test.js b/src/content/devices/input-output/test/test.js deleted file mode 100644 index 55ba589bf..000000000 --- a/src/content/devices/input-output/test/test.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should have select elements for each media device': (browser) => { - const path = '/src/content/devices/input-output/index.html'; - const url = 'file://' + process.cwd() + path; - - // audio output is't supported on Safari or Firefox - const browserName = browser.options.desiredCapabilities.browserName; - if (browserName === 'firefox' || browserName === 'safari') { - browser - .url(url) - .waitForElementVisible('#audioSource option:nth-of-type(1)', 1000, 'Check that there is at least one audio source') - .waitForElementVisible('#videoSource option:nth-of-type(1)', 1000, 'Check that there is at least one video source') - .end(); - return; - } - - browser - .url(url) - .waitForElementVisible('#audioSource option:nth-of-type(1)', 1000, 'Check that there is at least one audio source') - .waitForElementVisible('#audioOutput option:nth-of-type(1)', 1000, 'Check that there is at least one audio output') - .waitForElementVisible('#videoSource option:nth-of-type(1)', 1000, 'Check that there is at least one video source') - .end(); - } -}; \ No newline at end of file diff --git a/src/content/getusermedia/gum/test/test.js b/src/content/getusermedia/gum/test/test.js deleted file mode 100644 index 852759836..000000000 --- a/src/content/getusermedia/gum/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should have a video element': (browser) => { - const path = '/src/content/getusermedia/gum/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url) - .waitForElementVisible('button#showVideo', 1000) - .click('button#showVideo') - .waitForElementVisible('video') - .waitForMediaPlaybackReady('video', 5000) - .end(); - } -}; \ No newline at end of file diff --git a/src/content/getusermedia/record/test/test.js b/src/content/getusermedia/record/test/test.js deleted file mode 100644 index d9a1ffa14..000000000 --- a/src/content/getusermedia/record/test/test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'Recording of video is working.': (browser) => { - const path = '/src/content/getusermedia/record/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('button#record', 1000); - browser.click('button#record'); - browser.waitForReadyState('video#gum', 4, 5000); - browser.pause(1000); - browser.click('button#record'); - browser.expect.element('button#play').to.be.enabled.before(1000); - browser.click('button#play'); - browser.waitForReadyState('video#recorded', 4, 5000); - browser.end(); - } -}; \ No newline at end of file diff --git a/src/content/getusermedia/resolution/test/test.js b/src/content/getusermedia/resolution/test/test.js deleted file mode 100644 index e5f118ec2..000000000 --- a/src/content/getusermedia/resolution/test/test.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should have a video element with specific width': (browser) => { - const path = '/src/content/getusermedia/resolution/index.html'; - const url = 'file://' + process.cwd() + path; - - browser - .url(url) - .click('button#qvga') - .pause(500) - .waitForElementVisible('video', 5000) - .waitForMediaPlaybackReady('video', 10000) - .assert.videoWidth('video', 320, 'Video width is 320 wide.') - .click('button#vga') - .pause(500) - .waitForElementVisible('video', 5000) - .waitForMediaPlaybackReady('video', 10000) - .assert.videoWidth('video', 640, 'Video width is 640 wide.') - .click('button#hd') - .pause(500) - .waitForElementVisible('video', 5000) - .waitForMediaPlaybackReady('video', 10000) - .assert.videoWidth('video', 1280, 'Video width is 1280 wide.') - .end(); - } -}; \ No newline at end of file diff --git a/src/content/peerconnection/audio/test/test.js b/src/content/peerconnection/audio/test/test.js deleted file mode 100644 index c83b42013..000000000 --- a/src/content/peerconnection/audio/test/test.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should play audio remote': (browser) => { - const path = '/src/content/peerconnection/audio/index.html'; - const url = 'file://' + process.cwd() + path; - - // TODO Test all codecs? - browser - .url(url) - .click('#callButton') - .waitForMediaPlaybackReady('#audio2', 5000, 'Receiving remote audio.') - .end(); - } -}; \ No newline at end of file diff --git a/src/content/peerconnection/dtmf/test/test.js b/src/content/peerconnection/dtmf/test/test.js deleted file mode 100644 index ea0d40d98..000000000 --- a/src/content/peerconnection/dtmf/test/test.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -export default { - 'It should send DTMF codes': (browser) => { - const path = '/src/content/peerconnection/dtmf/index.html'; - const url = 'file://' + process.cwd() + path; - - if (browser.options.desiredCapabilities.browserName === 'safari') { - browser.end(); - return; - } - - browser - .url(url) - .click('#callButton') - .waitForMediaPlaybackReady('audio', 1000, 'Receiving remote audio.') - .useXpath() - .click('/html/body/div/div[@id=\'dialPad\']/div[1]/button[1]') // 1 - .click('/html/body/div/div[@id=\'dialPad\']/div[3]/button[1]') // 9 - .click('/html/body/div/div[@id=\'dialPad\']/div[3]/button[4]') // # - .click('/html/body/div/div[@id=\'dialPad\']/div[4]/button[1]') // A - .useCss() - .assert.value('input#sentTones', '1 9 # A ') - .click('#hangupButton') - .end(); - } -}; diff --git a/src/content/peerconnection/multiple/test/test.js b/src/content/peerconnection/multiple/test/test.js deleted file mode 100644 index 24e4eeb1c..000000000 --- a/src/content/peerconnection/multiple/test/test.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ - -'use strict'; -export default { - 'Video and buttons state change during multiple peer connection setup': (browser) => { - const path = '/src/content/peerconnection/multiple/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#startButton', 1000, 'Check that the start button is visible'); - browser.waitForReadyState('#video1', 0, 1000); - browser.waitForReadyState('#video2', 0, 1000); - browser.waitForReadyState('#video3', 0, 1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.click('#startButton'); - browser.waitForReadyState('#video1', 4, 1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#callButton'); - browser.waitForReadyState('#video2', 4, 1000); - browser.waitForReadyState('#video3', 4, 1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/munge-sdp/test/test.js b/src/content/peerconnection/munge-sdp/test/test.js deleted file mode 100644 index 158918bf1..000000000 --- a/src/content/peerconnection/munge-sdp/test/test.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ - -'use strict'; -export default { - 'Checking element state during manual signalling': (browser) => { - const path = '/src/content/peerconnection/munge-sdp/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#getMedia', 1000, 'Check that the getMedia button is visible'); - browser.expect.element('#createPeerConnection').to.not.be.enabled.before(1000); - browser.expect.element('#createOffer').to.not.be.enabled.before(1000); - browser.expect.element('#setOffer').to.not.be.enabled.before(1000); - browser.expect.element('#createAnswer').to.not.be.enabled.before(1000); - browser.expect.element('#setAnswer').to.not.be.enabled.before(1000); - browser.expect.element('#hangup').to.not.be.enabled.before(1000); - browser.click('#getMedia'); - browser.waitForMediaPlaybackReady('div#local video', 5000); - browser.expect.element('#createPeerConnection').to.be.enabled.before(1000); - browser.click('#createPeerConnection'); - browser.expect.element('#createOffer').to.be.enabled.before(1000); - browser.expect.element('#setOffer').to.be.enabled.before(1000); - browser.expect.element('#createAnswer').to.be.enabled.before(1000); - browser.expect.element('#setAnswer').to.be.enabled.before(1000); - browser.expect.element('#hangup').to.be.enabled.before(1000); - browser - .click('#createOffer') - .click('#setOffer') - .click('#createAnswer') - .click('#setAnswer'); - browser.waitForMediaPlaybackReady('div#remote video', 5000); - browser.click('#hangup'); - browser.expect.element('#createPeerConnection').to.not.be.enabled.before(1000); - browser.expect.element('#createOffer').to.not.be.enabled.before(1000); - browser.expect.element('#setOffer').to.not.be.enabled.before(1000); - browser.expect.element('#createAnswer').to.not.be.enabled.before(1000); - browser.expect.element('#setAnswer').to.not.be.enabled.before(1000); - browser.expect.element('#hangup').to.not.be.enabled.before(1000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/pc1/test/test.js b/src/content/peerconnection/pc1/test/test.js deleted file mode 100644 index 8244b9872..000000000 --- a/src/content/peerconnection/pc1/test/test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ -'use strict'; -export default { - 'It should have select elements for each media device': (browser) => { - const path = '/src/content/peerconnection/pc1/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#startButton', 1000, 'Check that the startButton button is visible'); - browser.waitForReadyState('#localVideo', 0, 1000); - browser.waitForReadyState('#remoteVideo', 0, 1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#startButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.waitForReadyState('#localVideo', 4, 1000); - browser.click('#callButton'); - browser.waitForReadyState('#remoteVideo', 4, 1000); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.click('#hangupButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/perfect-negotiation/test/test.js b/src/content/peerconnection/perfect-negotiation/test/test.js deleted file mode 100644 index 9319a83a8..000000000 --- a/src/content/peerconnection/perfect-negotiation/test/test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ -'use strict'; -export default { - 'It should have select elements for each media device': (browser) => { - const path = '/src/content/peerconnection/perfect-negotiation/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#startButton', 1000, 'Check that the startButton button is visible'); - browser.waitForReadyState('#localVideo', 0, 1000); - browser.waitForReadyState('#remoteVideo', 0, 1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#startButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.waitForReadyState('#localVideo', 4, 1000); - browser.click('#callButton'); - browser.waitForReadyState('#remoteVideo', 4, 1000); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.click('#hangupButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/restart-ice/test/test.js b/src/content/peerconnection/restart-ice/test/test.js deleted file mode 100644 index 7b980de89..000000000 --- a/src/content/peerconnection/restart-ice/test/test.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ -'use strict'; -export default { - 'Checking the state of buttons, video, and the changing of the candidate ID at during ICE restart.': (browser) => { - const path = '/src/content/peerconnection/restart-ice/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#startButton', 1000, 'Check that the startButton button is visible'); - browser.waitForReadyState('#localVideo', 0, 1000); - browser.expect.element('#localCandidateId').to.have.value.that.equals(null); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#restartButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#startButton'); - browser.waitForReadyState('#localVideo', 4, 1000); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#restartButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#callButton'); - browser.waitForReadyState('#remoteVideo', 4, 1000); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#restartButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.click('#hangupButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#restartButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/trickle-ice/test/test.js b/src/content/peerconnection/trickle-ice/test/test.js deleted file mode 100644 index 5bfb5caf7..000000000 --- a/src/content/peerconnection/trickle-ice/test/test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ -'use strict'; -export default { - 'Checking that the ICE candidates are populated when the button is pressed.': (browser) => { - const path = '/src/content/peerconnection/trickle-ice/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#gather', 1000, 'Check that the gather candidate button is visible'); - browser.expect.element('tbody#candidatesBody tr:first-child').to.not.be.present.before(100); - browser.click('#gather'); - browser.expect.element('tbody#candidatesBody tr:first-child').to.be.visible.before(5000); - browser.end(); - } -}; diff --git a/src/content/peerconnection/upgrade/test/test.js b/src/content/peerconnection/upgrade/test/test.js deleted file mode 100644 index a8696a878..000000000 --- a/src/content/peerconnection/upgrade/test/test.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. - */ -/* eslint-env node */ -'use strict'; -export default { - 'Checking that video is enabled when call is upgraded': (browser) => { - const path = '/src/content/peerconnection/upgrade/index.html'; - const url = 'file://' + process.cwd() + path; - - browser.url(url).waitForElementVisible('#startButton', 1000, 'Check that the start button is visible'); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#upgradeButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.waitForReadyState('#localVideo', 0, 1000); - browser.waitForReadyState('#remoteVideo', 0, 1000); - browser.click('#startButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#upgradeButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.click('#callButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#upgradeButton').to.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.click('#upgradeButton'); - browser.waitForReadyState('#localVideo', 4, 5000); - browser.waitForReadyState('#remoteVideo', 4, 5000); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.not.be.enabled.before(1000); - browser.expect.element('#upgradeButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.be.enabled.before(1000); - browser.click('#hangupButton'); - browser.expect.element('#startButton').to.not.be.enabled.before(1000); - browser.expect.element('#callButton').to.be.enabled.before(1000); - browser.expect.element('#upgradeButton').to.not.be.enabled.before(1000); - browser.expect.element('#hangupButton').to.not.be.enabled.before(1000); - browser.end(); - } -};