private void RegistrationForRequiredFieldsShowHideDate() { // start registration RegisterMgr.OpenRegisterPage(this.eventID); // register check in RegisterMgr.Checkin(); RegisterMgr.Continue(); // enter profile info RegisterMgr.EnterProfileInfo(); RegisterMgr.SelectPersonalInfoCustomFields(); RegisterMgr.VerifyCustomFieldPresent(PICF.PICFNow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(PICF.PICFShow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(PICF.PICFNotHide.ToString(), true); //Registration.VerifyCustomFieldNamesOld(new string[3] { "PICFNow" ,"PICFShow","PICFNotHide"}); RegisterMgr.Continue(); // select agenda item RegisterMgr.SelectAgendaItems(); RegisterMgr.VerifyCustomFieldPresent(AgendaItem.AgendaItemNow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(AgendaItem.AgendaItemShow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(AgendaItem.AgendaItemNotHide.ToString(), true); RegisterMgr.Continue(); // select lodging and travel custom field RegisterMgr.SelectLodgingCustomFields(); RegisterMgr.VerifyCustomFieldPresent(LTCF.LTCFNow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(LTCF.LTCFShow.ToString(), true); RegisterMgr.VerifyCustomFieldPresent(LTCF.LTCFNotHide.ToString(), true); //Registration.VerifyCustomFieldNamesOld(new string[3] { "LTCFNow" , "LTCFShow" ,"LTCFNotHide" }); RegisterMgr.Continue(); // select merchandise and enter a quantity RegisterMgr.SelectMerchandise(MerchandiseFeeQuantity); RegisterMgr.VerifyMerchandiseItemPresent(MerchandiseItem.MerchandiseItemNow.ToString(), true); RegisterMgr.VerifyMerchandiseItemPresent(MerchandiseItem.MerchandiseItemShow.ToString(), true); RegisterMgr.VerifyMerchandiseItemPresent(MerchandiseItem.MerchandiseItemNotHide.ToString(), true); RegisterMgr.Continue(); // pay money and verify agemda item name and fee & merchandise item name and fee RegisterManager.FeeResponse[] expFees = new RegisterManager.FeeResponse[7]; formatedEventFee = MoneyTool.FormatMoney(EventFee); formatedAgendaFee = MoneyTool.FormatMoney(AgendaPrice); formatedMerchandiseFee = MoneyTool.FormatMoney(MerchandisePrice); expFees[0] = new RegisterManager.FeeResponse(); expFees[0].FeeName = "Event Fee "; expFees[0].FeeQuantity = EventFeeQuantityString; expFees[0].FeeUnitPrice = formatedEventFee; expFees[0].FeeAmount = formatedEventFee; expFees[1] = new RegisterManager.FeeResponse(); expFees[1].FeeName = AgendaItem.AgendaItemNow.ToString() + " "; expFees[1].FeeQuantity = AgendaFeeQuantityString; expFees[1].FeeUnitPrice = formatedAgendaFee; expFees[1].FeeAmount = formatedAgendaFee; expFees[2] = new RegisterManager.FeeResponse(); expFees[2].FeeName = AgendaItem.AgendaItemShow.ToString() + " "; expFees[2].FeeQuantity = AgendaFeeQuantityString; expFees[2].FeeUnitPrice = formatedAgendaFee; expFees[2].FeeAmount = formatedAgendaFee; expFees[3] = new RegisterManager.FeeResponse(); expFees[3].FeeName = AgendaItem.AgendaItemNotHide.ToString() + " "; expFees[3].FeeQuantity = AgendaFeeQuantityString; expFees[3].FeeUnitPrice = formatedAgendaFee; expFees[3].FeeAmount = formatedAgendaFee; expFees[4] = new RegisterManager.FeeResponse(); expFees[4].FeeName = MerchandiseItem.MerchandiseItemNow.ToString() + " "; expFees[4].FeeQuantity = MerchandiseFeeQuantityString; expFees[4].FeeUnitPrice = formatedMerchandiseFee; expFees[4].FeeAmount = formatedMerchandiseFee; expFees[5] = new RegisterManager.FeeResponse(); expFees[5].FeeName = MerchandiseItem.MerchandiseItemShow.ToString() + " "; expFees[5].FeeQuantity = MerchandiseFeeQuantityString; expFees[5].FeeUnitPrice = formatedMerchandiseFee; expFees[5].FeeAmount = formatedMerchandiseFee; expFees[6] = new RegisterManager.FeeResponse(); expFees[6].FeeName = MerchandiseItem.MerchandiseItemNotHide.ToString() + " "; expFees[6].FeeQuantity = MerchandiseFeeQuantityString; expFees[6].FeeUnitPrice = formatedMerchandiseFee; expFees[6].FeeAmount = formatedMerchandiseFee; double totalFee = EventFee + AgendaPrice * AgendaItemQuantity + MerchandisePrice * MerchandiseItemQuantity; RegisterMgr.VerifyRegistrationFees(expFees); RegisterMgr.PayMoneyAndVerify(totalFee, RegisterManager.PaymentMethod.Check); //finish registration and check the registration details RegisterMgr.FinishRegistration(); RegisterMgr.ConfirmRegistration(); }
private void RegistrationWithRegTypeMinMaxGroupSize(string regtypeName, int minSize, int maxSize, double amount) { string primaryEmail = string.Empty; // Start new registration RegisterMgr.OpenRegisterPage(eventID); // Register check in RegisterMgr.Checkin(); RegisterMgr.SelectRegType(regtypeName); RegisterMgr.VerifyCheckinRegTypeGroupSizeMessage(regtypeName, minSize, maxSize); RegisterMgr.Continue(); // Enter profile info and verify RegisterMgr.EnterProfileInfo(); RegisterMgr.VerifyHasContinueOrContinueNextStepButton(false); RegisterMgr.VerifyHasAddAnotherPersonButton(true); VerifyPersonalInfoPageMinMessage(minSize, maxSize); primaryEmail = RegisterMgr.CurrentEmail; for (int i = 1; i < minSize-1; i++) { AddAnotherPersonWithSameRegType(false, false); } for (int i = minSize; i < maxSize; i++) { //add another person and verify AddAnotherPersonWithSameRegType(true,false); } //add another person and verify AddAnotherPersonWithSameRegType(true,true); RegisterMgr.Continue(); RegisterMgr.CurrentEmail = primaryEmail; //pay money and verify RegisterManager.FeeResponse[] expFees = new RegisterManager.FeeResponse[1]; expFees[0] = new RegisterManager.FeeResponse(); expFees[0].FeeName = string.Format("{0} Event Fee ",regtypeName); expFees[0].FeeQuantity = maxSize.ToString(); expFees[0].FeeUnitPrice = "$10.00"; expFees[0].FeeAmount = string.Format("${0}0.00",maxSize); RegisterMgr.VerifyRegistrationFees(expFees); RegisterMgr.PayMoneyAndVerify(amount, PaymentManager.PaymentMethod.Check); //finish registration and check the registration details RegisterMgr.FinishRegistration(); RegisterMgr.ConfirmRegistration(); }