Improve demo video
This commit is contained in:
@@ -57,12 +57,7 @@ async function doStuff() {
|
|||||||
|
|
||||||
|
|
||||||
// Wait for Username input to be visible
|
// Wait for Username input to be visible
|
||||||
let inputField = undefined
|
await browser.$('//label[contains(text(), "Username")]/..//input')
|
||||||
let start = Date.now()
|
|
||||||
let maxWaitDuration = 30000
|
|
||||||
while ((!inputField || !inputField.isExisting) && ((Date.now() - start) < maxWaitDuration)) {
|
|
||||||
inputField = await browser.$(`//label[contains(text(), "Username")]/..//input`)
|
|
||||||
}
|
|
||||||
const scenes = new SceneBuilder()
|
const scenes = new SceneBuilder()
|
||||||
await scenes.record('connect', async () => {
|
await scenes.record('connect', async () => {
|
||||||
await connectTo('127.0.0.1', browser)
|
await connectTo('127.0.0.1', browser)
|
||||||
@@ -70,10 +65,10 @@ async function doStuff() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
await scenes.record('topic_updates', async () => {
|
await scenes.record('topic_updates', async () => {
|
||||||
await showText('Topic overview', 2000, browser, 'top')
|
await showText('Topic overview', 1000, browser, 'top')
|
||||||
await sleep(2000)
|
await sleep(1000)
|
||||||
await showText('Indicate topic updates', 2000, browser, 'bottom')
|
await showText('Indicate topic updates', 1000, browser, 'middle')
|
||||||
await sleep(3000)
|
await sleep(1000)
|
||||||
})
|
})
|
||||||
|
|
||||||
await scenes.record('numeric_plots', async () => {
|
await scenes.record('numeric_plots', async () => {
|
||||||
@@ -139,7 +134,7 @@ async function doStuff() {
|
|||||||
await scenes.record('customize_subscriptions', async () => {
|
await scenes.record('customize_subscriptions', async () => {
|
||||||
await sleep(2000)
|
await sleep(2000)
|
||||||
await disconnect(browser)
|
await disconnect(browser)
|
||||||
await showText('Customize Subscriptions', 3000, browser, 'top')
|
await showText('Customize Subscriptions', 1000, browser, 'top')
|
||||||
await showAdvancedConnectionSettings(browser)
|
await showAdvancedConnectionSettings(browser)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ export async function showJsonFormatting(browser: Browser<void>) {
|
|||||||
const payloadInput = await browser.$('//*[contains(@class, "ace_text-input")]')
|
const payloadInput = await browser.$('//*[contains(@class, "ace_text-input")]')
|
||||||
await clickOn(editor, browser)
|
await clickOn(editor, browser)
|
||||||
await browser.keys(['\uE009', 'A']) // Ctrl + A
|
await browser.keys(['\uE009', 'A']) // Ctrl + A
|
||||||
|
await sleep(200)
|
||||||
await browser.keys(['\uE000']) // End keyboard modifier
|
await browser.keys(['\uE000']) // End keyboard modifier
|
||||||
|
await sleep(200)
|
||||||
await browser.keys(['\uE003']) // Backspace
|
await browser.keys(['\uE003']) // Backspace
|
||||||
await sleep(500)
|
await sleep(200)
|
||||||
await writeTextPayload(payloadInput, '{"action": "setState", "state": "on" }')
|
await writeTextPayload(payloadInput, '{"action": "setState", "state": "on" }')
|
||||||
await sleep(300)
|
await sleep(300)
|
||||||
await clickOn(formatJsonButton, browser)
|
await clickOn(formatJsonButton, browser)
|
||||||
|
|||||||
@@ -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'
|
import { Browser } from 'webdriverio'
|
||||||
|
|
||||||
export async function showMenu(browser: Browser<void>) {
|
export async function showMenu(browser: Browser<void>) {
|
||||||
@@ -19,5 +19,13 @@ export async function showMenu(browser: Browser<void>) {
|
|||||||
await clickOn(alphabetically, browser)
|
await clickOn(alphabetically, browser)
|
||||||
await sleep(2000)
|
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)
|
await clickOn(menuButton, browser)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ export async function showOffDiffCapability(browser: Browser<void>) {
|
|||||||
const diffMessages = await browser.$('#valueRendererDisplayMode-diff')
|
const diffMessages = await browser.$('#valueRendererDisplayMode-diff')
|
||||||
await clickOn(diffMessages, browser)
|
await clickOn(diffMessages, browser)
|
||||||
|
|
||||||
// const firstEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[1]/div')
|
// // const firstEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[1]/div')
|
||||||
const secondEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[2]/div')
|
// const secondEntry = await browser.$('//span[contains(text(), "History")]/../../div/div[2]/div')
|
||||||
await clickOn(secondEntry, browser)
|
// await clickOn(secondEntry, browser)
|
||||||
await sleep(2000)
|
// await sleep(2000)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user