///Abre Alert de compra de AD, senão tiver Internet Abre alert de Conexão private void LoadADSAlertPurchase(CharType type) { GameObject req = Resources.Load <GameObject> ("Prefabs/AlertADSPurchase_Canvas"); GameObject inst = Instantiate(req as GameObject, Vector3.zero, Quaternion.identity) as GameObject; purchase = inst.GetComponent <PurchaseAlert>(); purchase.purchase = ADSChar(type); SetAllButtonsInteractable(true); }
private void ValidatePurchaseAlertMessage(PurchaseAlert purchaseAlert) { var currentDate = DateTime.Today.AddMonths(-1).ToString("d/M/yyyy", CultureInfo.CreateSpecificCulture("en-US")); Assert.That(purchaseAlert.IsPurchaseAlertDisplayed(), Is.True); Assert.AreEqual(User.Name, purchaseAlert.GetPurchaseUserName()); Assert.AreEqual(CartPage.TotalAmount + " USD", purchaseAlert.GetPurchaseTotalAmount()); Assert.AreEqual(User.CreditCardNumber, purchaseAlert.GetPurchaseCreditCardNumber()); Assert.AreEqual(currentDate, purchaseAlert.GetPurchaseDate()); }
public void Should_Add_Produc_And_Submit_OrderPage() { var homePage = loginPage.LoginApplication("*****@*****.**", "automation"); productPage = homePage.loggedInMenuItemControl.SelectProductAndNavigateToProductPage(NewPhone); TotalAmount = productPage.AddProduct(); var expectedResult = new AlertsType().ProductAddedSuccessfully; var actualResult = productPage.GetAlert(); Assert.AreEqual(expectedResult, actualResult); cartPage = homePage.loggedInMenuItemControl.NavigateToCart(); Assert.IsTrue(cartPage.IsProductAddedToCart(NewPhone.ProductName)); orderPage = cartPage.PlaceOrder(); purchaseAlert = orderPage.SetOrder(new AddOrderElements()); Assert.IsTrue(purchaseAlert.IsPurchaseAlertDisplayed()); }