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.content.DialogInterface; | 7 import android.content.DialogInterface; |
8 import android.test.suitebuilder.annotation.MediumTest; | 8 import android.test.suitebuilder.annotation.MediumTest; |
9 | 9 |
10 import org.chromium.chrome.R; | 10 import org.chromium.chrome.R; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 "Mountain View", "CA", "94043", "999-999-9999"}); | 79 "Mountain View", "CA", "94043", "999-999-9999"}); |
80 } | 80 } |
81 | 81 |
82 /** Change the country in the spinner, add a valid address, and complete the
transaction. */ | 82 /** Change the country in the spinner, add a valid address, and complete the
transaction. */ |
83 @MediumTest | 83 @MediumTest |
84 public void testChangeCountryAddAddressAndPay() | 84 public void testChangeCountryAddAddressAndPay() |
85 throws InterruptedException, ExecutionException, TimeoutException { | 85 throws InterruptedException, ExecutionException, TimeoutException { |
86 triggerUIAndWait(mReadyToPay); | 86 triggerUIAndWait(mReadyToPay); |
87 clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput); | 87 clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput); |
88 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE
dit); | 88 clickInShippingAddressAndWait(R.id.payments_add_option_button, mReadyToE
dit); |
89 setSpinnerSelectionInEditor(0 /* Afghanistan */, mReadyToEdit); | 89 setSpinnerSelectionInEditorAndWait(0 /* Afghanistan */, mReadyToEdit); |
90 setTextInEditorAndWait(new String[] {"Alice", "Supreme Court", "Airport
Road", "Kabul", | 90 setTextInEditorAndWait(new String[] {"Alice", "Supreme Court", "Airport
Road", "Kabul", |
91 "999-999-9999"}, mEditorTextUpdate); | 91 "999-999-9999"}, mEditorTextUpdate); |
92 clickInEditorAndWait(R.id.payments_edit_done_button, mEditorDismissed); | 92 clickInEditorAndWait(R.id.payments_edit_done_button, mEditorDismissed); |
93 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); | 93 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); |
94 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo
Unmask); | 94 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo
Unmask); |
95 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed
); | 95 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed
); |
96 expectResultContains(new String[] {"Alice", "Supreme Court", "Airport Ro
ad", "Kabul", | 96 expectResultContains(new String[] {"Alice", "Supreme Court", "Airport Ro
ad", "Kabul", |
97 "999-999-9999"}); | 97 "999-999-9999"}); |
98 } | 98 } |
99 } | 99 } |
OLD | NEW |