2022-05-26 15:00:00 +00:00
|
|
|
from screens.StatusWelcomeScreen import StatusWelcomeScreen
|
2022-06-07 15:19:52 +00:00
|
|
|
from screens.StatusMainScreen import StatusMainScreen
|
2022-05-26 15:00:00 +00:00
|
|
|
|
2022-06-07 23:37:11 +00:00
|
|
|
_welcomeScreen = StatusWelcomeScreen()
|
2022-08-12 13:19:16 +00:00
|
|
|
_mainScreen = StatusMainScreen()
|
|
|
|
|
2022-06-07 23:37:11 +00:00
|
|
|
|
2022-05-26 15:00:00 +00:00
|
|
|
|
2022-06-07 23:37:11 +00:00
|
|
|
@Given("A first time user lands on the status desktop and generates new key")
|
2022-05-26 15:00:00 +00:00
|
|
|
def step(context):
|
2022-07-20 12:14:50 +00:00
|
|
|
erase_directory(context.userData["status_data_folder_path"])
|
|
|
|
startApplication(context.userData["aut_name"])
|
2022-06-01 02:43:53 +00:00
|
|
|
_welcomeScreen.agree_terms_conditions_and_generate_new_key()
|
2022-05-26 15:00:00 +00:00
|
|
|
|
2022-06-07 23:37:11 +00:00
|
|
|
|
2022-06-29 01:12:35 +00:00
|
|
|
@Given("A first time user lands on the status desktop and navigates to import seed phrase")
|
|
|
|
def step(context):
|
2022-07-20 12:14:50 +00:00
|
|
|
erase_directory(context.userData["status_data_folder_path"])
|
|
|
|
startApplication(context.userData["aut_name"])
|
2022-06-29 01:12:35 +00:00
|
|
|
_welcomeScreen.agree_terms_conditions_and_navigate_to_import_seed_phrase()
|
|
|
|
|
|
|
|
|
2022-06-16 01:46:45 +00:00
|
|
|
@When("user signs up with username |any| and password |any|")
|
2022-05-26 15:00:00 +00:00
|
|
|
def step(context, username, password):
|
2022-06-01 02:43:53 +00:00
|
|
|
_welcomeScreen.input_username_and_password_and_finalize_sign_up(username, password)
|
|
|
|
|
2022-06-07 23:37:11 +00:00
|
|
|
|
|
|
|
@When("the user inputs username |any|")
|
2022-06-01 02:43:53 +00:00
|
|
|
def step(context, username):
|
|
|
|
_welcomeScreen.input_username(username)
|
|
|
|
|
2022-05-26 15:00:00 +00:00
|
|
|
|
|
|
|
@Then("the user lands on the signed in app")
|
2022-06-29 01:12:35 +00:00
|
|
|
def step(context):
|
2022-08-12 13:19:16 +00:00
|
|
|
_mainScreen
|
2022-06-29 01:12:35 +00:00
|
|
|
|
2022-08-03 17:31:59 +00:00
|
|
|
|
|
|
|
@When("The user inputs the seed phrase |any|")
|
|
|
|
def step(context, seed_phrase):
|
|
|
|
_welcomeScreen.input_seed_phrase(seed_phrase)
|
|
|
|
|
|
|
|
|
|
|
|
@Then("the invalid seed text is visible")
|
|
|
|
def step(context):
|
2022-08-12 13:19:16 +00:00
|
|
|
_welcomeScreen.seed_phrase_visible()
|
|
|
|
|
2022-08-18 07:38:47 +00:00
|
|
|
@When("the user logs in with password |any|")
|
|
|
|
def step(context, password: str):
|
|
|
|
_welcomeScreen.enter_password(password)
|
|
|
|
|
2022-08-12 13:19:16 +00:00
|
|
|
@Then("the user is online")
|
|
|
|
def step(context):
|
|
|
|
_mainScreen.user_is_online()
|
2022-08-18 07:38:47 +00:00
|
|
|
|
|
|
|
@When("the user signs up with profileImage |any|, username |any| and password |any|")
|
|
|
|
def step(context, profileImageUrl, username, password):
|
|
|
|
_welcomeScreen.input_username_profileImage_password_and_finalize_sign_up("file:///"+context.userData["fixtures_root"]+"images/"+profileImageUrl, username, password)
|
|
|
|
|
|
|
|
@Then("my profile modal has the updated profile image")
|
|
|
|
def step(context):
|
|
|
|
_welcomeScreen.profile_modal_image_is_updated()
|
|
|
|
|
|
|
|
@Then("the profile setting has the updated profile image")
|
|
|
|
def step(context):
|
|
|
|
_welcomeScreen.profile_settings_image_is_updated()
|
|
|
|
|
|
|
|
@When("a screenshot of the profileImage is taken")
|
|
|
|
def step(context):
|
|
|
|
_welcomeScreen.grab_screenshot()
|
|
|
|
|
|
|
|
@Then("the profile navigation bar has the updated profile image")
|
|
|
|
def step(context):
|
|
|
|
_welcomeScreen.profile_image_is_updated()
|
|
|
|
delete_created_searchImage(context.userData["search_images"] +"profiletestimage.png")
|
|
|
|
delete_created_searchImage(context.userData["search_images"]+"loginUserName.png")
|
|
|
|
|