Use TALK_ROOT_URL, global timeout, other improvements

This commit is contained in:
Chi Vinh Le
2017-10-11 21:02:46 +07:00
parent cde3c4e17e
commit e4399b734e
3 changed files with 15 additions and 4 deletions
+10 -3
View File
@@ -1,6 +1,13 @@
const uuid = require('uuid');
const {murmur3} = require('murmurhash-js');
const iframeId = 'coralStreamEmbed_iframe';
const $ = {
streamEmbedIframe: `#${iframeId}`,
streamTabContainer: '.talk-stream-tab-container',
};
module.exports = {
'Creates a new asset': (client) => {
const assetTitle = `test@${murmur3(uuid.v4())}`;
@@ -8,9 +15,9 @@ module.exports = {
client
.url(`${client.launchUrl}/assets/title/${assetTitle}`)
.assert.title(assetTitle)
.waitForElementVisible('#coralStreamEmbed_iframe', 1000)
.frame('coralStreamEmbed_iframe')
.waitForElementVisible('.talk-stream-tab-container', 1000)
.waitForElementVisible($.streamEmbedIframe)
.frame(iframeId)
.waitForElementVisible($.streamTabContainer)
.frameParent()
.end();
}