2022-06-16 22:54:13 +00:00
|
|
|
from screens.StatusLoginScreen import StatusLoginScreen
|
|
|
|
|
|
|
|
_loginScreen = StatusLoginScreen()
|
2022-10-13 16:03:10 +00:00
|
|
|
|
|
|
|
#########################
|
|
|
|
### PRECONDITIONS region:
|
|
|
|
#########################
|
2022-10-19 10:39:48 +00:00
|
|
|
@Given("the user \"|any|\" logs in with password \"|any|\"")
|
2022-10-13 16:03:10 +00:00
|
|
|
def step(context, username, password):
|
|
|
|
the_user_any_logs_in_with_password(username, password)
|
|
|
|
|
|
|
|
#########################
|
|
|
|
### ACTIONS region:
|
|
|
|
#########################
|
|
|
|
|
2022-10-19 10:39:48 +00:00
|
|
|
@When("the user \"|any|\" logs in with password \"|any|\"")
|
2022-07-20 12:14:50 +00:00
|
|
|
def step(context, username, password):
|
2022-10-13 16:03:10 +00:00
|
|
|
the_user_any_logs_in_with_password(username, password)
|
|
|
|
|
|
|
|
#########################
|
|
|
|
### VERIFICATIONS region:
|
|
|
|
#########################
|
2022-05-26 15:00:00 +00:00
|
|
|
|
|
|
|
@Then("the user is NOT able to login to Status Desktop application")
|
|
|
|
def step(context):
|
2022-11-17 14:06:36 +00:00
|
|
|
_main_screen = StatusMainScreen()
|
|
|
|
_main_screen.wait_for_splash_animation_ends()
|
2022-07-20 12:14:50 +00:00
|
|
|
_loginScreen.verify_error_message_is_displayed()
|
2022-10-13 16:03:10 +00:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
### COMMON methods used in different steps given/when/then region:
|
|
|
|
###########################################################################
|
|
|
|
def the_user_any_logs_in_with_password(username: str, password: str):
|
|
|
|
_loginScreen.login(username, password)
|