text: sap.ui.define(["sap/ui/test/opaQunit","./pages/Home","./pages/Category","./pages/Product","./pages/Cart","./pages/Checkout","./pages/OrderCompleted","./pages/Welcome"],function(e){"use strict";QUnit.module("Buy Product Journey");e("Should see the category list",function(e,t,o){e.iStartMyApp();o.onHome.iShouldSeeTheCategoryList().and.iShouldSeeSomeEntriesInTheCategoryList()});e("Should see the product list",function(e,t,o){t.onHome.iPressOnTheFlatScreensCategory();o.onTheCategory.iShouldBeTakenToTheFlatScreensCategory().and.iShouldSeeTheProductList().and.iShouldSeeSomeEntriesInTheProductList()});e("Should see an avatar button on the product page",function(e,t,o){t.onTheCategory.iPressOnTheFirstProduct();o.onTheProduct.iShouldSeeAnAvatarButton()});e("Should add a product to the cart",function(e,t,o){t.onTheProduct.iAddTheDisplayedProductToTheCart();t.onTheProduct.iToggleTheCart();o.onTheCart.iShouldSeeTheProductInMyCart().and.iShouldSeeTheTotalPriceUpdated();o.iTeardownMyApp()});e("Should keep the cart when reloading",function(e,t,o){e.iStartMyApp({keepStorage:true});t.onHome.iPressOnTheFlatScreensCategory();t.onTheWelcomePage.iToggleTheCart();o.onTheCart.iShouldSeeTheProductInMyCart();o.iTeardownMyApp()});e("Should start the app with a bookmarkable cart product",function(e,t,o){e.iStartMyApp({keepStorage:true,hash:"category/FS/product/HT-1254/cart"});o.onTheProduct.iShouldSeeTheRightProduct()});e("Should navigate to checkout",function(e,t,o){t.onTheCart.iPressOnTheProceedButton();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should return to the home",function(e,t,o){t.onCheckout.iPressOnTheReturnToShopButton();o.onHome.iShouldSeeTheCategoryList().and.iShouldSeeSomeEntriesInTheCategoryList()});e("Should return to checkout",function(e,t,o){t.onTheWelcomePage.iToggleTheCart();t.onTheCart.iPressOnTheProceedButton();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should navigate to Payment Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheWizardStepPaymentTypeStep()});e("Should navigate to Credit Card Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldNotSeeTheStep4Button("creditCardStep")});e("Should see Step 4 Button",function(e,t,o){t.onCheckout.iEnterCreditCardInformation("My name","1234567891234567","123","01/2020");o.onCheckout.iShouldSeeTheStep4Button()});e("Should not see Step 4 Button when an information is missing",function(e,t,o){t.onCheckout.iEnterCreditCardInformation("My name","1234567891234567","13","01/2020");o.onCheckout.iShouldNotSeeTheStep4Button("creditCardStep").and.iShouldSeeTheFooterWithTheErrorButton()});e("Should see a message popover window",function(e,t,o){t.onCheckout.iPressOnTheButtonInTheFooter();o.onCheckout.iShouldSeeTheMessagePopover()});e("Should see Step 4 Button",function(e,t,o){t.onCheckout.iPressTheCloseButton().and.iEnterCreditCardInformation("My name","1234567891234567","123","01/2020");o.onCheckout.iShouldSeeTheStep4Button()});e("Should navigate to invoice Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldNotSeeTheStep4Button("invoiceStep")});e("Should invalidate Step 5",function(e,t,o){t.onCheckout.iEnterInvoiceAddressText("MyStr. 2","1m","someLetters","1234");o.onCheckout.iShouldNotSeeTheStep4Button("invoiceStep")});e("Should activate Step 5 Button",function(e,t,o){t.onCheckout.iEnterInvoiceAddressText("MyStreet.2","MyCity","1234","DE");o.onCheckout.iShouldSeeTheStep5Button()});e("Should navigate to Delivery Type Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheDeliveryTypeStep()});e("Should navigate to order summary",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheOrderSummary()});e("Should return to checkout",function(e,t,o){t.onCheckout.iPressOnTheEditButtonBacktoList();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should select Bank Transfer",function(e,t,o){t.onCheckout.iPressOnTheBankTransferButton().and.iPressOnTheYesButton();o.onCheckout.iShouldSeeTheStep3Button()});e("Should navigate to Bank Transfer",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheStep4Button()});e("Should navigate to invoice step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheStep5Button()});e("Should navigate to Delivery Type Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheDeliveryTypeStep()});e("Should navigate to order summary",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheOrderSummary()});e("Should return to checkout",function(e,t,o){t.onCheckout.iPressOnTheEditButtonBackToPaymentType();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should select Cash On Delivery",function(e,t,o){t.onCheckout.iPressOnTheCashOnDeliveryButton().and.iPressOnTheYesButton();o.onCheckout.iShouldSeeTheStep3Button()});e("Should navigate to Cash On Delivery",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldNotSeeTheStep4Button("cashOnDeliveryStep")});e("Should invalidate Step 4 Button",function(e,t,o){t.onCheckout.iEnterCashOnDeliveryText("FirstName","LastName","+4911111111","inf");o.onCheckout.iShouldNotSeeTheStep4Button("cashOnDeliveryStep").and.iShouldGetErrorMessageTextDoesNotMatchTypeForEmailField("inf")});e("Should invalidate Step 4 Button",function(e,t,o){t.onCheckout.iEnterCashOnDeliveryText("FirstName","LastName","+4911111111","inf.shop.com");o.onCheckout.iShouldNotSeeTheStep4Button("cashOnDeliveryStep").and.iShouldGetErrorMessageTextDoesNotMatchTypeForEmailField("inf.shop.com")});e("Should activate Step 4 Button",function(e,t,o){t.onCheckout.iEnterCashOnDeliveryText("FirstName","LastName","+4911111111","inf@shop.com");o.onCheckout.iShouldSeeTheStep4Button()});e("Should navigate to invoice Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheStep5Button()});e("Should navigate to Delivery Type Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheDeliveryTypeStep()});e("Should navigate to order summary",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheOrderSummary()});e("Should return to checkout",function(e,t,o){t.onCheckout.iPressOnTheEditButtonBackToInvoiceAddress();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should navigate to Delivery Address Step",function(e,t,o){t.onCheckout.iPressOnDifferentAddressCheckbox().and.iPressOnTheYesButton().and.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheDeliveryAddressStep()});e("Should activate Step 6 Button",function(e,t,o){t.onCheckout.iEnterDeliveryAddressText();o.onCheckout.iShouldSeeTheDeliveryStepButton()});e("Should navigate to Delivery Type Step",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheDeliveryTypeStep()});e("Should navigate to order summary",function(e,t,o){t.onCheckout.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheOrderSummary()});e("Should return to checkout",function(e,t,o){t.onCheckout.iPressOnTheEditButtonBackToDeliveryType();o.onCheckout.iShouldSeeTheWizardStepContentsStep()});e("Should select Express Delivery and navigate to order summary",function(e,t,o){t.onCheckout.iPressOnTheExpressDeliveryButton().and.iPressOnTheNextStepButton();o.onCheckout.iShouldSeeTheOrderSummary().and.iShouldSeeExpressDelivery()});e("Should submit order and navigate to order completed",function(e,t,o){t.onCheckout.iPressOnTheSubmitButton().and.iPressOnTheYesButton();o.onOrderCompleted.iShouldSeeTheOrderCompletedPage()});e("Should return to the shop welcome screen",function(e,t,o){t.onOrderCompleted.iPressOnTheReturnToShopButton();o.onTheWelcomePage.iShouldSeeTheWelcomePage();o.iTeardownMyApp()})});