2022-03-29 08:30:38 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# This file contains hook functions to run as the .feature file is executed.
|
|
|
|
|
2022-07-13 13:14:52 +00:00
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), "../../../src/"))
|
2022-05-26 00:28:49 +00:00
|
|
|
|
2022-07-13 13:14:52 +00:00
|
|
|
from utils.FileManager import *
|
2022-03-29 08:30:38 +00:00
|
|
|
|
2022-07-20 12:14:50 +00:00
|
|
|
_status_desktop_app_name = "nim_status_client"
|
|
|
|
_status_data_folder_path = "../../../../../Status/data"
|
|
|
|
_status_qt_path = "../../../../../Status/qt"
|
|
|
|
_app_closure_timeout = 2 #[seconds]
|
2022-03-29 08:30:38 +00:00
|
|
|
|
|
|
|
@OnScenarioStart
|
|
|
|
def hook(context):
|
2022-07-20 12:14:50 +00:00
|
|
|
erase_directory(_status_qt_path)
|
2022-03-29 08:30:38 +00:00
|
|
|
context.userData = {}
|
2022-07-20 12:14:50 +00:00
|
|
|
context.userData["aut_name"] = _status_desktop_app_name
|
|
|
|
context.userData["status_data_folder_path"] = _status_data_folder_path
|
2022-03-29 08:30:38 +00:00
|
|
|
|
|
|
|
@OnScenarioEnd
|
|
|
|
def hook(context):
|
|
|
|
currentApplicationContext().detach()
|
2022-07-20 12:14:50 +00:00
|
|
|
snooze(_app_closure_timeout)
|
2022-03-29 08:30:38 +00:00
|
|
|
|