Пример #1
0
    def test_01_transfer_order(self):
        '''订单转移'''
        BaseSteps.search_goods_by_id(self.test_data['normal_goods_id'])
        BaseSteps.buy_goods_with_attr(self.test_data['normal_goods_attr'])
        BaseSteps.checkout_without_coupon()

        BaseSteps.ensure_needed_country_and_address('Indonesia')
        BaseSteps.checkout_to_change_payment_method('Credit')
        self.press_back_until_special_element(self.d(
            resourceId="com.vova.android:id/order_support_type",
            text='OTHER DETAILS'),
                                              timeout=5)
        order_details.order_details_page().wait_page()
        a = order_details.order_details_page().get_order_id()
        log.i('待转移的订单号:%s' % a)
        BasePage().press_back_to_home()
        BaseSteps.user_login(self.test_data['user_name_02'],
                             self.test_data['password_02'])
        user_center.user_page().click_my_orders_button()
        my_orders.my_orders_page().wait_page()
        my_orders.my_orders_page().click_unpaid_button()
        order_details.order_details_page().wait_page()
        b = order_details.order_details_page().get_order_id()
        log.i('订单转移账户最新订单号:%s' % b)
        self.assertEqual(a, b, '待转移的订单号和订单转移账户最新订单号不一致,疑订单转移有误')
Пример #2
0
    def test_04_login_to_checkout_pay(self):
        '''印度UPI-登录后支付'''
        BaseSteps.user_logout()
        BaseSteps.search_goods_by_id(self.test_data['normal_goods_id'])
        BaseSteps.buy_goods_with_attr(self.test_data['normal_goods_attr'])
        bag.bag_page().click_checkout_button()
        login.login_page().wait_page()
        login.login_page().login(self.test_data['user_name_02'],
                                 self.test_data['password_02'])

        checkout_v2.checkout_page().wait_page()
        BaseSteps.ensure_needed_country_and_address('India')
        BaseSteps.checkout_to_change_payment_method('UPI')

        payment.payment_page().input_pay_code("UPI", self.PAN)
        payment.payment_page().click_confirm_to_pay()
        if self.test_env == "test":
            self.wait_element_then_screenshot(self.d(resourceId="root"))
        else:
            self.wait_element_then_screenshot(self.d(resourceId="tab-title"))