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

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

Issue 2706043004: [Payments] Add integration test for canceling editor by clicking Android back button (Closed)
Patch Set: Created 3 years, 10 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/PaymentRequestShippingAddressTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java
index 87d0dd4a6b79a7884ab35de6e60535635331f81f..2e3c6ad4275b1baae91ead98d8442c79ad29f254 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestShippingAddressTest.java
@@ -117,20 +117,37 @@ public class PaymentRequestShippingAddressTest extends PaymentRequestTestBase {
/** Test that going into the editor and cancelling will leave the row checked. */
@MediumTest
@Feature({"Payments"})
- public void testEditShippingAddressAndCancelEditorShouldKeepAddressSelected()
+ public void testEditShippingAddressAndCancelEditorShouldKeepAddressSelected_1()
throws InterruptedException, ExecutionException, TimeoutException {
triggerUIAndWait(mReadyToPay);
clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput);
expectShippingAddressRowIsSelected(0);
clickInShippingAddressAndWait(R.id.payments_open_editor_pencil_button, mReadyToEdit);
- // Cancel the editor.
+ // Cancel the editor by clicking 'CANCEL' button in the editor view.
clickInEditorAndWait(R.id.payments_edit_cancel_button, mReadyToPay);
// Expect the row to still be selected in the Shipping Address section.
expectShippingAddressRowIsSelected(0);
}
+ /** Test that going into the editor and cancelling will leave the row checked. */
+ @MediumTest
+ @Feature({"Payments"})
+ public void testEditShippingAddressAndCancelEditorShouldKeepAddressSelected_2()
please use gerrit instead 2017/02/21 19:33:08 Let's remove the _1 and _2 suffixes for these meth
gogerald1 2017/02/21 20:44:03 Done.
+ throws InterruptedException, ExecutionException, TimeoutException {
+ triggerUIAndWait(mReadyToPay);
+ clickInShippingSummaryAndWait(R.id.payments_section, mReadyForInput);
+ expectShippingAddressRowIsSelected(0);
+ clickInShippingAddressAndWait(R.id.payments_open_editor_pencil_button, mReadyToEdit);
+
+ // Cancel the editor by clicking Android back button.
+ clickAndroidBackButtonInEditorAndWait(mReadyToPay);
+
+ // Expect the row to still be selected in the Shipping Address section.
+ expectShippingAddressRowIsSelected(0);
+ }
+
/** Test that going into the "add" flow and cancelling will leave the existing row checked. */
@MediumTest
@Feature({"Payments"})

Powered by Google App Engine
This is Rietveld 408576698