make the timer-start and timer-restart action name the timer in the same way

This commit is contained in:
Vincent Sanders 2019-06-12 22:45:07 +01:00
parent c1dc4e61bd
commit c90bd806a6
2 changed files with 19 additions and 17 deletions

View File

@ -4,7 +4,7 @@ steps:
- action: launch - action: launch
language: en language: en
- action: timer-start - action: timer-start
tag: timer1 timer: timer1
- action: window-new - action: window-new
tag: win1 tag: win1
- action: navigate - action: navigate
@ -17,7 +17,7 @@ steps:
- action: timer-stop - action: timer-stop
timer: timer1 timer: timer1
- action: timer-start - action: timer-start
tag: timer2 timer: timer2
- action: window-new - action: window-new
tag: win2 tag: win2
- action: navigate - action: navigate

View File

@ -301,7 +301,10 @@ def run_test_step_action_plot_check(ctx, step):
print(get_indent(ctx) + "Action: " + step["action"]) print(get_indent(ctx) + "Action: " + step["action"])
assert_browser(ctx) assert_browser(ctx)
win = ctx['windows'][step['window']] win = ctx['windows'][step['window']]
if 'checks' in step.keys():
checks = step['checks'] checks = step['checks']
else:
checks = {}
all_text = [] all_text = []
bitmaps = [] bitmaps = []
for plot in win.redraw(): for plot in win.redraw():
@ -310,7 +313,6 @@ def run_test_step_action_plot_check(ctx, step):
if plot[0] == 'BITMAP': if plot[0] == 'BITMAP':
bitmaps.append(plot[1:]) bitmaps.append(plot[1:])
all_text = " ".join(all_text) all_text = " ".join(all_text)
if checks is not None:
for check in checks: for check in checks:
if 'text-contains' in check.keys(): if 'text-contains' in check.keys():
print("Check {} in {}".format(repr(check['text-contains']),repr(all_text))) print("Check {} in {}".format(repr(check['text-contains']),repr(all_text)))
@ -326,7 +328,7 @@ def run_test_step_action_plot_check(ctx, step):
def run_test_step_action_timer_start(ctx, step): def run_test_step_action_timer_start(ctx, step):
print(get_indent(ctx) + "Action: " + step["action"]) print(get_indent(ctx) + "Action: " + step["action"])
tag = step['tag'] tag = step['timer']
assert_browser(ctx) assert_browser(ctx)
assert(ctx['timers'].get(tag) is None) assert(ctx['timers'].get(tag) is None)
ctx['timers'][tag] = {} ctx['timers'][tag] = {}