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

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

Issue 2571513004: [Payment Request] Update the logic when obtaining results from editors (Closed)
Patch Set: addressing test failures Created 4 years 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/PaymentRequestEmailTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
index 9b5e47b251c6bd2df5292e3715f7549991f6c9dc..c6237fe6e7e6e47d2a393bd9f3d22373f06f9246 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestEmailTest.java
@@ -4,16 +4,13 @@
package org.chromium.chrome.browser.payments;
-import android.content.DialogInterface;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.test.util.Feature;
-import org.chromium.base.test.util.FlakyTest;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.autofill.AutofillTestHelper;
import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile;
-import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
@@ -32,12 +29,11 @@ public class PaymentRequestEmailTest extends PaymentRequestTestBase {
throws InterruptedException, ExecutionException, TimeoutException {
AutofillTestHelper helper = new AutofillTestHelper();
// The user has a valid email address on disk.
- String billingAddressId = helper.setProfile(new AutofillProfile("", "https://example.com",
- true, "Jon Doe", "Google", "340 Main St", "CA", "Los Angeles", "", "90291", "",
- "US", "555-555-5555", "jon.doe@google.com", "en-US"));
- helper.setCreditCard(new CreditCard("", "https://example.com", true, true, "Jon Doe",
- "4111111111111111", "1111", "12", "2050", "visa", R.drawable.pr_visa,
- billingAddressId, "" /* serverId */));
+ helper.setProfile(new AutofillProfile("", "https://example.com", true, "Jon Doe", "Google",
+ "340 Main St", "CA", "Los Angeles", "", "90291", "", "US", "555-555-5555",
+ "jon.doe@google.com", "en-US"));
+
+ installPaymentApp(HAVE_INSTRUMENTS, IMMEDIATE_RESPONSE);
}
/** Provide the existing valid email address to the merchant. */
@@ -45,15 +41,12 @@ public class PaymentRequestEmailTest extends PaymentRequestTestBase {
@Feature({"Payments"})
public void testPay() throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
- clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
- setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
- clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
+ clickAndWait(R.id.button_primary, mDismissed);
expectResultContains(new String[] {"jon.doe@google.com"});
}
/** Attempt to add an invalid email address and cancel the transaction. */
@MediumTest
- @FlakyTest(message = "crbug.com/673371")
@Feature({"Payments"})
public void testAddInvalidEmailAndCancel()
throws InterruptedException, ExecutionException, TimeoutException {
@@ -77,9 +70,8 @@ public class PaymentRequestEmailTest extends PaymentRequestTestBase {
clickInContactInfoAndWait(R.id.payments_add_option_button, mReadyToEdit);
setTextInEditorAndWait(new String[] {"jane.jones@google.com"}, mEditorTextUpdate);
clickInEditorAndWait(R.id.payments_edit_done_button, mReadyToPay);
- clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
- setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mReadyToUnmask);
- clickCardUnmaskButtonAndWait(DialogInterface.BUTTON_POSITIVE, mDismissed);
+
+ clickAndWait(R.id.button_primary, mDismissed);
expectResultContains(new String[] {"jane.jones@google.com"});
}

Powered by Google App Engine
This is Rietveld 408576698