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
+1
View File
@@ -17,6 +17,7 @@ client/coral-framework/graphql/introspection.json
coverage/
test/e2e/tests_output/
test/e2e/bslocal.log
browserstack.err
plugins.json
plugins/*
+4 -1
View File
@@ -10,7 +10,10 @@ const nightwatch_config = {
test_settings: {
default: {
launch_url: process.env.E2E_LAUNCH_URL || 'http://localhost:3000',
globals: {
waitForConditionTimeout: 5000,
},
launch_url: process.env.TALK_ROOT_URL || 'http://localhost:3000',
desiredCapabilities: {
'browserstack.user': process.env.BROWSERSTACK_USER || 'coralproject2',
'browserstack.key': process.env.BROWSERSTACK_KEY,
+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();
}