def test_02_change_new_address_pay(self): '''波兰dotpay-地址切换为新增地址支付''' BaseSteps.one_step_to_checkout_without_coupon( "Poland", self.test_data['normal_goods_id'], self.test_data['normal_goods_attr']) BaseSteps.ensure_needed_country_and_address('Poland') checkout_v2.checkout_page().click_default_address() shipping_address.shipping_address_page().wait_page() shipping_address.shipping_address_page( ).click_setting_add_address_button() BaseSteps.add_shipping_address_in_order('dotpay') self.assertTrue( self.d(resourceId="com.vova.android:id/addressDesTv", textContains='dotpay').exists(timeout=2)) BaseSteps.checkout_to_change_payment_method('Dotpay') payment.payment_page().click_confirm_to_pay() if self.test_env == "test": self.wait_element_then_screenshot( self.d(resourceId="com.vova.android:id/failure_tip_text")) else: self.wait_element_then_screenshot( self.d(resourceId="com.vova.android:id/channelLabelTv")) BasePage().press_back_to_home() BaseSteps.go_shipping_address_edit_page("Poland") add_address_v2.add_address_page().click_del_button_for_address_v2()
def test_05_modify_address_pay(self): '''荷兰ideal-修改原地址支付''' if self.test_env == "test": attrs = None else: attrs = self.test_data['netherlands_goods_attr'] BaseSteps.one_step_to_checkout_without_coupon( "Netherlands", self.test_data['netherlands_goods_id'], attrs=attrs) BaseSteps.ensure_needed_country_and_address('Netherlands') checkout_v2.checkout_page().click_default_address() shipping_address.shipping_address_page().wait_page() shipping_address.shipping_address_page( ).click_edit_button_for_address_v2() add_address_v2.add_address_page().input_address('updated') add_address_v2.add_address_page().click_save_button() checkout_v2.checkout_page().wait_page() self.assertTrue( self.d(resourceId="com.vova.android:id/addressDesTv", textContains='updated').exists(timeout=2)) BaseSteps.checkout_to_change_payment_method("iDeal") payment.payment_page().click_confirm_to_pay() if self.test_env == "test": self.wait_element_then_screenshot( self.d(resourceId="android:id/message")) else: payment.payment_page().wait_payment_methods() payment.payment_page().click_ideal_pay() self.wait_element_then_screenshot( self.d(resourceId="nl.rabomobiel:id/message")) BasePage().press_back_to_home() BaseSteps.go_shipping_address_edit_page("Netherlands") add_address_v2.add_address_page().input_address( self.test_data['detail_address']) add_address_v2.add_address_page().click_save_button() self.assertTrue( self.d(resourceId="com.vova.android:id/addressDesTv", textContains=self.test_data['detail_address']).exists( timeout=15))