Chromium Code Reviews| 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()); |
| 79 | |
| 80 // Make sure shipping cost is display in the right summary text view. | |
|
gogerald1
2017/06/06 16:55:20
is displayed...
wuandy1
2017/06/07 01:58:04
Done.
| |
| 81 Assert.assertEquals( | |
| 82 "$0.00", mPaymentRequestTestRule.getShippingOptionCostSummaryLab elOnBottomSheet()); | |
| 79 } | 83 } |
| 80 | 84 |
| 81 /** Verifies that the shipping address format in fullsheet mode is as expect ed. */ | 85 /** Verifies that the shipping address format in fullsheet mode is as expect ed. */ |
| 82 @Test | 86 @Test |
| 83 @MediumTest | 87 @MediumTest |
| 84 @Feature({"Payments"}) | 88 @Feature({"Payments"}) |
| 85 public void testShippingAddressFormat_FullSheet() | 89 public void testShippingAddressFormat_FullSheet() |
| 86 throws InterruptedException, ExecutionException, TimeoutException { | 90 throws InterruptedException, ExecutionException, TimeoutException { |
| 87 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); | 91 mPaymentRequestTestRule.triggerUIAndWait(mPaymentRequestTestRule.getRead yToPay()); |
| 88 | 92 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead yToEdit()); | 254 R.id.payments_add_option_button, mPaymentRequestTestRule.getRead yToEdit()); |
| 251 | 255 |
| 252 // Cancel the editor by clicking Android back button. | 256 // Cancel the editor by clicking Android back button. |
| 253 mPaymentRequestTestRule.clickAndroidBackButtonInEditorAndWait( | 257 mPaymentRequestTestRule.clickAndroidBackButtonInEditorAndWait( |
| 254 mPaymentRequestTestRule.getReadyToPay()); | 258 mPaymentRequestTestRule.getReadyToPay()); |
| 255 | 259 |
| 256 // Expect the existing row to still be selected in the Shipping Address section. | 260 // Expect the existing row to still be selected in the Shipping Address section. |
| 257 mPaymentRequestTestRule.expectShippingAddressRowIsSelected(0); | 261 mPaymentRequestTestRule.expectShippingAddressRowIsSelected(0); |
| 258 } | 262 } |
| 259 } | 263 } |
| OLD | NEW |