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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java

Issue 2081533002: Edit contacts UI for PaymentRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@contactDetails
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
index 2820aae6166e1bd1776374b474bc6e872466197b..309d4d81ef1e792b6418d4da59608e2eda5553a3 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsTest.java
@@ -38,10 +38,42 @@ public class PaymentRequestContactDetailsTest extends PaymentRequestTestBase {
public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
- typeInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123",
- mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
- clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE,
- mReadyToUnmask.getTarget(), mDismissed);
+ typeInCardUnmaskDialogAndWait(
+ R.id.card_unmask_input, "123", mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
+ clickCardUnmaskButtonAndWait(
+ DialogInterface.BUTTON_POSITIVE, mReadyToUnmask.getTarget(), mDismissed);
expectResultContains(new String[] {"555-555-5555", "jon.doe@google.com"});
}
+
+ @MediumTest
+ public void testAddInvalidContactAndCancel()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerUIAndWait(mReadyToPay);
+ clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_section, mReadyForInput);
+ clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_add_option_button, mReadyToEdit);
+ typeInEditDialog(R.id.payments_edit_phone_input, "+++");
+ typeInEditDialog(R.id.payments_edit_email_input, "jane.jones");
+ clickAndWait(
+ CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_done_button, mEditorValidationError);
+ clickAndWait(CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_cancel_button, mEditorDismissed);
+ clickAndWait(R.id.close_button, mDismissed);
+ expectResultContains(new String[] {"Request cancelled"});
+ }
+
+ @MediumTest
+ public void testAddContactAndPay()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerUIAndWait(mReadyToPay);
+ clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_section, mReadyForInput);
+ clickAndWait(CONSTRAINT_CONTACT_DETAILS, R.id.payments_add_option_button, mReadyToEdit);
+ typeInEditDialog(R.id.payments_edit_phone_input, "999-999-9999");
+ typeInEditDialog(R.id.payments_edit_email_input, "jane.jones@google.com");
+ clickAndWait(CONSTRAINT_EDIT_DIALOG, R.id.payments_edit_done_button, mReadyToPay);
+ clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
+ typeInCardUnmaskDialogAndWait(
+ R.id.card_unmask_input, "123", mReadyForUnmaskInput.getTarget(), mReadyToUnmask);
+ clickCardUnmaskButtonAndWait(
+ DialogInterface.BUTTON_POSITIVE, mReadyToUnmask.getTarget(), mDismissed);
+ expectResultContains(new String[] {"999-999-9999", "jane.jones@google.com"});
+ }
}

Powered by Google App Engine
This is Rietveld 408576698