mirror of
https://gitlab.com/openlp/openlp_api_tester.git
synced 2024-12-22 12:32:47 +00:00
Cleanup and add defaults
This commit is contained in:
parent
2a897edb10
commit
53db7e744a
17
scripts/alert.json
Normal file
17
scripts/alert.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"process_name": "Show basic alert process",
|
||||
"step1": {
|
||||
"name": "trigger_alert",
|
||||
"payload": {
|
||||
"text": "Some Text",
|
||||
"min": 0
|
||||
}
|
||||
},
|
||||
"step2": {
|
||||
"name": "trigger_alert",
|
||||
"payload": {
|
||||
"text": "Some more text Text",
|
||||
"delay": 5
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
process_name: Show basic alert process
|
||||
step1:
|
||||
payload:
|
||||
text: Show some text
|
||||
name: trigger_alert
|
6
scripts/live_item.json
Normal file
6
scripts/live_item.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"process_name": "live_item",
|
||||
"step1": {
|
||||
"name": "play_live_items"
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
---
|
||||
process_name: live_item
|
||||
step1:
|
||||
name: play_live_items
|
33
scripts/media.json
Normal file
33
scripts/media.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"process_name": "play media",
|
||||
"step1": {
|
||||
"name": "clear_live_controller",
|
||||
"payload": {
|
||||
"max": 1,
|
||||
"min": 1
|
||||
}
|
||||
},
|
||||
"step2": {
|
||||
"name": "clear_preview_controller",
|
||||
"payload": {
|
||||
"delay": 1
|
||||
}
|
||||
},
|
||||
"step3": {
|
||||
"name": "search_and_add",
|
||||
"delay": 10
|
||||
"payload": {
|
||||
"plugin": "media"
|
||||
}
|
||||
},
|
||||
"step4": {
|
||||
"name": "load_service_sequential"
|
||||
},
|
||||
"step5": {
|
||||
"delay": 30
|
||||
"name": "flush_pending"
|
||||
},
|
||||
"step6": {
|
||||
"name": "media_pause"
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
---
|
||||
process_name: play media
|
||||
step1:
|
||||
max: 1
|
||||
min: 1
|
||||
name: clear_live_controller
|
||||
step2:
|
||||
delay: 1
|
||||
name: clear_preview_controller
|
||||
step3:
|
||||
delay: 10
|
||||
name: search_and_add
|
||||
payload:
|
||||
plugin: media
|
||||
step4:
|
||||
name: load_service_sequential
|
||||
step5:
|
||||
delay: 30
|
||||
name: flush_pending
|
||||
step6:
|
||||
name: media_pause
|
34
scripts/test.json
Normal file
34
scripts/test.json
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
"process_name": "play media",
|
||||
"step1": {
|
||||
"name": "clear_live_controller",
|
||||
"max": 1,
|
||||
"min": 1
|
||||
},
|
||||
"step2": {
|
||||
"name": "clear_preview_controller",
|
||||
"delay": 1
|
||||
},
|
||||
"step3": {
|
||||
"name": "new_service",
|
||||
"max": 1,
|
||||
"min": 1
|
||||
},
|
||||
"step4": {
|
||||
"name": "search_and_add",
|
||||
"delay": 1,
|
||||
"payload": {
|
||||
"plugin": "songs"
|
||||
}
|
||||
},
|
||||
"step5": {
|
||||
"name": "search_and_add",
|
||||
"delay": 1,
|
||||
"payload": {
|
||||
"plugin": "bibles"
|
||||
}
|
||||
},
|
||||
"step6": {
|
||||
"name": "load_service_sequential"
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
---
|
||||
process_name: test process
|
||||
step1:
|
||||
max: 1
|
||||
min: 1
|
||||
name: clear_live_controller
|
||||
step2:
|
||||
delay: 1
|
||||
name: clear_preview_controller
|
||||
step3:
|
||||
max: 1
|
||||
min: 1
|
||||
name: new_service
|
||||
step4:
|
||||
delay: 1
|
||||
name: search_and_add
|
||||
payload:
|
||||
plugin: songs
|
||||
step5:
|
||||
delay: 1
|
||||
name: search_and_add
|
||||
payload:
|
||||
plugin: bibles
|
||||
step6:
|
||||
name: load_service_sequential
|
@ -20,7 +20,7 @@
|
||||
import argparse
|
||||
import threading
|
||||
import websocket
|
||||
import yaml
|
||||
import json
|
||||
|
||||
from collections import deque
|
||||
from websocket import create_connection
|
||||
@ -82,7 +82,7 @@ class RunTestsController(object):
|
||||
print_info(f"Socket Listener Opened")
|
||||
|
||||
@staticmethod
|
||||
def on_close() -> None:
|
||||
def on_close(ws_obj: object) -> None:
|
||||
print_info("Socket Listener Closed")
|
||||
|
||||
@staticmethod
|
||||
@ -119,7 +119,7 @@ class RunTestsController(object):
|
||||
f_open = f'{a.rargs[0]}'
|
||||
print(f_open)
|
||||
with open(f_open, 'r') as file:
|
||||
commands = yaml.load(file, Loader=yaml.SafeLoader)
|
||||
commands = json.load(file)
|
||||
for step in commands:
|
||||
if step == 'process_name':
|
||||
print_info(f'Processing file {commands[step]}')
|
||||
|
Loading…
Reference in New Issue
Block a user