Noelia fcfcafaac0 test(chore): Refactor that will allow to work in different test suites
WIP:
- Added new global scripts folder `global_shared` where global hooks, names and steps will be stored.
- Created new `suite_onboarding` and moved existing test case related to it as a poc.
- Updated all `test.py` files to use global files and fit the new structure.
2022-08-23 12:07:36 +02:00

26 lines
833 B
Python

# -*- 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/"))
from utils.FileManager import *
_status_desktop_app_name = "nim_status_client"
_status_data_folder_path = "../../../../../Status/data"
_status_qt_path = "../../../../../Status/qt"
_app_closure_timeout = 2 #[seconds]
@OnScenarioStart
def hook(context):
erase_directory(_status_qt_path)
context.userData = {}
context.userData["aut_name"] = _status_desktop_app_name
context.userData["status_data_folder_path"] = _status_data_folder_path
@OnScenarioEnd
def hook(context):
currentApplicationContext().detach()
snooze(_app_closure_timeout)