Skip to content

Commit e191787

Browse files
committed
add sparkplug decoding to demo video
1 parent 3229ef5 commit e191787

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/spec/SceneBuilder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export type SceneNames =
1919
| 'settings'
2020
| 'customize_subscriptions'
2121
| 'keyboard_shortcuts'
22+
| 'sparkplugb-decoding'
2223
| 'end'
2324

2425
export class SceneBuilder {

src/spec/demoVideo.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { showMenu } from './scenarios/showMenu'
2121
import { showNumericPlot } from './scenarios/showNumericPlot'
2222
import { showOffDiffCapability } from './scenarios/showOffDiffCapability'
2323
import { showZoomLevel } from './scenarios/showZoomLevel'
24+
import { showSparkPlugDecoding } from './scenarios/showSparkplugDecoding'
2425

2526
/**
2627
* A convenience method that handles gracefully cleaning up the test run.
@@ -120,6 +121,11 @@ async function doStuff() {
120121
await sleep(1000)
121122
})
122123

124+
await scenes.record('sparkplugb-decoding', async () => {
125+
await showText('SparkplugB Decoding', 2000, page, 'top')
126+
await showSparkPlugDecoding(page)
127+
})
128+
123129
// disable this scenario for now until expandTopic is sorted out
124130
// await scenes.record('delete_retained_topics', async () => {
125131
// await hideText(page)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Page } from 'playwright'
2+
import { expandTopic, sleep } from '../util'
3+
4+
export async function showSparkPlugDecoding(browser: Page) {
5+
// spell-checker: disable-next-line
6+
await expandTopic('spBv1.0/Sparkplug Devices/DDATA/JavaScript Edge Node/Emulated Device', browser)
7+
await browser.screenshot({ path: 'screen_sparkplugb_decoding.png' })
8+
await sleep(1000)
9+
}

0 commit comments

Comments
 (0)