2022-03-29 10:30:38 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2022-08-19 17:23:09 +02:00
|
|
|
# This file contains hook functions to run as the .feature file is executed
|
2022-03-29 10:30:38 +02:00
|
|
|
|
2022-08-19 17:23:09 +02:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../testSuites/global_shared/"))
|
2022-07-13 15:14:52 +02:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
|
2022-05-26 01:28:49 +01:00
|
|
|
|
2023-05-19 21:10:38 +02:00
|
|
|
import drivers.SquishDriver as driver
|
2022-11-21 13:56:06 +01:00
|
|
|
from steps.commonInitSteps import context_init
|
2023-05-30 12:24:04 +02:00
|
|
|
import configs
|
2023-05-19 21:10:38 +02:00
|
|
|
|
2022-03-29 10:30:38 +02:00
|
|
|
|
|
|
|
@OnScenarioStart
|
|
|
|
def hook(context):
|
2022-11-21 14:41:34 +01:00
|
|
|
context_init(context, testSettings)
|
2022-12-16 19:24:51 +01:00
|
|
|
context.userData["scenario_name"] = context._data["title"]
|
2022-08-19 10:57:09 -04:00
|
|
|
|
2023-05-19 21:10:38 +02:00
|
|
|
|
2022-03-29 10:30:38 +02:00
|
|
|
@OnScenarioEnd
|
|
|
|
def hook(context):
|
2023-05-19 21:10:38 +02:00
|
|
|
driver.detach()
|
|
|
|
|
2022-03-29 10:30:38 +02:00
|
|
|
|
2022-08-31 12:55:42 +02:00
|
|
|
@OnStepEnd
|
|
|
|
def hook(context):
|
2023-05-19 21:10:38 +02:00
|
|
|
context.userData["step_name"] = context._data["text"]
|