mirror of
https://github.com/status-im/status-desktop.git
synced 2025-03-02 23:41:18 +00:00
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.
26 lines
833 B
Python
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)
|
|
|