1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 16:37:18 +00:00

Comply new TFWServerConnector API

This commit is contained in:
Kristóf Tóth 2018-04-12 15:12:50 +02:00
parent 017e7d0e26
commit 5a672ada5f

View File

@ -17,19 +17,19 @@ def cenator(history):
class TestCommands(TerminalCommands):
def command_selectdir(self, *args):
TFWServerConnector().send_to_eventhandler('webide',
{'data': {'command': 'selectdir',
TFWServerConnector().send_to_eventhandler({'key': 'webide',
'data': {'command': 'selectdir',
'directory': args[0]}})
def command_trigger(self, *args):
TFWServerConnector().send('selectdir_needs_no_key',
{'trigger': args[0]})
TFWServerConnector().send({'key': '',
'trigger': args[0]})
def command_togglenext(self, *args):
if not hasattr(self, 'togglenext_visible'):
self.togglenext_visible = True
TFWServerConnector().send('messagecontrol',
{'data': {'command': 'showbutton',
TFWServerConnector().send({'key': 'messagecontrol',
'data': {'command': 'showbutton',
'next_visibility': self.togglenext_visible}})
self.togglenext_visible = not self.togglenext_visible