public void CheckOut_NoAddresValidation_WS_1306() { if (false) { Assert.Ignore(); } else { GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall(); mallPage.CheckOptionPurchaseType("Email (Instant)"); CompanyGiftCard giftCard = mallPage.SearchCompany("Buffalo").SelectCompany(); CheckOutPage checkout = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart().ClickCheckOut().ClickNext(); Assert.AreEqual("This field is required.", checkout.GetErrorMsgFirstName(), "Error msg is not show or incorrect in first name"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgLastName(), "Error msg is not show or incorrect in last name"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgAddress(), "Error msg is not show or incorrect in Address"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgCity(), "Error msg is not show or incorrect in city"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgZip(), "Error msg is not show or incorrect in Zip code"); Assert.AreEqual("This field is required.", checkout.GetErrorMsgPhone(), "Error msg is not show or incorrect in phone number"); } }
//WS_1118 public void Checkout_ShippingValidateFullNamePT1_WS_1118() { if (false) { Assert.Ignore(); } else { string name = "Foot Locker", deliver = "email"; GoToMallHomePage mallPage = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem(); CompanyGiftCard giftCardPage = mallPage.SearchCompany(name).SelectCompany(); Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount"); giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount(); Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available"); CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart(); Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart"); CheckOutPage checkout = cartPage.ClickCheckOut(); checkout.FillName("A") .FillLastName("A") .FillAddress("123 Test"); Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgFirstName(), "The Error Message is not present or show"); Assert.AreEqual("Please enter at least 2 characters.", checkout.GetErrorMsgLastName(), "The Error Message is not present or show"); } }
//WS_1120 public void Checkout_ShippingValidateFullNamePT2_WS_1120() { if (!DataParser.ReturnExecution("WS_1120")) { Assert.Ignore(); } else { string name = "Foot Locker", deliver = "email"; GoToMallHomePage mallPage = InitialPage.Go().Logon().ClickLogin().NavigateToRedeem(); CompanyGiftCard giftCardPage = mallPage.SearchCompany(name).SelectCompany(); Assert.AreEqual("10", giftCardPage.GetAmount(), "10 is not the default amount"); giftCardPage.ClickPlusAmount().ClickPlusAmount().ClickPlusAmount(); Assert.IsTrue(giftCardPage.IsQtyAvailable(), "Quantity field is available"); CompanyGifCart cartPage = giftCardPage.ClickAddToCart().ClickGoToCart(); Assert.IsTrue(cartPage.IsFootLockerAdded(), "FootLocker was not added to the cart"); CheckOutPage checkout = cartPage.ClickCheckOut(); //SCENARIO B checkout.FillName("Test") .FillLastName("Test") .FillAddress("123 Test Street") .FillCity("Test") .FillZipCode("11101") .FillPhoneNumber("111 111 1111") .ClickNext(); Assert.IsTrue(checkout.IsPaymentOptionAvailable(), "Payment option is not available"); } }
public void Cart_DeleteItem_WS_1313() { if (false) { Assert.Ignore(); } else { GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall(); mallPage.CheckOptionPurchaseType("Email (Instant)"); CompanyGiftCard giftCard = mallPage.SearchCompany("Groupon").SelectCompany(); CompanyGifCart gifcart = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart(); Assert.IsTrue(gifcart.IsGrouponAdded(), "Groupon was not added"); gifcart.ClickMinusQuant(); Thread.Sleep(1000); Assert.IsFalse(gifcart.IsGrouponAdded(), "Groupon was not added"); gifcart.Refresh(); Assert.IsFalse(gifcart.IsGrouponAdded(), "Groupon was not added"); } }
public void Cart_PayCalculation_WS_1315() { if (!DataParser.ReturnExecution("WS_1315")) { Assert.Ignore(); } else { GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall(); mallPage.CheckOptionPurchaseType("Email (Instant)"); CompanyGiftCard giftCard = mallPage.SearchCompany("Groupon").SelectCompany(); CompanyGifCart gifcart = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart(); int total = gifcart.GetTotal(), quant = gifcart.GetQuantity(), amount = gifcart.GetAmount(); Assert.AreEqual(total, quant * amount, "Is not equal"); gifcart.ClickPlusQuant(); gifcart.Refresh(); total = gifcart.GetTotal(); quant = gifcart.GetQuantity(); amount = gifcart.GetAmount(); Assert.AreEqual(total, quant * amount, "Is not equal"); } }
public void CheckOut_WrongZip_WS_1307() { if (!DataParser.ReturnExecution("WS_1307")) { Assert.Ignore(); } else { _file = "Resources\\" + client + "\\TestsData\\WS_1307.xml"; string company = RedeemData.GetRedeemCompany(_file), firstname = RedeemData.GetRedeemFirstName(_file), secondname = RedeemData.GetRedeemSecondName(_file), address = RedeemData.GetRedeemAddress(_file), city = RedeemData.GetRedeemCity(_file), zip = RedeemData.GetRedeemZip(_file), phone = RedeemData.GetRedeemPhone(_file), state = RedeemData.GetRedeemState(_file); GoToMallHomePage mallPage = InitialPage.Go().EnterId(client).Logon().ClickLogin().NavigateToMall(); mallPage.CheckOptionPurchaseType("Email (Instant)"); CompanyGiftCard giftCard = mallPage.SearchCompany("Buffalo").SelectCompany(); CheckOutPage checkout = giftCard.ClickPlusAmount().ClickAddToCart().ClickGoToCart().ClickCheckOut(); checkout.FillName(firstname) .FillLastName(secondname) .FillAddress(address) .FillCity(city) .SelectState(state) .FillZipCode(zip) .FillPhoneNumber(phone); Assert.IsFalse(checkout.CannotEditEmail(), "Email txt field is editable"); checkout.ClickNext(); Assert.AreEqual("We got you covered Work Stride", checkout.GetNoCreditCardUseMsg(), "The message is wrong or its possible to use the credit card"); Assert.AreEqual("Your rewards have covered your balance.\r\nEnjoy your gift.", checkout.GetNoCreditCardUseMsgSubtitle(), "The message is wrong or its possible to use the credit card"); checkout.ClickNextPayment().ClickCheckOut(); // BUG not showing error msg } }