diff --git a/src/spec/SceneBuilder.ts b/src/spec/SceneBuilder.ts index d987cc5..7d4edb0 100644 --- a/src/spec/SceneBuilder.ts +++ b/src/spec/SceneBuilder.ts @@ -19,6 +19,7 @@ export type SceneNames = | 'settings' | 'customize_subscriptions' | 'keyboard_shortcuts' + | 'sparkplugb-decoding' | 'end' export class SceneBuilder { diff --git a/src/spec/demoVideo.ts b/src/spec/demoVideo.ts index e907a18..9845eff 100644 --- a/src/spec/demoVideo.ts +++ b/src/spec/demoVideo.ts @@ -21,6 +21,7 @@ import { showMenu } from './scenarios/showMenu' import { showNumericPlot } from './scenarios/showNumericPlot' import { showOffDiffCapability } from './scenarios/showOffDiffCapability' import { showZoomLevel } from './scenarios/showZoomLevel' +import { showSparkPlugDecoding } from './scenarios/showSparkplugDecoding' /** * A convenience method that handles gracefully cleaning up the test run. @@ -120,6 +121,11 @@ async function doStuff() { 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 // await scenes.record('delete_retained_topics', async () => { // await hideText(page) diff --git a/src/spec/scenarios/showSparkplugDecoding.ts b/src/spec/scenarios/showSparkplugDecoding.ts new file mode 100644 index 0000000..ae2c5c1 --- /dev/null +++ b/src/spec/scenarios/showSparkplugDecoding.ts @@ -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) +}