diff --git a/src/spec/demoVideo.ts b/src/spec/demoVideo.ts index 4827d08..877cfb6 100644 --- a/src/spec/demoVideo.ts +++ b/src/spec/demoVideo.ts @@ -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) }) diff --git a/src/spec/scenarios/showJsonFormatting.ts b/src/spec/scenarios/showJsonFormatting.ts index 350d961..037ea04 100644 --- a/src/spec/scenarios/showJsonFormatting.ts +++ b/src/spec/scenarios/showJsonFormatting.ts @@ -10,9 +10,11 @@ export async function showJsonFormatting(browser: Browser) { 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) diff --git a/src/spec/scenarios/showMenu.ts b/src/spec/scenarios/showMenu.ts index 5187f46..9a1c35c 100644 --- a/src/spec/scenarios/showMenu.ts +++ b/src/spec/scenarios/showMenu.ts @@ -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) { @@ -19,5 +19,13 @@ export async function showMenu(browser: Browser) { 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) } diff --git a/src/spec/scenarios/showOffDiffCapability.ts b/src/spec/scenarios/showOffDiffCapability.ts index 2961a7a..8862846 100644 --- a/src/spec/scenarios/showOffDiffCapability.ts +++ b/src/spec/scenarios/showOffDiffCapability.ts @@ -14,8 +14,8 @@ export async function showOffDiffCapability(browser: Browser) { 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) }