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

@@ -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)
}