Example #1
0
 public void CheckOut_InsufficientFunds_WS_1199()
 {
     if (!DataParser.ReturnExecution("WS_1199"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1199.xml";
         string company          = RedeemData.GetRedeemCompany(_file),
                creditcardnumber = RedeemData.GetRedeemCreditCardNumber(_file)
         ,
                creditcardname        = RedeemData.GetRedeemCreditCardName(_file),
                creditcardexpiremonth = RedeemData.GetRedeemCreditCardExpireMonth(_file),
                creditcardexpireyear  = RedeemData.GetRedeemCreditCardExpireYear(_file)
         ,
                creditcardCDI = RedeemData.GetRedeemCreditCardCDI(_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);
         MainHomePage mall    = InitialPage.Go().Logon().ClickLogin();
         var          gif     = mall.NavigateToRedeemA().SearchCompany(company);
         Assert.AreEqual("Amazon.com", gif.GetGifCardTitle(), "The gif card is not amazon");
         var gifcard = gif.SelectCompany().ClickPlusAmount().ClickPlusQuantity(20).ClickAddToCart();
         Assert.AreEqual("Your item has been added to your cart!", gifcard.GetSuccesfullMsg(),
                         "succesfull msg is not well spell");
         var checkout = gifcard.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().FillCreditCardNumber(creditcardnumber)
         .FillCreditCardName(creditcardname)
         .SelectExpireDate(creditcardexpiremonth, creditcardexpireyear)
         .FillCreditCardCDI(creditcardCDI)
         .CheckSameBillingAddress()
         .ClickNext();
         Assert.AreEqual("Review items", checkout.GetLastStep(), "Last step title is not right");
         checkout.ClickCheckOut();
     }
 }
Example #2
0
 public void CheckOut_UseSufficientFunds_WS_1198()
 {
     if (!DataParser.ReturnExecution("WS_1198"))
     {
         Assert.Ignore();
     }
     else
     {
         _file = "Resources\\" + client + "\\TestsData\\WS_1198.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);
         MainHomePage mall = InitialPage.Go().EnterId(client).Logon().ClickLogin();
         var          gif  = mall.NavigateToRedeemA().SearchCompany(company);
         Assert.AreEqual("Amazon.com", gif.GetGifCardTitle(), "The gif card is not amazon");
         var gifcard = gif.SelectCompany().ClickAddToCart();
         Assert.AreEqual("Your item has been added to your cart!", gifcard.GetSuccesfullMsg(),
                         "succesfull msg is not well spell");
         var checkout = gifcard.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 Tester 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();
         Assert.AreEqual("Review items", checkout.GetLastStep(), "Last step title is not right");
         checkout.ClickCheckOut();
         Assert.AreEqual("$25", checkout.GetAmountChecked(), "Amount Checked is not $25");
         Assert.AreEqual("1", checkout.GetQuantityChecked(), "Quantity is not 1");
     }
 }
Example #3
0
 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
     }
 }