mirror of
https://github.com/wassname/talk.git
synced 2026-07-08 01:07:38 +08:00
Use TALK_ROOT_URL, global timeout, other improvements
This commit is contained in:
@@ -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
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user