add sparkplug decoding to demo video

This commit is contained in:
Björn Dalfors
2024-05-29 11:27:10 +02:00
parent 3229ef5643
commit e19178780f
3 changed files with 16 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ export type SceneNames =
| 'settings' | 'settings'
| 'customize_subscriptions' | 'customize_subscriptions'
| 'keyboard_shortcuts' | 'keyboard_shortcuts'
| 'sparkplugb-decoding'
| 'end' | 'end'
export class SceneBuilder { export class SceneBuilder {

View File

@@ -21,6 +21,7 @@ import { showMenu } from './scenarios/showMenu'
import { showNumericPlot } from './scenarios/showNumericPlot' import { showNumericPlot } from './scenarios/showNumericPlot'
import { showOffDiffCapability } from './scenarios/showOffDiffCapability' import { showOffDiffCapability } from './scenarios/showOffDiffCapability'
import { showZoomLevel } from './scenarios/showZoomLevel' import { showZoomLevel } from './scenarios/showZoomLevel'
import { showSparkPlugDecoding } from './scenarios/showSparkplugDecoding'
/** /**
* A convenience method that handles gracefully cleaning up the test run. * A convenience method that handles gracefully cleaning up the test run.
@@ -120,6 +121,11 @@ async function doStuff() {
await sleep(1000) await sleep(1000)
}) })
await scenes.record('sparkplugb-decoding', async () => {
await showText('SparkplugB Decoding', 2000, page, 'top')
await showSparkPlugDecoding(page)
})
// disable this scenario for now until expandTopic is sorted out // disable this scenario for now until expandTopic is sorted out
// await scenes.record('delete_retained_topics', async () => { // await scenes.record('delete_retained_topics', async () => {
// await hideText(page) // await hideText(page)

View File

@@ -0,0 +1,9 @@
import { Page } from 'playwright'
import { expandTopic, sleep } from '../util'
export async function showSparkPlugDecoding(browser: Page) {
// spell-checker: disable-next-line
await expandTopic('spBv1.0/Sparkplug Devices/DDATA/JavaScript Edge Node/Emulated Device', browser)
await browser.screenshot({ path: 'screen_sparkplugb_decoding.png' })
await sleep(1000)
}