def test_104_connectButton(self): HomePage.clickOnCookiePolicyButton(self) HomePage.clickOnConnect(self) assert EnterPhoneScreen.getPhoneFieldElement(self).is_displayed()
def test_105_footerText(self): HomePage.clickOnCookiePolicyButton(self) current_footer_text = HomePage.getFooterTxt(self)[0] expected_footer_text = config['HOME_PAGE']['TEXTS']['FOOTER_FIRST_PART_TEXT'] assert current_footer_text == expected_footer_text
def test_101_checkClientLink(self): HomePage.clickOnCookiePolicyButton(self) current_app_link_text = HomePage.getAppLinkText(self) expected_app_link_text = config['HOME_PAGE']['TEXTS']['BACK_TO_APP_HEADER_LINK_TEXT'] assert current_app_link_text == expected_app_link_text
def login(self): HomePage.clickOnCookiePolicyButton(self) HomePage.clickOnConnect(self) EnterPhoneScreen.enterValidPhoneNumber( self, phone_number=SmsService.getFirstAvailableNumber(self)) EnterPhoneScreen.submitPhoneNumber(self) EnterPhoneScreen.enterSmsCode(self) EnterPhoneScreen.submitSmsCode(self)
def test_100_openSut(self, env): current_app_link = HomePage.getSutUrl(self) expected_app_url = config['SUT'][env.upper()] assert current_app_link == expected_app_url
def test_102_logout(self): # login Connect.login(self) current_login_button_text = HomePage.getLoginButtonText(self) before_login_button_text = config['HOME_PAGE']['TEXTS']['CONNECT_BUTTON_BEFORE_LOGIN'] assert current_login_button_text != before_login_button_text # logout Connect.logout(self) current_login_button_text = HomePage.getLoginButtonText(self) assert current_login_button_text == before_login_button_text
def test_102_getInputsPlaceHolders(self): inputs_place_holders = HomePage.getInputsPlaceHolder(self) assert inputs_place_holders[0] == config['HOME_PAGE']['TEXTS']['SELECT_LOCATION_PLACE_HOLDER_TEXT'] assert inputs_place_holders[1] == config['HOME_PAGE']['TEXTS']['SELECT_DATE_PLACE_HOLDER_TEXT'] assert inputs_place_holders[2] == config['HOME_PAGE']['TEXTS']['SELECT_TIME_PLACE_HOLDER_TEXT']
def test_100_registration(self): Connect.register(self) current_login_button_text = HomePage.getLoginButtonText(self) before_login_button_text = config['HOME_PAGE']['TEXTS']['CONNECT_BUTTON_BEFORE_LOGIN'] self.assertTrue(current_login_button_text != before_login_button_text, ErrorsHandler.LOGIN_ERROR + " " + current_login_button_text)
def test_101_resendCode(self): HomePage.clickOnCookiePolicyButton(self) HomePage.clickOnConnect(self) EnterPhoneScreen.enterValidPhoneNumber( self, phone_number=SmsService.getFirstAvailableNumber(self)) EnterPhoneScreen.submitPhoneNumber(self) EnterPhoneScreen.clickOnResendCode(self) resend_sms_pop_up = EnterPhoneScreen.getPopup(self) assert resend_sms_pop_up is not None resend_sms_pop_up_text = EnterPhoneScreen.getPopupText(self) assert resend_sms_pop_up_text == config['ENTER_PHONE_PAGE']['TEXTS'][ 'RESEND_CODE_POPUP_TEXT'] + "gal"
def test_104_checkLocationList(self): Connect.login(self) locations_list = HomePage.getLocationsList(self) expected_location_number = 0 for location in locations_list: assert location.text == config['HOME_PAGE']['DATA']['FULL_LOCATIONS_NAMES'][expected_location_number] expected_location_number += 1
def test_100_wrongSmsCode(self): HomePage.clickOnCookiePolicyButton(self) HomePage.clickOnConnect(self) EnterPhoneScreen.enterValidPhoneNumber( self, phone_number=SmsService.getFirstAvailableNumber(self)) EnterPhoneScreen.submitPhoneNumber(self) EnterPhoneScreen.enterWrongSmsCode(self) EnterPhoneScreen.submitSmsCode(self) wrong_sms_pop_up = EnterPhoneScreen.getPopup(self) assert wrong_sms_pop_up is not None popup_text = EnterPhoneScreen.getPopupText(self) assert popup_text == config['ENTER_PHONE_PAGE']['TEXTS'][ 'WRONG_SMS_POPUP_TEXT']
def test_103_CheckInputsWithData(self): HomePage.clickOnCookiePolicyButton(self) HomePage.chooseLocation(self)