def test_user_can_edit_address(self, browser): #Arrange page_lang = browser.user_language expected_update_msg = lang_dict[page_lang]['expected_update_msg'] page = MainPage(browser, link) page.open() page.go_to_login_page() login_page = LoginPage(browser, browser.current_url) login_page.login_to_account(email, password) login_page.go_to_account_page() #Act acnt_page = AccountPage(browser, browser.current_url) acnt_page.edit_user_address(second_line, third_line, state, phone, instructions) #Assert acnt_page.shoul_not_be_address_exist_msg() acnt_page.check_address_edited_msg(expected_update_msg)
def test_user_can_add_new_address(self, browser): #Arrange page_lang = browser.user_language expected_create_msg = lang_dict[page_lang]['expected_create_msg'] page = MainPage(browser, link) page.open() page.go_to_login_page() login_page = LoginPage(browser, browser.current_url) login_page.login_to_account(email, password) login_page.go_to_account_page() #Act acnt_page = AccountPage(browser, browser.current_url) acnt_page.add_new_user_address(first_name, last_name, first_line, city, post_code, country) #Assert acnt_page.shoul_not_be_address_exist_msg() acnt_page.check_address_created_msg(expected_create_msg)