Example #1
0
    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(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_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 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 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)