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

Unified Diff: chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc

Issue 2855203002: [Payments] Display the shipping option error alongside the address (Closed)
Patch Set: android test fix Created 3 years, 7 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/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc
index f5fe1dc08dc825c791fec174be5c9d7bb4645614..9e73b878021fdb8f71218e8e0bd91ab55692c4a9 100644
--- a/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc
+++ b/chrome/browser/ui/views/payments/shipping_option_view_controller_browsertest.cc
@@ -26,7 +26,7 @@ class PaymentRequestShippingOptionViewControllerTest
};
IN_PROC_BROWSER_TEST_F(PaymentRequestShippingOptionViewControllerTest,
- OrderSummaryReflectsShippingOption) {
+ SelectingVariousShippingOptions) {
// In MI state, shipping is $5.00.
autofill::AutofillProfile michigan = autofill::test::GetFullProfile2();
michigan.set_use_count(100U);
@@ -80,6 +80,18 @@ IN_PROC_BROWSER_TEST_F(PaymentRequestShippingOptionViewControllerTest,
// available for Canada.
EXPECT_EQ(nullptr, dialog_view()->GetViewByID(static_cast<int>(
DialogViewID::PAYMENT_SHEET_SHIPPING_OPTION_SECTION)));
+
+ // There is now an appropriate error that is shown in the shipping address
+ // section of the Payment Sheet. The string is returned by the merchant.
+ EXPECT_EQ(base::ASCIIToUTF16("We do not ship to this address"),
+ GetProfileLabelValues(
+ DialogViewID::PAYMENT_SHEET_SHIPPING_ADDRESS_SECTION)
+ .back());
+
+ // Go to the address selector and see this error as well.
+ OpenShippingAddressSectionScreen();
+ EXPECT_EQ(base::ASCIIToUTF16("We do not ship to this address"),
+ GetLabelText(DialogViewID::SHIPPING_ADDRESS_OPTION_ERROR));
}
} // namespace payments
« no previous file with comments | « chrome/browser/ui/views/payments/shipping_option_view_controller.cc ('k') | chrome/test/data/payments/dynamic_shipping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698