Example #1
0
    def test_refund_charge_partial(self):
        ch_id = BatchPayment.wx_pub()
        time.sleep(2)

        self.home_page.search_charge(ch_id)
        self.home_page.search_charge_button()

        order_page = OrderPage(self.driver)
        order_page.click_refund_Button()
        order_page.input_password_confirm(True)
        order_page.refund_partial()
        order_page.confirm_refund()
        order_page.check_refund_success()

        order_page.close_detail()
Example #2
0
    def test_refund_charge_all_Test(self):
        ch_id = BatchPayment_Test.bfb()
        BatchPayment_Test.notify(ch_id)
        time.sleep(2)
        print ch_id
        self.home_page.search_charge(ch_id)
        self.home_page.search_charge_button()

        order_page = OrderPage(self.driver)
        order_page.click_refund_Button()
        order_page.input_password_confirm(True)
        order_page.refund_all()
        order_page.confirm_refund()
        order_page.check_refund_success()

        order_page.close_detail()
Example #3
0
    def test_refund_charge_all(self):
        ch_id = BatchPayment.wx_pub()
        # wait for seconds, it runs too fast that notify status cannot update immediately.
        time.sleep(2)

        self.home_page.search_charge(ch_id)
        self.home_page.search_charge_button()

        order_page = OrderPage(self.driver)
        order_page.click_refund_Button()
        order_page.input_password_confirm(True)
        order_page.refund_all()
        order_page.confirm_refund()
        order_page.check_refund_success()

        order_page.close_detail()
Example #4
0
    def test_refund_amount_alert(self):
        ch_id = BatchPayment.wx_pub()
        # wait for seconds, it runs too fast that notify status cannot update immediately.
        time.sleep(2)
        self.home_page.search_charge(ch_id)
        self.home_page.search_charge_button()
        order_page = OrderPage(self.driver)
        order_page.click_refund_Button()
        order_page.input_password_confirm(True)
        # test_refund_amount_greater
        order_page.refund_greater()
        order_page.confirm_refund()
        alert_message = order_page.verify_alert()
        order_page.close_alert()
        self.assertIn(u"退款金额超过可退金额",alert_message)

        #test_refund_amount_minus
        order_page.refund_minus()
        order_page.confirm_refund()
        alert_message = order_page.verify_alert()
        order_page.close_alert()
        self.assertIn(u"无效的退款金额",alert_message)

        #test_refund_amount_not_number
        order_page.refund_not_number()
        order_page.confirm_refund()
        alert_message = order_page.verify_alert()
        order_page.close_alert()
        self.assertIn(u"无效的值 amount",alert_message)

        # refund_comment_toolong
        order_page.refund_comment_toolong()
        order_page.confirm_refund()
        alert_message = order_page.verify_alert()
        order_page.close_alert()
        order_page.close_refund()
        self.assertIn(u"退款描述过长", alert_message)

        #close detail page
        order_page.close_detail()