def test_edit_offer(self, browser): page = TaskPage(browser, offer_dependency_url) page.go_to_site() page.get_cookies() page.check_values_from_table(offer_name) assert page.check_edit(SC.OFFER_COMMENT, 'Комментарий')
def test_edit_type_offer(self, browser): case_id = 735194 page = TaskPage(browser, url) page.go_to_site() page.check_values_from_table(type_offer_name) assert page.check_edit(SC.OFFER_TYPE_COMMENT, 'Комментарий'), add_result_for_case(run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_check_values_product_param(self, browser): case_id = 735771 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() assert page.check_field_values_from_table(), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_check_values_type_offer(self, browser): case_id = 735193 page = TaskPage(browser, url) page.go_to_site() page.check_values_from_table(type_offer_name) assert page.check_field_values_from_table(), add_result_for_case(run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_check_values_client_segment(self, browser): case_id = 890425 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.check_values_from_table(segment_name) assert page.check_field_values_from_table(), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_check_values_offer_dependency(self, browser): case_id = 735323 page = TaskPage(browser, offer_dependency_url) page.go_to_site() page.get_cookies() page.check_values_from_table(offer_name) assert page.check_field_values_from_table(), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_edit_product_param(self, browser): case_id = 735772 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() assert page.check_edit(SC.PARAM_VALUE, 'Значение'), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_check_cache(self, browser, get_suggestions): case_id = 756201 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() assert not (page.is_element_present( TC.TABLE_EMPTY_BODY)), add_result_for_case(run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_remove_type_step_two(self, browser): case_id = 735196 page = TaskPage(browser, url) page.go_to_site() page.check_values_from_table(type_offer_name) page.remove_type_step_two() assert page.get_name_from_table() != type_offer_name, add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_remove_product_param_step_two(self, browser): case_id = 735774 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.remove_type_step_two() assert page.get_name_from_table() != param_name, add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_remove_product_param_step_one(self, browser): case_id = 735773 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.remove_type_step_one() assert page.get_remove_flag(), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_remove_offer_step_one(self, browser): case_id = 735201 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.check_values_from_table(type_offer_name) page.remove_type_step_one() assert page.get_remove_flag(), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_edit_client_segment(self, browser): case_id = 890424 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.check_values_from_table(segment_name) assert page.check_edit(SC.SEGMENT_COMMENT, 'Комментарий'), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_remove_client_segment_step_two(self, browser): case_id = 890427 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.check_values_from_table(segment_name) page.remove_type_step_two() assert page.get_name_from_table() != segment_name, add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_offer_empty_name(self, browser): case_id = 735199 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.BUTTON) current_url = browser.current_url page.click_on_the_button(TotalLocators.BUTTON) assert current_url == browser.current_url, add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_type_offer(self, browser): case_id = 735191 page = TaskPage(browser, url) page.go_to_site() page.click_on_the_button(TotalLocators.BUTTON) page.enter_field(SC.OFFER_TYPE_NAME, type_offer_name) page.enter_field(SC.OFFER_TYPE_COMMENT, 'test_comment') page.click_on_the_button(TotalLocators.BUTTON) assert page.check_current_title(type_offer_name), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_client_segment(self, browser): case_id = 890422 page = TaskPage(browser, url) page.go_to_site() page.click_on_the_button(TotalLocators.BUTTON) page.enter_field(SC.SEGMENT_NAME, segment_name) page.enter_field(SC.SEGMENT_COMMENT, "test_comment") page.click_on_the_button(TotalLocators.BUTTON) assert page.check_current_title(segment_name), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_type_offer_empty_name(self, browser): case_id = 735192 page = TaskPage(browser, url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.BUTTON) page.click_on_the_button(TotalLocators.BUTTON) assert page.check_name_text_error(SC.NAME_ERROR, 'Необходимо заполнить «Имя».'), add_result_for_case(run_id, case_id, results[ 'failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_offer_dependency(self, browser): case_id = 735322 page = TaskPage(browser, offer_dependency_url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.BUTTON) page.enter_type_of_value(OD.OFFER, offer_name) page.enter_type_of_value(OD.PRODUCT, 'КЕНО') page.click_on_the_button(TotalLocators.BUTTON) assert page.check_current_title(offer_name), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def create_offer(self, browser): page = TaskPage(browser, offer_url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.BUTTON) page.enter_field(SC.OFFER_NAME, offer_name) page.enter_field(SC.OFFER_COMMENT, 'test_comment') page.click_on_the_button(SC.OFFER_CONTEXT) page.enter_type(SC.OFFER_TYPE, 1) page.enter_date(SC.OFFER_START_DATE, start_date) page.enter_date(SC.OFFER_FINISH_DATE, end_date) page.click_on_the_button(TotalLocators.BUTTON) assert page.check_current_title(offer_name)
def test_create_product_param(self, browser): case_id = 735769 page = TaskPage(browser, product_url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.LOOK_BUTTON_FROM_TABLE) page.click_on_the_button(TotalLocators.CREATE_PARAM_BUTTON) page.enter_field(SC.PARAM_VALUE, 120) name = page.get_text(SC.OFFER_NAME, SC.PRODUCT_NAME) page.click_on_the_button(TotalLocators.BUTTON) assert page.check_current_title(name), add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])
def test_create_product_param_empty_name(self, browser): case_id = 735770 page = TaskPage(browser, product_url) page.go_to_site() page.get_cookies() page.click_on_the_button(TotalLocators.LOOK_BUTTON_FROM_TABLE) page.click_on_the_button(TotalLocators.CREATE_PARAM_BUTTON) current_url = browser.current_url page.click_on_the_button(TotalLocators.BUTTON) assert current_url == browser.current_url, add_result_for_case( run_id, case_id, results['failed']) add_result_for_case(run_id, case_id, results['passed'])