Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteContactDetailsTest.java

Issue 2368073002: PaymentRequest: Add payer name field to payer info editor. (android) (Closed)
Patch Set: PaymentRequest: Add payer name field to payer info editor. (android) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 /** Attempt to update the contact information with invalid data and cancel t he transaction. */ 42 /** Attempt to update the contact information with invalid data and cancel t he transaction. */
43 @MediumTest 43 @MediumTest
44 @Feature({"Payments"}) 44 @Feature({"Payments"})
45 public void testEditIncompleteContactAndCancel() 45 public void testEditIncompleteContactAndCancel()
46 throws InterruptedException, ExecutionException, TimeoutException { 46 throws InterruptedException, ExecutionException, TimeoutException {
47 triggerUIAndWait(mReadyForInput); 47 triggerUIAndWait(mReadyForInput);
48 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput); 48 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
49 clickInContactInfoAndWait(R.id.payments_first_radio_button, mReadyToEdit ); 49 clickInContactInfoAndWait(R.id.payments_first_radio_button, mReadyToEdit );
50 setTextInEditorAndWait(new String[] {"---", "jane.jones"}, mEditorTextUp date); 50 setTextInEditorAndWait(new String[] {"", "---", "jane.jones"}, mEditorTe xtUpdate);
51 clickInEditorAndWait(R.id.payments_edit_done_button, mEditorValidationEr ror); 51 clickInEditorAndWait(R.id.payments_edit_done_button, mEditorValidationEr ror);
52 clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyForInput); 52 clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyForInput);
53 clickAndWait(R.id.close_button, mDismissed); 53 clickAndWait(R.id.close_button, mDismissed);
54 expectResultContains(new String[] {"Request cancelled"}); 54 expectResultContains(new String[] {"Request cancelled"});
55 } 55 }
56 56
57 /** Update the contact information with valid data and provide that to the m erchant. */ 57 /** Update the contact information with valid data and provide that to the m erchant. */
58 @MediumTest 58 @MediumTest
59 @Feature({"Payments"}) 59 @Feature({"Payments"})
60 public void testEditIncompleteContactAndPay() 60 public void testEditIncompleteContactAndPay()
61 throws InterruptedException, ExecutionException, TimeoutException { 61 throws InterruptedException, ExecutionException, TimeoutException {
62 triggerUIAndWait(mReadyForInput); 62 triggerUIAndWait(mReadyForInput);
63 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput); 63 clickInContactInfoAndWait(R.id.payments_section, mReadyForInput);
64 clickInContactInfoAndWait(R.id.payments_first_radio_button, mReadyToEdit ); 64 clickInContactInfoAndWait(R.id.payments_first_radio_button, mReadyToEdit );
65 setTextInEditorAndWait(new String[] {"555-555-5555", "jon.doe@google.com "}, 65 setTextInEditorAndWait(new String[] {"Jon Doe", "555-555-5555", "jon.doe @google.com"},
66 mEditorTextUpdate); 66 mEditorTextUpdate);
67 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay); 67 clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
68 clickAndWait(R.id.button_primary, mReadyForUnmaskInput); 68 clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
69 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask); 69 setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyTo Unmask);
70 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed ); 70 clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed );
71 expectResultContains(new String[] {"555-555-5555", "jon.doe@google.com"} ); 71 expectResultContains(new String[] {"Jon Doe", "555-555-5555", "jon.doe@g oogle.com"});
72 } 72 }
73 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698