示例#1
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
     }
 }