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

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

Issue 2538543002: [Payments] Add detailed error messages and title for card unmask prompt. (Closed)
Patch Set: Addressed Rouslan's comments 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/PaymentRequestFreeShippingTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
index bf21cf14dd7f0596c20ac8c0010f33f9c2d6ec62..ce26e7c49e2b9193fe8b22affa9bf40f1a3b351a 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestFreeShippingTest.java
@@ -218,4 +218,28 @@ public class PaymentRequestFreeShippingTest extends PaymentRequestTestBase {
"PaymentRequest.RequestedInformation", i));
}
}
+
+ /**
+ * Tests the different card unmask error messages for a non expired card.
+ */
+ @MediumTest
+ @Feature({"Payments"})
+ public void testPromptErrorMessages()
+ throws InterruptedException, ExecutionException, TimeoutException {
+ // Click pay to get to the card unmask prompt.
+ triggerUIAndWait(mReadyToPay);
+ clickAndWait(R.id.button_primary, mReadyForUnmaskInput);
+
+ // Set valid arguments.
+ setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mUnmaskValidationDone);
+ assertTrue(getUnmaskPromptErrorMessage().equals(""));
+
+ // Set an invalid CVC.
+ setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123123", mUnmaskValidationDone);
+ assertTrue(getUnmaskPromptErrorMessage().equals("Check your CVC and try again"));
+
+ // Set valid arguments again.
+ setTextInCardUnmaskDialogAndWait(R.id.card_unmask_input, "123", mUnmaskValidationDone);
+ assertTrue(getUnmaskPromptErrorMessage().equals(""));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698