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

45 lines
1.6 KiB
Python

# -*- coding: utf-8 -*-
# ******************************************************************************
# Status.im
# *****************************************************************************/
# /**
# * \file steps.py
# *
# * \test Status Desktop - Login
# * \date February 2022
# * \brief This file contains snippets of script code to be executed as the .feature
# * file is processed.
# * The decorators Given/When/Then/Step can be used to associate a script snippet
# * with a pattern which is matched against the steps being executed.
# *****************************************************************************
from common.Common import *
import time
@Given("the user starts the application with a specific data folder |any|")
def step(context, data):
waitFor(lambda: currentApplicationContext().detach(), 500)
time.sleep(5)
clear_directory(context.userData["status_data_folder_path"])
copy_directory(data, context.userData["status_data_folder_path"])
startApplication(context.userData["aut_name"])
@When("the user restarts the app")
def step(context):
waitFor(lambda: currentApplicationContext().detach(), 500)
time.sleep(5)
startApplication(context.userData["aut_name"])
@When("user inputs the following |any| with ui-component |any|")
def step(context, text, obj):
input_text(text, obj)
@When("user clicks on the following ui-component |any|")
def step(context, obj):
click_on_an_object(obj)
@Then("the following ui-component |any| is not enabled")
def step(context, obj):
object_not_enabled(obj)