status-desktop/test/ui-test/testSuites/global_shared/scripts/bdd_hooks.py

21 lines
655 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
# This file contains hook functions to run as the .feature file is executed
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/"))
2022-07-13 13:14:52 +00:00
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
from steps.commonInitSteps import context_init
@OnScenarioStart
def hook(context):
context_init(context, testSettings)
context.userData["scenario_name"] = context._data["title"]
@OnScenarioEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]