OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.payments; | 5 package org.chromium.chrome.browser.payments; |
6 | 6 |
7 import android.support.test.filters.MediumTest; | 7 import android.support.test.filters.MediumTest; |
8 | 8 |
9 import org.junit.Assert; | 9 import org.junit.Assert; |
10 import org.junit.Rule; | 10 import org.junit.Rule; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 public void testShippingAddressFormat_BottomSheet() | 67 public void testShippingAddressFormat_BottomSheet() |
68 throws InterruptedException, ExecutionException, TimeoutException { | 68 throws InterruptedException, ExecutionException, TimeoutException { |
69 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); | 69 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); |
70 | 70 |
71 // Make sure that the shipping label on the bottomsheet does not include the country. | 71 // Make sure that the shipping label on the bottomsheet does not include the country. |
72 Assert.assertEquals("Jon Doe\nGoogle, 340 Main St, Los Angeles, CA 90291 \n555-555-5555", | 72 Assert.assertEquals("Jon Doe\nGoogle, 340 Main St, Los Angeles, CA 90291 \n555-555-5555", |
73 mPaymentRequestTestRule.getShippingAddressSummaryLabel()); | 73 mPaymentRequestTestRule.getShippingAddressSummaryLabel()); |
74 | 74 |
75 // Make sure shipping option summary on bottom sheet is displayed in a s ingle line | 75 // Make sure shipping option summary on bottom sheet is displayed in a s ingle line |
76 // as expected. | 76 // as expected. |
77 Assert.assertEquals("Free global shipping, $0.00", | 77 Assert.assertEquals( |
78 mPaymentRequestTestRule.getShippingOptionSummaryLabel()); | 78 "Free global shipping", mPaymentRequestTestRule.getShippingOptio nSummaryLabel()); |
gogerald1
2017/05/31 20:34:47
one space line below
wuandy1
2017/06/01 17:17:57
Done.
| |
79 // Make sure shipping cost is aligned to the right on bottom sheet. | |
gogerald1
2017/05/31 20:34:47
You are not checking alignment here.
Suggest: "//
wuandy1
2017/06/01 17:17:57
Done.
| |
80 Assert.assertEquals("$0.00", mPaymentRequestTestRule.getShippingOptionCo stSummaryLabel()); | |
79 } | 81 } |
80 | 82 |
81 /** Verifies that the shipping address format in fullsheet mode is as expect ed. */ | 83 /** Verifies that the shipping address format in fullsheet mode is as expect ed. */ |
82 @Test | 84 @Test |
83 @MediumTest | 85 @MediumTest |
84 @Feature({"Payments"}) | 86 @Feature({"Payments"}) |
85 public void testShippingAddressFormat_FullSheet() | 87 public void testShippingAddressFormat_FullSheet() |
86 throws InterruptedException, ExecutionException, TimeoutException { | 88 throws InterruptedException, ExecutionException, TimeoutException { |
87 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); | 89 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); |
88 | 90 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
250 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead yToEdit()); | 252 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead yToEdit()); |
251 | 253 |
252 // Cancel the editor by clicking Android back button. | 254 // Cancel the editor by clicking Android back button. |
253 mPaymentRequestTestRule.clickAndroidBackButtonInEditorAndWait( | 255 mPaymentRequestTestRule.clickAndroidBackButtonInEditorAndWait( |
254 mPaymentRequestTestRule.getReadyToPay()); | 256 mPaymentRequestTestRule.getReadyToPay()); |
255 | 257 |
256 // Expect the existing row to still be selected in the Shipping Address section. | 258 // Expect the existing row to still be selected in the Shipping Address section. |
257 mPaymentRequestTestRule.expectShippingAddressRowIsSelected(0); | 259 mPaymentRequestTestRule.expectShippingAddressRowIsSelected(0); |
258 } | 260 } |
259 } | 261 } |
OLD | NEW |