Improve demo video

This commit is contained in:
Thomas Nordquist
2019-05-01 02:37:06 +02:00
parent ebdfac39eb
commit 10e37624a5
4 changed files with 22 additions and 17 deletions

View File

@@ -57,12 +57,7 @@ async function doStuff() {
// Wait for Username input to be visible
let inputField = undefined
let start = Date.now()
let maxWaitDuration = 30000
while ((!inputField || !inputField.isExisting) && ((Date.now() - start) < maxWaitDuration)) {
inputField = await browser.$(`//label[contains(text(), "Username")]/..//input`)
}
await browser.$('//label[contains(text(), "Username")]/..//input')
const scenes = new SceneBuilder()
await scenes.record('connect', async () => {
await connectTo('127.0.0.1', browser)
@@ -70,10 +65,10 @@ async function doStuff() {
})
await scenes.record('topic_updates', async () => {
await showText('Topic overview', 2000, browser, 'top')
await sleep(2000)
await showText('Indicate topic updates', 2000, browser, 'bottom')
await sleep(3000)
await showText('Topic overview', 1000, browser, 'top')
await sleep(1000)
await showText('Indicate topic updates', 1000, browser, 'middle')
await sleep(1000)
})
await scenes.record('numeric_plots', async () => {
@@ -139,7 +134,7 @@ async function doStuff() {
await scenes.record('customize_subscriptions', async () => {
await sleep(2000)
await disconnect(browser)
await showText('Customize Subscriptions', 3000, browser, 'top')
await showText('Customize Subscriptions', 1000, browser, 'top')
await showAdvancedConnectionSettings(browser)
})

View File

@@ -10,9 +10,11 @@ export async function showJsonFormatting(browser: Browser<void>) {
const payloadInput = await browser.$('//*[contains(@class, "ace_text-input")]')
await clickOn(editor, browser)
await browser.keys(['\uE009', 'A']) // Ctrl + A
await sleep(200)
await browser.keys(['\uE000']) // End keyboard modifier
await sleep(200)
await browser.keys(['\uE003']) // Backspace
await sleep(500)
await sleep(200)
await writeTextPayload(payloadInput, '{"action": "setState", "state": "on" }')
await sleep(300)
await clickOn(formatJsonButton, browser)

View File

@@ -1,4 +1,4 @@
import { clickOn, sleep, writeText, expandTopic, moveToCenterOfElement } from '../util'
import { clickOn, sleep, writeText, expandTopic, moveToCenterOfElement, showText } from '../util'
import { Browser } from 'webdriverio'
export async function showMenu(browser: Browser<void>) {
@@ -19,5 +19,13 @@ export async function showMenu(browser: Browser<void>) {
await clickOn(alphabetically, browser)
await sleep(2000)
await showText('Dark Mode', 1500, browser, 'top')
await sleep(1500)
const themeSwitch = await browser.$('//*[contains(text(), "Dark Mode")]/..//input')
await clickOn(themeSwitch, browser)
await sleep(3000)
await browser.saveScreenshot('screen_dark_mode.png')
await clickOn(themeSwitch, browser)
await clickOn(menuButton, browser)
}

View File

@@ -14,8 +14,8 @@ export async function showOffDiffCapability(browser: Browser<void>) {
const diffMessages = await browser.$('#valueRendererDisplayMode-diff')
await clickOn(diffMessages, browser)
// const firstEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[1]/div')
const secondEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[2]/div')
await clickOn(secondEntry, browser)
await sleep(2000)
// // const firstEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[1]/div')
// const secondEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[2]/div')
// await clickOn(secondEntry, browser)
// await sleep(2000)
}