Example #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, '待转移的订单号和订单转移账户最新订单号不一致,疑订单转移有误')
Example #2
0
 def test_05_login(self):
     '''用户登录'''
     home.home_page().wait_page()
     BaseSteps.user_login(self.test_data['user_name_01'],
                          self.test_data['password_01'])
     self.wait_element_then_screenshot(
         self.d(resourceId="com.vova.android:id/tv_user_name"))
Example #3
0
 def setUpClass(cls):
     cls.d.app_clear('com.vova.android')
     cls.d.app_start("com.vova.android")
     # 无注册case别在watch中增加Shop Now,否则购物车为空时,会默认点击,返回上个页面在加车成功之前
     cls.watch_device(
         "Pretty Sure|Sure|Baik, saya paham.|GET IT!|总是允许|始终允许")
     cls.test_data = get_test_data(cls.d)
     cls.test_env = ReadConfig().get_test_env()
     BaseSteps.init_app_operation()
     BaseSteps.user_login(cls.test_data['user_name_02'],
                          cls.test_data['password_02'])
     cls.PAN = "EHFGA5967A"
     cls.CPF = '12649239700'
Example #4
0
 def test_01_express_goods_flow(self):
     '''海外仓商品下单流程验证'''
     if self.test_env == "test":
         self.d.app_clear('com.vova.android')
         self.d.app_start("com.vova.android")
         BaseSteps.init_app_operation()
         BaseSteps.user_login(self.test_data['user_name_02'],
                              self.test_data['password_02'])
     else:
         BaseSteps.change_country("France",
                                  self.test_data['normal_goods_id'],
                                  self.test_data['normal_goods_attr'])
         home.home_page().click_search_button()
         search.search_page().wait_page()
         search.search_page().click_search_box()
         search.search_page().wait_search_inner_page()
         search.search_page().click_inner_search_box()
         search.search_page().input_goods_id_to_search(
             self.test_data['express_good_id'])
         search.search_page().wait_goods_img()
         self.assertTrue(
             self.d(
                 resourceId="com.vova.android:id/iv_over_sea_img").exists(
                     timeout=4))
         search.search_page().click_item_img()
         commodity_details.commodity_details_page().click_more_attr_button()
         commodity_details.commodity_details_page().wait_attr_pop_up()
         self.assertTrue(
             self.d(resourceId="com.vova.android:id/iv_select_fbv").exists(
                 timeout=4))
         commodity_details.commodity_details_page().chose_express_shipping()
         attrs = self.test_data['express_good_attr']
         for attr in attrs:
             commodity_details.commodity_details_page().select_goods_attr(
                 attr)
         commodity_details.commodity_details_page().click_add_to_bag_button(
         )
         bag.bag_page().wait_page()
         self.assertTrue(
             self.d(
                 resourceId="com.vova.android:id/cl_express_ship").exists(
                     timeout=4))
         bag.bag_page().click_checkout_button()
         checkout_v2.checkout_page().wait_page()
         self.assertTrue(
             self.d(resourceId="com.vova.android:id/goods_fast_img").exists(
                 timeout=4))
         BasePage().press_back_to_home()
         BaseSteps.empty_shopping_bag()