This commit is contained in:
Thomas Nordquist
2019-04-04 19:51:44 +02:00
parent c20c075bcf
commit 09dcce97b7
55 changed files with 775 additions and 1415 deletions

View File

@@ -88,7 +88,7 @@ function generateData(client: mqtt.MqttClient) {
intervals.push(setInterval(() => {
state = !state
const js = {
tags:{
tags: {
entityId: 33512,
entityType: 'person',
host: 'd44ad81e10f9',
@@ -100,7 +100,7 @@ function generateData(client: mqtt.MqttClient) {
client.publish(
'actuality/showcase',
JSON.stringify(js),
{ retain: true, qos: 0 },
{ retain: true, qos: 0 }
)
}, 2102))
}

View File

@@ -1,7 +1,7 @@
import { Browser } from 'webdriverio'
import {
clickOn,
sleep,
sleep
} from '../util'
export async function showJsonFormatting(browser: Browser<void>) {

View File

@@ -26,7 +26,7 @@ export async function delteTextWithBackspaces(element: Element<void>, browser: B
}
}
export async function writeTextToInput(name: string, text: string, browser: Browser<void>, wait: boolean = true) {
export async function writeTextToInput(name: string, text: string, browser: Browser<void>, wait: boolean = true) {
const input = await browser.$(`//label[contains(text(), "${name}")]/..//input`)
await clickOn(input, browser, 1)
wait && await sleep(500)
@@ -70,13 +70,13 @@ export async function createFakeMousePointer(browser: Browser<void>) {
await browser.execute(js)
}
export async function showText(text: string, duration: number = 0, browser: Browser<void>, location: 'top' | 'bottom' | 'middle' = 'bottom', keys = []) {
export async function showText(text: string, duration: number = 0, browser: Browser<void>, location: 'top' | 'bottom' | 'middle' = 'bottom', keys = []) {
const js = `window.demo.showMessage('${text}', '${location}', ${duration});`
browser.execute(js)
}
export async function showKeys(text: string, duration: number = 0, browser: Browser<void>, location: 'top' | 'bottom' | 'middle' = 'bottom', keys: string[] = []) {
export async function showKeys(text: string, duration: number = 0, browser: Browser<void>, location: 'top' | 'bottom' | 'middle' = 'bottom', keys: string[] = []) {
const js = `window.demo.showMessage('${text}', '${location}', ${duration}, ${JSON.stringify(keys)});`
browser.execute(js)

View File

@@ -20,7 +20,7 @@ import {
createFakeMousePointer,
hideText,
showText,
sleep,
sleep
} from './util'
process.on('unhandledRejection', (error: Error) => {