status-desktop/test/ui-test/testSuites/suite_settings/tst_mainSettingsSection/bdd_hooks.py

20 lines
593 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/"))
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
import steps.commonInitSteps as init_steps
@OnFeatureStart
def hook(context):
init_steps.context_init(context, testSettings)
@OnScenarioEnd
def hook(context):
[ctx.detach() for ctx in squish.applicationContextList()]
@OnStepEnd
def hook(context):
context.userData["step_name"] = context._data["text"]