public void TestEventFeeWithDiscountCodeAccessCode()
        {
            evt = new Event("TestEventFeeWithDiscountCodeAccessCode");
            paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
            evt.CheckoutPage.PaymentMethods.Add(paymentMethod);
            EventFee ef = new EventFee();
            ef.StandardPrice = 100;
            CustomFieldCode dc1 = new CustomFieldCode("dc1");
            dc1.Amount = 10;
            dc1.CodeDirection = FormData.ChangePriceDirection.Decrease;
            dc1.CodeKind = FormData.ChangeType.FixedAmount;
            dc1.CodeType = FormData.CustomFieldCodeType.DiscountCode;
            CustomFieldCode ac1 = new CustomFieldCode("ac1");
            ac1.CodeType = FormData.CustomFieldCodeType.AccessCode;
            ef.AllCustomCodes.Add(dc1);
            ef.AllCustomCodes.Add(ac1);
            evt.StartPage.Event_Fee = ef;

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);
            Registrant reg1 = new Registrant(evt);
            reg1.Payment_Method = paymentMethod;
            reg1.EventFee_Response = new EventFeeResponse();
            reg1.EventFee_Response.Code = dc1;
            KeywordProvider.RegistrationCreation.CreateRegistration(reg1);
            Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 90);
            Registrant reg2 = new Registrant(evt);
            reg2.Payment_Method = paymentMethod;
            reg2.EventFee_Response = new EventFeeResponse();
            reg2.EventFee_Response.Code = ac1;
            KeywordProvider.RegistrationCreation.CreateRegistration(reg2);
            Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 100);
        }
        public void GroupEventFeeGroupDiscount()
        {
            Event groupEventFeeGroupDiscount = new Event("RI-GroupEventFeeGroupDiscount");
            GroupDiscount groupDiscount = new GroupDiscount();
            groupDiscount.GroupSize = 2;
            groupDiscount.GroupSizeOption = GroupDiscount_GroupSizeOption.SizeOrMore;
            groupDiscount.DiscountAmount = 1;
            groupDiscount.GroupDiscountType = GroupDiscount_DiscountType.USDollar;
            groupDiscount.AddtionalRegOption = GroupDiscount_AdditionalRegOption.AnyAdditional;
            groupEventFeeGroupDiscount.StartPage.GroupDiscount = groupDiscount;
            RegType regType = new RegType("First");
            regType.Price = 50;
            groupEventFeeGroupDiscount.StartPage.RegTypes.Add(regType);
            PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
            groupEventFeeGroupDiscount.CheckoutPage.PaymentMethods.Add(paymentMethod);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, groupEventFeeGroupDiscount);

            Registrant reg1 = new Registrant(groupEventFeeGroupDiscount);
            reg1.EventFee_Response = new EventFeeResponse(groupEventFeeGroupDiscount.StartPage.RegTypes[0]);
            reg1.Payment_Method = paymentMethod;
            Registrant reg2 = new Registrant(groupEventFeeGroupDiscount);
            reg1.EventFee_Response = new EventFeeResponse(groupEventFeeGroupDiscount.StartPage.RegTypes[0]);
            Group group = new Group();
            group.Primary = reg1;
            group.Secondaries.Add(reg2);

            KeywordProvider.RegistrationCreation.GroupRegistration(group);
        }
        public void AddMerchandises(DataCollection.MerchandiseItem merch, Event evt)
        {
            if (PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.EmptyAddMerchandise.IsPresent)
            {
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.EmptyAddMerchandise_Click();
            }
            else
            {
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.AddMerchandise_Click();
            }

            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.SelectByName();

            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.MerchandiseType_Select(((int)merch.Type).ToString());

            switch (merch.Type)
            {
                case FormData.MerchandiseType.Fixed:
                    PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.FeeAmount.Type(merch.Price.Value);
                    break;
                case FormData.MerchandiseType.Variable:
                    PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.VariableFeeMinAmount.Type(merch.MinPrice.Value);
                    PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.VariableFeeMaxAmount.Type(merch.MaxPrice.Value);
                    break;
                case FormData.MerchandiseType.Header:
                    break;
                default:
                    break;
            }

            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnForm.Type(merch.Name);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnReceipt.Type(merch.Name);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.NameOnReports.Type(merch.Name);

            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.Advanced_Click();

            if ((evt.TaxRateOne != null) || (evt.TaxRateTwo != null))
            {
                KeywordProvider.AddTaxRate.AddTaxRates(evt.TaxRateOne, evt.TaxRateTwo, FormData.Location.Merchandise);
            }

            if ((evt.TaxRateOne != null) && (merch.ApplyTaxOne.HasValue))
            {
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.ApplyTaxOne.Set(merch.ApplyTaxOne.Value);
            }

            if ((evt.TaxRateTwo != null) && (merch.ApplyTaxTwo.HasValue))
            {
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.ApplyTaxTwo.Set(merch.ApplyTaxTwo.Value);
            }

            if (merch.DiscountCodes.Count != 0)
            {
                string discountCodeString = CustomFieldCode.GenerateBulkCodes(merch.DiscountCodes);

                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.DiscountCodes.Type(discountCodeString);
            }

            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.MerchandisePage.MerchandiseDefine.SaveAndClose_Click();
        }
        public void SingleRegisterNoneSSO()
        {
            Event evt = new Event("SingleRegisterNoneSSO");
            RegType regType1 = new RegType("SSORegType");
            regType1.IsSSO = true;
            evt.StartPage.RegTypes.Add(regType1);
            RegType regType2 = new RegType("NoneSSORegType");
            evt.StartPage.RegTypes.Add(regType2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt, false, true);

            Registrant reg1 = new Registrant(evt);
            reg1.EventFee_Response = new EventFeeResponse(regType2);

            Registrant reg2 = new Registrant(evt, SSOData.SSOTestEmail);
            reg2.Password = SSOData.SSOPassword;
            reg2.EventFee_Response = new EventFeeResponse(regType2);

            KeywordProvider.RegistrationCreation.Checkin(reg1);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg1);
            KeywordProvider.RegistrationCreation.Checkout(reg1);

            KeywordProvider.RegistrationCreation.Checkin(reg2);
            if (PageObject.PageObjectProvider.Register.RegistationSite.IsOnPage(FormData.RegisterPage.Login))
            {
                PageObject.PageObjectProvider.Register.RegistationSite.Login.StartNewRegistration_Click();
            }
            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);

            KeywordProvider.RegistrationCreation.Checkin(reg1);
            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.EmailAlreadyUsed));
        }
        public void AgendaCopyDelete()
        {
            Event evt = new Event("AgendaCopyDelete");
            evt.AgendaPage = new AgendaPage();
            AgendaItem_CheckBox agenda1 = new AgendaItem_CheckBox("agenda1");
            AgendaItem_CheckBox agenda2 = new AgendaItem_CheckBox("agenda2");
            evt.AgendaPage.AgendaItems.Add(agenda1);
            evt.AgendaPage.AgendaItems.Add(agenda2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);

            Registrant reg = new Registrant(evt);
            AgendaResponse_Checkbox resp = new AgendaResponse_Checkbox();
            resp.AgendaItem = agenda1;
            resp.Checked = true;
            reg.CustomField_Responses.Add(resp);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);
            KeywordProvider.SignIn.SignIn(EventFolders.Folders.RegistrationInventory);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.EditForm_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.GotoPage(FormData.Page.Agenda);

            PageObject.Builder.RegistrationFormPages.AgendaRow row1 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda1);
            PageObject.Builder.RegistrationFormPages.AgendaRow row2 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda2);
            Assert.True(row1.Delete.GetAttribute("src").Contains("deletex_Off.gif"));
            row2.Copy_Click();
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.CopyAgendaAmount.Type(1);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.OK_Click();
            Assert.AreEqual(agenda2.NameOnForm + " Copy1",
                PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnReports.Value);
            row2.Delete_Click();
            Assert.False(row2.Agenda.IsPresent);
        }
 public void EventStatusChange(Event details, FormData.EventStatus status)
 {
     PageObject.PageObjectProvider.Manager.Dashboard.ChangeStatus_Click();
     PageObject.PageObjectProvider.Manager.Dashboard.ChangeStatusFrame.SelectByName();
     PageObject.PageObjectProvider.Manager.Dashboard.ChangeStatusFrame.ChangeStatusNow_Set(true);
     PageObject.PageObjectProvider.Manager.Dashboard.ChangeStatusFrame.Status.SelectWithText(CustomStringAttribute.GetCustomString(status));
     PageObject.PageObjectProvider.Manager.Dashboard.ChangeStatusFrame.OK_Click();
 }
        public void SSOOnsiteKiosk()
        {
            Event evt = new Event("SSOOnsiteKiosk");
            evt.IsActive = true;
            RegType regType1 = new RegType("SSORegType");
            regType1.IsSSO = true;
            RegType regType2 = new RegType("NoneSSORegType");
            evt.StartPage.RegTypes.Add(regType1);
            evt.StartPage.RegTypes.Add(regType2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt);

            Registrant reg1 = new Registrant(evt, SSOData.SSOTestEmail);
            reg1.Password = SSOData.SSOPassword;
            reg1.EventFee_Response = new EventFeeResponse(regType1);
            Registrant reg2 = new Registrant(evt);
            reg2.EventFee_Response = new EventFeeResponse(regType2);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg1);
            KeywordProvider.RegistrationCreation.CreateRegistration(reg2);

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.SSO);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            KeywordProvider.ChangeEventStatus.EventStatusChange(evt, FormData.EventStatus.OnSite);

            DataCollection.OnsiteKiosk kiosk = new DataCollection.OnsiteKiosk();
            kiosk.RequireAuthentication = true;
            kiosk.AllowOnsiteReg = true;

            KeywordProvider.LaunchKiosk.LaunchOnsiteKiosk(kiosk);

            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.SearchCondition.Type(reg1.Email);
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.Enter_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.SSOLogin, true);
            KeywordProvider.RegistrationCreation.SSOLogin(reg1);
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.NewSearch_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.SearchCondition.Type(reg2.Email);
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.Enter_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.Password.Type(DataCollection.DefaultPersonalInfo.Password);
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.SubmitPassword_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.NewSearch_Click();

            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.OnsiteRegister_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EmailAddress.Type(SSOData.SSOJustNameEmail);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType1);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.SSOLogin, true);
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.GoBackToPreviousPage();
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.GoBackToPreviousPage();
            PageObject.PageObjectProvider.Register.RegistationSite.OnsiteKiosk.OnsiteRegister_Click();
            Registrant reg3 = new Registrant(evt);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EmailAddress.Type(reg3.Email);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(regType2);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);

            DataAccess.AccessData.SetLiveRegToTest(evt.Id);
        }
        public void TestAccessCode()
        {
            evt = new Event("AccessCodeFixture");
            paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
            evt.CheckoutPage.PaymentMethods.Add(paymentMethod);
            regType = new RegType("RegType");
            regType.Price = 50;
            CustomFieldCode ac1 = new CustomFieldCode("ac1");
            ac1.CodeType = FormData.CustomFieldCodeType.AccessCode;
            ac1.Limit = 2;
            regType.AllCustomCodes.Add(ac1);
            CustomFieldCode ac2 = new CustomFieldCode("ac2");
            ac2.CodeType = FormData.CustomFieldCodeType.AccessCode;
            regType.AllCustomCodes.Add(ac2);
            evt.StartPage.RegTypes.Add(regType);

            agenda = new AgendaItem_CheckBox("Agenda");
            agenda.Price = 80;
            CustomFieldCode ac3 = new CustomFieldCode("ac3");
            ac3.CodeType = FormData.CustomFieldCodeType.AccessCode;
            ac3.Limit = 2;
            CustomFieldCode ac4 = new CustomFieldCode("ac4");
            ac4.CodeType = FormData.CustomFieldCodeType.AccessCode;
            agenda.DiscountCodes.Add(ac3);
            agenda.DiscountCodes.Add(ac4);
            agenda.BulkCodes = CustomFieldCode.GenerateBulkCodes(agenda.DiscountCodes);
            evt.AgendaPage = new AgendaPage();
            evt.AgendaPage.AgendaItems.Add(agenda);

            merch = new MerchandiseItem("Merch");
            merch.Type = FormData.MerchandiseType.Fixed;
            merch.Price = 110;
            CustomFieldCode ac5 = new CustomFieldCode("ac5");
            ac5.CodeType = FormData.CustomFieldCodeType.AccessCode;
            merch.DiscountCodes.Add(ac5);
            evt.MerchandisePage = new MerchandisePage();
            evt.MerchandisePage.Merchandises.Add(merch);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, true);

            Registrant reg1 = this.GenerateReg(ac1, ac3, ac5);
            KeywordProvider.RegistrationCreation.CreateRegistration(reg1);
            Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240);
            Registrant reg2 = this.GenerateReg(ac1, ac3, ac5);
            KeywordProvider.RegistrationCreation.CreateRegistration(reg2);
            Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240);
            Registrant reg3 = this.GenerateReg(ac1, ac4, ac5);
            KeywordProvider.RegistrationCreation.Checkin(reg3);
            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(string.Format(Messages.RegisterError.RegTypeCodeLimitHasReached, ac1.CodeString)));
            Registrant reg4 = this.GenerateReg(ac2, ac3, ac5);
            KeywordProvider.RegistrationCreation.Checkin(reg4);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg4);
            KeywordProvider.RegistrationCreation.Agenda(reg4);
            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.AgendaCodeLimitReached));
            Registrant reg5 = this.GenerateReg(ac2, ac4, ac5);
            KeywordProvider.RegistrationCreation.CreateRegistration(reg5);
            Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 240);
        }
        public void Add_GroupDiscount(Event evt, GroupDiscount groupDiscount)
        {
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            PageObjectProvider.Manager.Dashboard.EventDetails.EditForm_Click();
            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.AddGroupDiscount_Click();
            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.SelectByName();

            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.GroupSize.Type(groupDiscount.GroupSize);
            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.GroupSizeOption.SelectWithText(
                CustomStringAttribute.GetCustomString(groupDiscount.GroupSizeOption));
            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.DiscountAmount.Type(groupDiscount.DiscountAmount);
            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.DiscountType.SelectWithText(
                CustomStringAttribute.GetCustomString(groupDiscount.GroupDiscountType));

            if ((groupDiscount.GroupSizeOption == GroupDiscount_GroupSizeOption.JustSize) && groupDiscount.AddtionalRegOption.HasValue)
            {
                PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.AddtionalRegOption.SelectWithText(
                    CustomStringAttribute.GetCustomString(groupDiscount.AddtionalRegOption.Value));

                if ((groupDiscount.AddtionalRegOption.Value == GroupDiscount_AdditionalRegOption.Additional)
                    && (groupDiscount.NumberOfAdditionalReg.HasValue))
                {
                    PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.AdditionalNumber.Type(
                        groupDiscount.NumberOfAdditionalReg.Value);
                }
            }

            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.ApplyToSelectedFees_Click();

            if ((groupDiscount.ApplyToAgendaItems.Count != 0) || (groupDiscount.ApplyToRegTypes.Count != 0))
            {
                PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.All.Set(false);

                if (groupDiscount.ApplyToAgendaItems.Count != 0)
                {
                    foreach (AgendaItem agenda in groupDiscount.ApplyToAgendaItems)
                    {
                        PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.ApplyToAgendaItem(agenda).Set(true);
                    }
                }

                if (groupDiscount.ApplyToRegTypes.Count != 0)
                {
                    foreach (RegType regType in groupDiscount.ApplyToRegTypes)
                    {
                        PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.ApplyToRegType(regType).Set(true);
                    }
                }
            }

            PageObjectProvider.Builder.EventDetails.FormPages.StartPage.GroupDiscountDefine.SaveAndClose_Click();
            PageObjectProvider.Builder.EventDetails.SaveAndClose_Click();
            PageObjectProvider.Manager.Dashboard.ReturnToList_Click();
        }
        public void ActivateSSOEvent()
        {
            RegOnline.RegressionTest.DataAccess.AccessData.ApprovedXAuthRoleForCurrentCustomer(true);

            Event evt = new Event("ActivateSSOEvent");
            RegType ssoRegType = new RegType("SSORegType");
            ssoRegType.IsSSO = true;
            RegType nonSSORegType = new RegType("NonSSORegType");
            evt.StartPage.RegTypes.Add(ssoRegType);
            evt.StartPage.RegTypes.Add(nonSSORegType);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt);

            Registrant reg = new Registrant(evt, SSOData.SSOTestEmail);
            reg.Password = SSOData.SSOPassword;
            reg.EventFee_Response = new EventFeeResponse(ssoRegType);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.SSO);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Title);
            PageObject.PageObjectProvider.Manager.Dashboard.Activate_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.SelectByName();
            Assert.True(PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.RemoveTestReg.IsChecked);
            Assert.True(PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.RemoveTestReg.HasAttribute("disabled"));
            PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.Cancel_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdParty_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.SelectByName();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.ExternalAuthentication_Click();
            PageObject.PageObjectProvider.Manager.SSOBase.EndpointURL.Type(SSOData.SSOEndpointURL + "add");
            PageObject.PageObjectProvider.Manager.SSOBase.SaveAndClose_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.Refresh();
            Assert.AreEqual(0, Convert.ToInt32(PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.TotalRegs.Text));
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdParty_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.SelectByName();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.ExternalAuthentication_Click();
            PageObject.PageObjectProvider.Manager.SSOBase.EndpointURL.Type(SSOData.SSOEndpointURL);
            PageObject.PageObjectProvider.Manager.SSOBase.SaveAndClose_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.Activate_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.SelectByName();
            PageObject.PageObjectProvider.Manager.Dashboard.ActivateEvent.Activate_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.DashboardTab_Click(FormData.DashboardTab.EventDetails);
            PageObject.PageObjectProvider.Manager.Dashboard.ReturnToList_Click();

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.SSO);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Title);
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdParty_Click();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.SelectByName();
            PageObject.PageObjectProvider.Manager.Dashboard.EventDetails.ThirdPartyIntegrations.ExternalAuthentication_Click();
            Assert.True(PageObject.PageObjectProvider.Manager.SSOBase.EndpointURL.HasAttribute("disabled"));
        }
        private double CalculateAgendaEarlyLateFee(AgendaItem_Common agenda, Event evt)
        {
            double agendaFee = 0;

            if (agenda.EarlyPrice != null)
            {
                if ((agenda.EarlyPrice.EarlyPriceType == FormData.EarlyPriceType.DateAndTime)
                    && (agenda.EarlyPrice.EarlyPriceDate.Value > DateTime.Now))
                {
                    agendaFee = agenda.EarlyPrice.earlyPrice;
                }
                else if (agenda.EarlyPrice.EarlyPriceType == FormData.EarlyPriceType.Registrants)
                {
                    int previousRegsForThisAgenda = 0;

                    foreach (Registrant previousReg in evt.Registrants)
                    {
                        foreach (CustomFieldResponse cfResponse in previousReg.CustomField_Responses)
                        {
                            if (cfResponse is AgendaResponse)
                            {
                                AgendaResponse agResponse = cfResponse as AgendaResponse;

                                if (agResponse.AgendaItem.NameOnForm == agenda.NameOnForm)
                                {
                                    previousRegsForThisAgenda += 1;
                                }
                            }
                        }
                    }

                    if (agenda.EarlyPrice.FirstNRegistrants.Value >= previousRegsForThisAgenda)
                    {
                        agendaFee = agenda.EarlyPrice.earlyPrice;
                    }
                    else
                    {
                        agendaFee = agenda.Price.Value;
                    }
                }
            }
            else if ((agenda.LatePrice != null)
                && (agenda.LatePrice.LatePriceDate < DateTime.Now))
            {
                agendaFee = agenda.LatePrice.latePrice;
            }
            else
            {
                agendaFee = agenda.Price.Value;
            }

            return agendaFee;
        }
 public void TestRegTypeWithDiscountCodeAccessCode()
 {
     evt = new Event("TestRegTypeWithDiscountCodeAccessCode");
     paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
     evt.CheckoutPage.PaymentMethods.Add(paymentMethod);
     //regtype1 no price
     RegType regType1 = new RegType("RegType1");
     //regtype2 has price, no code
     RegType regType2 = new RegType("RegType2");
     regType2.Price = 10;
     //regtype2 has price, has code
     RegType regType3 = new RegType("RegType3");
     regType3.Price = 100;
     CustomFieldCode dc1 = new CustomFieldCode("dc1");
     dc1.Amount = 10;
     dc1.CodeDirection = FormData.ChangePriceDirection.Decrease;
     dc1.CodeKind = FormData.ChangeType.FixedAmount;
     dc1.CodeType = FormData.CustomFieldCodeType.DiscountCode;
     CustomFieldCode ac1 = new CustomFieldCode("ac1");
     ac1.CodeType = FormData.CustomFieldCodeType.AccessCode;
     regType3.AllCustomCodes.Add(dc1);
     regType3.AllCustomCodes.Add(ac1);
     evt.StartPage.RegTypes.Add(regType1);
     evt.StartPage.RegTypes.Add(regType2);
     evt.StartPage.RegTypes.Add(regType3);
     KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);
     Registrant reg1 = new Registrant(evt);
     reg1.Payment_Method = paymentMethod;
     reg1.EventFee_Response = new EventFeeResponse(regType1);
     KeywordProvider.RegistrationCreation.CreateRegistration(reg1);
     Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.Total.IsPresent);
     Registrant reg2 = new Registrant(evt);
     reg2.Payment_Method = paymentMethod;
     reg2.EventFee_Response = new EventFeeResponse(regType2);
     KeywordProvider.RegistrationCreation.CreateRegistration(reg2);
     Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 10);
     Registrant reg3 = new Registrant(evt);
     reg3.Payment_Method = paymentMethod;
     reg3.EventFee_Response = new EventFeeResponse(regType3);
     reg3.EventFee_Response.Code = dc1;
     KeywordProvider.RegistrationCreation.CreateRegistration(reg3);
     Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 90);
     Registrant reg4 = new Registrant(evt);
     reg4.Payment_Method = paymentMethod;
     reg4.EventFee_Response = new EventFeeResponse(regType3);
     reg4.EventFee_Response.Code = ac1;
     KeywordProvider.RegistrationCreation.CreateRegistration(reg4);
     Assert.True(KeywordProvider.RegisterDefault.GetTotal(FormData.RegisterPage.Confirmation) == 100);
 }
        public void AgendaDetailsAndGroupName()
        {
            Event evt = new Event("AgendaDetailsAndGroupName");
            evt.AgendaPage = new AgendaPage();
            AgendaItem_CheckBox agendaDetails = new AgendaItem_CheckBox("AgendaDetails");
            agendaDetails.DetailsPopup = "DetailsPopup";
            AgendaItem_CheckBox agendaDetailsURL = new AgendaItem_CheckBox("AgendaDetailsURL");
            agendaDetailsURL.DetailsURL = "www.baidu.com";
            AgendaItem_CheckBox agendaGroup1 = new AgendaItem_CheckBox("AgendaGroup1");
            agendaGroup1.GroupName = "nameOfGroup";
            AgendaItem_CheckBox agendaGroup2 = new AgendaItem_CheckBox("AgendaGroup2");
            agendaGroup2.GroupName = "nameOfGroup";
            evt.AgendaPage.AgendaItems.Add(agendaDetails);
            evt.AgendaPage.AgendaItems.Add(agendaDetailsURL);
            evt.AgendaPage.AgendaItems.Add(agendaGroup1);
            evt.AgendaPage.AgendaItems.Add(agendaGroup2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false);

            Registrant reg = new Registrant(evt);
            AgendaResponse_Checkbox resp1 = new AgendaResponse_Checkbox();
            resp1.AgendaItem = agendaGroup1;
            resp1.Checked = true;
            AgendaResponse_Checkbox resp2 = new AgendaResponse_Checkbox();
            resp2.AgendaItem = agendaGroup2;
            resp2.Checked = true;
            reg.CustomField_Responses.Add(resp1);
            reg.CustomField_Responses.Add(resp2);

            KeywordProvider.RegistrationCreation.Checkin(reg);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            PageObject.Register.AgendaRow row1 = new PageObject.Register.AgendaRow(agendaDetails);
            PageObject.Register.AgendaRow row2 = new PageObject.Register.AgendaRow(agendaDetailsURL);
            row1.Details.Click();
            Assert.AreEqual(PageObject.PageObjectProvider.Register.RegistationSite.Agenda.AgendaDetailsPopup.Text,
                agendaDetails.DetailsPopup);
            PageObject.PageObjectProvider.Register.RegistationSite.Agenda.CloseDetailsPopup_Click();
            row2.Details.Click();
            System.Threading.Thread.Sleep(1500);
            PageObject.PageObjectHelper.SelectTopWindow();
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Agenda.AgendaDetailsWindow.URLContains(agendaDetailsURL.DetailsURL));
            PageObject.PageObjectProvider.Register.RegistationSite.Agenda.AgendaDetailsWindow.CloseAndBackToPrevious();
            KeywordProvider.RegistrationCreation.Agenda(reg);
            KeywordProvider.RegistrationCreation.Checkout(reg);
            List<WebElements.Label> selectedAgenda = PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.GetSelectedAgendaItems();
            Assert.IsNull(selectedAgenda.Find(a => a.Text == agendaGroup1.NameOnForm));
            Assert.IsNotNull(selectedAgenda.Find(a => a.Text == agendaGroup2.NameOnForm));
        }
        public void ForgetPasswordLink()
        {
            Event evt = new Event("RI-ForgetPassword");

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, false);

            Registrant reg = new Registrant(evt);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);

            KeywordProvider.RegistrationCreation.Checkin(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.Login.ForgotPassword_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Login.ForgotPasswordPopup.SelectByIndex();
            string email = PageObject.PageObjectProvider.Register.RegistationSite.Login.ForgotPasswordPopup.EmailAddress.GetAttribute("value");
            Assert.True(reg.Email == email);
        }
        public void GroupInvalidEmail()
        {
            Event evt = new Event("RI-GroupInvalidEmail");

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, false);

            Registrant reg = new Registrant(evt);
            Registrant reg1 = new Registrant(evt, "abc");

            KeywordProvider.RegistrationCreation.Checkin(reg);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson_Click();
            KeywordProvider.RegistrationCreation.Checkin(reg1);

            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.YouMustEnterValidEmailAddress));
        }
        public void GroupRegisterNoneSSO()
        {
            Event evt = new Event("GroupRegisterNoneSSO");
            RegType regType1 = new RegType("SSORegType1");
            regType1.IsSSO = true;
            RegType regType2 = new RegType("SSORegType2");
            regType2.IsSSO = true;
            RegType regType3 = new RegType("NoneSSORegType1");
            RegType regType4 = new RegType("NoneSSORegType2");
            evt.StartPage.RegTypes.Add(regType1);
            evt.StartPage.RegTypes.Add(regType2);
            evt.StartPage.RegTypes.Add(regType3);
            evt.StartPage.RegTypes.Add(regType4);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt, true, false);

            Registrant reg1 = new Registrant(evt);
            reg1.EventFee_Response = new EventFeeResponse(regType3);

            KeywordProvider.RegistrationCreation.Checkin(reg1);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg1);

            PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyRegTypeDisplay(regType1, false);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyRegTypeDisplay(regType2, false);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyRegTypeDisplay(regType3, true);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyRegTypeDisplay(regType4, true);

            Registrant reg2 = new Registrant(evt);
            reg2.EventFee_Response = new EventFeeResponse(regType4);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EmailAddress.Type(reg2.Email);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.SelectRegTypeRadioButton(reg2.EventFee_Response.RegType);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            KeywordProvider.RegistrationCreation.PersonalInfo(reg2);
            KeywordProvider.RegistrationCreation.Checkout(reg2);
            PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.ChangeMyRegistration_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.Login, true);
            KeywordProvider.RegistrationCreation.Login(reg1);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.AttendeeCheck, true);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.AttendeeCheck.Substitute(0).IsPresent);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.AttendeeCheck.Substitute(1).IsPresent);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            KeywordProvider.RegistrationCreation.Checkout(reg2);
        }
        public void AgendaCalendaAndEventWeb()
        {
            Event evt = new Event("AgendaCalendaAndEventWeb");
            evt.AgendaPage = new AgendaPage();
            evt.EventWebsite = new EventWebsite();
            evt.EventWebsite.UseEventWebsiteAsTheStartingPageForEvent = true;
            evt.EventWebsite.ShowNavigation = true;
            AgendaItem_CheckBox agendaAddToCalenda = new AgendaItem_CheckBox("AddToCalenda");
            agendaAddToCalenda.StartDate = DateTime.Today.AddDays(-3);
            agendaAddToCalenda.EndDate = DateTime.Today.AddDays(3);
            agendaAddToCalenda.AddToCalendar = true;
            agendaAddToCalenda.IncludeOnEventWeb = false;
            AgendaItem_CheckBox includeOnEventWeb = new AgendaItem_CheckBox("OnEventWeb");
            includeOnEventWeb.StartDate = DateTime.Today.AddDays(4);
            includeOnEventWeb.EndDate = DateTime.Today.AddDays(7);
            includeOnEventWeb.AddToCalendar = false;
            includeOnEventWeb.IncludeOnEventWeb = true;
            evt.AgendaPage.AgendaItems.Add(agendaAddToCalenda);
            evt.AgendaPage.AgendaItems.Add(includeOnEventWeb);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false);

            Registrant reg = new Registrant(evt);
            reg.Register_Method = RegisterMethod.EventWebsite;
            AgendaResponse_Checkbox resp1 = new AgendaResponse_Checkbox();
            resp1.AgendaItem = agendaAddToCalenda;
            resp1.Checked = true;
            AgendaResponse_Checkbox resp2 = new AgendaResponse_Checkbox();
            resp2.AgendaItem = includeOnEventWeb;
            resp2.Checked = true;
            reg.CustomField_Responses.Add(resp1);
            reg.CustomField_Responses.Add(resp2);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.EventWebsite.Agenda_Click();
            Assert.True(PageObject.PageObjectHelper.IsTextPresent(includeOnEventWeb.NameOnForm));
            Assert.False(PageObject.PageObjectHelper.IsTextPresent(agendaAddToCalenda.NameOnForm));
            PageObject.PageObjectProvider.Register.RegistationSite.EventWebsite.RegisterNow_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EmailAddress.Type(reg.Email);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            KeywordProvider.RegistrationCreation.Agenda(reg);
            KeywordProvider.RegistrationCreation.Checkout(reg);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.AddToCalendar(agendaAddToCalenda).IsPresent);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.AddToCalendar(includeOnEventWeb).IsPresent);
        }
        public void SSODirectory()
        {
            Event evt = new Event("AttendeeDirectory");
            RegType regType1 = new RegType("SSORegType");
            regType1.IsSSO = true;
            RegType regType2 = new RegType("NoneSSORegType");
            evt.StartPage.RegTypes.Add(regType1);
            evt.StartPage.RegTypes.Add(regType2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt);

            Registrant reg1 = new Registrant(evt, SSOData.SSOTestEmail);
            reg1.Password = SSOData.SSOPassword;
            reg1.EventFee_Response = new EventFeeResponse(regType1);
            Registrant reg2 = new Registrant(evt);
            reg2.EventFee_Response = new EventFeeResponse(regType2);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg1);
            KeywordProvider.RegistrationCreation.CreateRegistration(reg2);

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.SSO);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Title);
            PageObject.PageObjectProvider.Manager.Dashboard.DashboardTab_Click(FormData.DashboardTab.Directories);

            AttendeeDirectory attendeeDirectory = new AttendeeDirectory("SSODirectory");
            attendeeDirectory.ShareDirectory = true;
            attendeeDirectory.RequireLogin = true;

            string directoryURL = KeywordProvider.AddAttendeeDirectory.CreateAttendeeDirectory(attendeeDirectory);
            PageObject.PageObjectProvider.Manager.Dashboard.DashboardTab_Click(FormData.DashboardTab.EventDetails);
            PageObject.PageObjectProvider.Manager.Dashboard.ReturnToList_Click();

            PageObject.PageObjectHelper.NavigateTo(directoryURL);
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.EmailAddress.Type(reg1.Email);
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.Continue_Click();
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.IsOnPage(FormData.RegisterPage.SSOLogin));
            KeywordProvider.RegistrationCreation.SSOLogin(reg1);
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.SignOut_Click();

            PageObject.PageObjectProvider.Reports.AttendeeDirectory.EmailAddress.Type(reg2.Email);
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.Continue_Click();
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.Password.Type(DataCollection.DefaultPersonalInfo.Password);
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.Continue_Click();
            PageObject.PageObjectProvider.Reports.AttendeeDirectory.SignOut_Click();
        }
        public void AddVerifyEmailField()
        {
            Event evt = new Event("RI-VerifyEmail");
            PersonalInfoPageStandardField VerifyEmail = new PersonalInfoPageStandardField();
            VerifyEmail.StandardField = FormData.PersonalInfoField.VerifyEmail;
            VerifyEmail.Visible = true;
            evt.PersonalInfoPage.StandardFields.Add(VerifyEmail);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, false);

            Registrant reg = new Registrant(evt);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyEmailAddress.IsPresent);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.EmailAddress.Type("*****@*****.**");
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.VerifyEmailAddress.Type("*****@*****.**");
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.EmailAddressesDoNotMatch));
        }
        public void GroupInvalidPassword()
        {
            Event evt = new Event("RI-GroupInvalidPassword");

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false, false);

            Registrant reg1 = new Registrant(evt);
            Registrant reg2 = new Registrant(evt);
            Group group = new Group();
            group.Primary = reg1;
            group.Secondaries.Add(reg2);

            KeywordProvider.RegistrationCreation.GroupRegistration(group);

            PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.ChangeMyRegistration_Click();

            PageObject.PageObjectProvider.Register.RegistationSite.Login.Password.Type("abcdefg");
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();

            Assert.True(KeywordProvider.RegisterDefault.HasErrorMessage(Messages.RegisterError.InvalidPassword));
        }
        public void SingleRegisterSSO()
        {
            Event evt = new Event("SingleRegisterSSO");
            RegType regType = new RegType("SSORegType");
            regType.IsSSO = true;
            evt.StartPage.RegTypes.Add(regType);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.SSO, evt, false, true);

            Registrant reg = new Registrant(evt, SSOData.SSOTestEmail);
            reg.Password = SSOData.SSOPassword;
            reg.EventFee_Response = new EventFeeResponse(regType);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.SSOLogin, true);
            KeywordProvider.RegistrationCreation.SSOLogin(SSOData.SSOJustNameEmail, SSOData.SSOPassword);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.SSOLogin, true);
            KeywordProvider.RegistrationCreation.SSOLogin(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.Password.IsPresent);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.PersonalInfoFields(FormData.PersonalInfoField.Email).HasAttribute("value"));
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.PersonalInfoFields(FormData.PersonalInfoField.FirstName).HasAttribute("value"));
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.PersonalInfoFields(FormData.PersonalInfoField.MiddleName).HasAttribute("value"));
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.PersonalInfoFields(FormData.PersonalInfoField.LastName).HasAttribute("value"));
            PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.JobTitle.Type("Automation");
            reg.JobTitle = "Automation";
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            KeywordProvider.RegistrationCreation.Checkout(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.Confirmation.ChangeMyRegistration_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.SSOLogin, true);
            KeywordProvider.RegistrationCreation.SSOLogin(reg);
            AssertHelper.VerifyOnPage(FormData.RegisterPage.AttendeeCheck, true);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.AttendeeCheck.Substitute(0).IsPresent);
            PageObject.PageObjectProvider.Register.RegistationSite.AttendeeCheck.PersonalInfoLink_Click(0);
            Assert.True(reg.JobTitle == PageObject.PageObjectProvider.Register.RegistationSite.PersonalInfo.JobTitle.Value);
        }
        public Registrant CreateEventAndRegisterWithRegType()
        {
            Event eventWithRegType = new Event("RI-SingleRegistrationWithRegType");
            RegType regType1 = new RegType("First");
            RegType regType2 = new RegType("Second");
            eventWithRegType.StartPage.RegTypes.Add(regType1);
            eventWithRegType.StartPage.RegTypes.Add(regType2);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, eventWithRegType);

            Registrant registrant = new Registrant(eventWithRegType, string.Format("selenium{0}@regonline.com", System.DateTime.Now.Ticks.ToString()));
            registrant.EventFee_Response = new EventFeeResponse(eventWithRegType.StartPage.RegTypes[1]);

            KeywordProvider.RegistrationCreation.Checkin(registrant);

            AssertHelper.VerifyOnPage(FormData.RegisterPage.PersonalInfo, true);

            KeywordProvider.RegistrationCreation.PersonalInfo(registrant);
            KeywordProvider.RegistrationCreation.Checkout(registrant);

            return registrant;
        }
        public void EventFeeEaylyPrice_Registrants()
        {
            Event eventFeeEaylyPrice_Registrants = new Event("RI-EventFeeEaylyPrice-Registrants");
            RegType regType = new RegType("First");
            EarlyPrice earlyPrice = new EarlyPrice();
            earlyPrice.earlyPrice = 40;
            earlyPrice.EarlyPriceType = FormData.EarlyPriceType.Registrants;
            earlyPrice.FirstNRegistrants = 1;
            regType.EarlyPrice = earlyPrice;
            regType.Price = 50;
            eventFeeEaylyPrice_Registrants.StartPage.RegTypes.Add(regType);
            PaymentMethod paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
            eventFeeEaylyPrice_Registrants.CheckoutPage.PaymentMethods.Add(paymentMethod);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, eventFeeEaylyPrice_Registrants);

            Registrant registrant = new Registrant(eventFeeEaylyPrice_Registrants);
            registrant.EventFee_Response = new EventFeeResponse(eventFeeEaylyPrice_Registrants.StartPage.RegTypes[0]);
            registrant.Payment_Method = paymentMethod;

            KeywordProvider.RegistrationCreation.Checkin(registrant);
            KeywordProvider.RegistrationCreation.PersonalInfo(registrant);

            Assert.True(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation) == earlyPrice.earlyPrice);

            KeywordProvider.RegistrationCreation.Checkout(registrant);

            Registrant registrant1 = new Registrant(eventFeeEaylyPrice_Registrants);
            registrant1.EventFee_Response = new EventFeeResponse(eventFeeEaylyPrice_Registrants.StartPage.RegTypes[0]);
            registrant1.Payment_Method = paymentMethod;

            KeywordProvider.RegistrationCreation.Checkin(registrant1);
            KeywordProvider.RegistrationCreation.PersonalInfo(registrant1);

            Assert.True(KeywordProvider.RegisterDefault.GetTotal(DataCollection.FormData.RegisterPage.Confirmation) == regType.Price.Value);

            KeywordProvider.RegistrationCreation.Checkout(registrant1);
        }
        public void DisableGroupReg()
        {
            Event evt = new Event("RI-DisableGroupReg");
            evt.StartPage.AllowGroupReg = false;
            RegType regType = new RegType("AdditionalDetails");
            regType.AdditionalDetails = "This is additional details.";
            evt.StartPage.RegTypes.Add(regType);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false);

            Registrant reg = new Registrant(evt);
            reg.EventFee_Response = new EventFeeResponse(regType);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.RegTypeDetails_Click(reg.EventFee_Response.RegType);
            Assert.True(PageObject.PageObjectProvider.Register.RegistationSite.Checkin.AdditionalDetails.Text.Trim().Equals(regType.AdditionalDetails));
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.RegTypeDetails_Close_Click();
            KeywordProvider.RegistrationCreation.Checkin(reg);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson.IsPresent);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            Assert.False(PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson.IsPresent);
            KeywordProvider.RegistrationCreation.Checkout(reg);
        }
        public void GoBackLink()
        {
            Event GoBackLink = new Event("RI-GoBackLink");
            AgendaItem_CheckBox agenda = new AgendaItem_CheckBox("GroupAgenda");
            AgendaPage agendaPage = new AgendaPage();
            agendaPage.AgendaItems.Add(agenda);
            GoBackLink.AgendaPage = agendaPage;

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, GoBackLink);

            Registrant reg = new Registrant(GoBackLink);

            KeywordProvider.RegistrationCreation.Checkin(reg);
            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.GoBack_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.Agenda, true);
            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.AddAnotherPerson_Click();
            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.GoBack_Click();
            AssertHelper.VerifyOnPage(FormData.RegisterPage.Checkout, true);
            KeywordProvider.RegistrationCreation.Checkout(reg);
        }
        public void ButtonTest()
        {
            Event evt = new Event("AgendaButtonTest");
            AgendaItem_CheckBox agenda1 = new AgendaItem_CheckBox("agenda1");
            AgendaItem_CheckBox agenda2 = new AgendaItem_CheckBox("agenda2");

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.RegistrationInventory);

            if (KeywordProvider.ManagerDefault.DoesEventExist(evt.Title))
            {
                KeywordProvider.ManagerDefault.DeleteEvent(evt.Title);
            }

            KeywordProvider.EventCreator.ClickAddEventAndGetEventId(evt);
            KeywordProvider.EventCreator.StartPage(evt);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.GotoPage(FormData.Page.Agenda);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.YesOnSplashPage_Click();
            KeywordProvider.AddAgendaItem.AddAgendaItems(agenda1, evt);
            int id = Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value);
            PageObject.Builder.RegistrationFormPages.AgendaRow row1 = new PageObject.Builder.RegistrationFormPages.AgendaRow(agenda1);
            Assert.True(row1.Agenda.IsPresent);
            Assert.AreEqual(row1.Agenda.GetAttribute("class"), "hs colwidth1");
            KeywordProvider.AddAgendaItem.AddAgendaItems(agenda2, evt);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.SaveAndNew_Click();
            Assert.AreNotEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, "");
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.Cancel_Click();
            Assert.AreEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Type("NameChanged");
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.Cancel_Click();
            Assert.AreEqual(id, Convert.ToInt32(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.AgendaItemId.Value));
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, agenda1.NameOnForm);
            PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Type("NameChanged");
            PageObject.PageObjectProvider.Builder.EventDetails.SaveAndStay_Click();
            Assert.AreEqual(PageObject.PageObjectProvider.Builder.EventDetails.FormPages.AgendaPage.NameOnForm.Text, "NameChanged");
        }
Ejemplo n.º 27
0
        public void VerifyGloableEventDisplay()
        {
            Event Event = new Event("RI-VerifyDisplay");
            Event.StartPage.Location = "Sichuan";
            Event.StartPage.Phone = "8888888888";
            Event.StartPage.Country = "United States";
            Event.StartPage.Address1 = "Fuxing Road No.1";
            Event.StartPage.Address2 = "Huamin Empire Plaza";
            Event.StartPage.City = "Chengdu";
            Event.StartPage.State = "Alaska";
            Event.StartPage.Zip = "12345";
            Event.StartPage.ContactInfo = "Contact us!";
            Event.StartPage.EventHome = "www.google.com";
            Event.StartPage.PageHeader = "This is checkin Page Header.";
            Event.StartPage.PageFooter = "This is checkin Page Footer.";
            Event.PersonalInfoPage.PageHeader = "This is personal info Page Header.";
            Event.PersonalInfoPage.PageFooter = "This is personal info Page Footer.";

            AgendaItem_CheckBox agendaItem = new AgendaItem_CheckBox(DateTime.Now.Ticks.ToString());
            DataCollection.AgendaPage agendaPage = new DataCollection.AgendaPage();
            agendaPage.AgendaItems.Add(agendaItem);
            agendaPage.PageHeader = "This is agenda Page Header.";
            agendaPage.PageFooter = "This is agenda Page Footer.";
            Event.AgendaPage = agendaPage;

            LodgingStandardFields field = new LodgingStandardFields();
            field.Field = FormData.LodgingStandardFields.RoomType;
            field.Visible = true;
            Lodging lodging = new Lodging();
            lodging.StandardFields.Add(field);
            LodgingTravelPage lodgingTravelPage = new LodgingTravelPage();
            lodgingTravelPage.Lodging = lodging;
            lodgingTravelPage.PageHeader = "This is lodging travel Page Header.";
            lodgingTravelPage.PageFooter = "This is lodging travel Page Footer.";
            Event.LodgingTravelPage = lodgingTravelPage;

            MerchandiseItem merchandise = new MerchandiseItem(DateTime.Now.AddSeconds(1).Ticks.ToString());
            merchandise.Type = FormData.MerchandiseType.Header;
            MerchandisePage merchandisePage = new MerchandisePage();
            merchandisePage.Merchandises.Add(merchandise);
            merchandisePage.PageHeader = "This is merchandise Page Header.";
            merchandisePage.PageFooter = "This is merchandise Page Footer.";
            Event.MerchandisePage = merchandisePage;

            Event.CheckoutPage.PageHeader = "This is checkout Page Header.";
            Event.CheckoutPage.PageFooter = "This is checkout Page Footer.";

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, Event, false, false);
            Registrant reg = new Registrant(Event);

            PageObject.PageObjectProvider.Register.RegistationSite.Checkin.OpenUrl(reg);
            VerifyFooterResults footerResults = KeywordProvider.Display.VerifyCompanyFooter();
            VerifyEventDetailsResult eventDetailsResults = KeywordProvider.Display.VerifyEventDetails();
            VerifyPageResults pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(footerResults.Trustwave);
            Assert.True(footerResults.Facebook);
            Assert.True(footerResults.Twitter);
            Assert.True(footerResults.Linkedin);
            Assert.True(footerResults.Copyright == "Copyright © 2012 The Active Network, Inc.");
            Assert.True(footerResults.TermsOfUse);
            Assert.True(footerResults.PrivacyPolicy);
            Assert.True(footerResults.CookiePolicy);
            Assert.True(footerResults.About);
            Assert.True(footerResults.ActiveCom);

            Assert.True(eventDetailsResults.EventTitle == Event.Title);
            Assert.True((eventDetailsResults.Location == Event.StartPage.Location) || (eventDetailsResults.Location == null));
            Assert.True((eventDetailsResults.Phone == Event.StartPage.Phone) || (eventDetailsResults.Phone == null));
            Assert.True((eventDetailsResults.Address1 == Event.StartPage.Address1) || (eventDetailsResults.Address1 == null));
            Assert.True((eventDetailsResults.Address2 == Event.StartPage.Address2) || (eventDetailsResults.Address2 == null));
            Assert.True((eventDetailsResults.City == Event.StartPage.City) || (eventDetailsResults.City == null));
            Assert.True((eventDetailsResults.State == Event.StartPage.State) || (eventDetailsResults.State == null));
            Assert.True((eventDetailsResults.Zip == Event.StartPage.Zip) || (eventDetailsResults.Zip == null));
            Assert.True((eventDetailsResults.Country == Event.StartPage.Country) || (eventDetailsResults.Country == null));
            Assert.True(eventDetailsResults.EventContactInfo.Contains(Event.StartPage.ContactInfo) && eventDetailsResults.Contact.Contains(Event.StartPage.ContactInfo));

            Assert.True(pageResults.PageHeader.Contains(Event.StartPage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.StartPage.PageFooter));

            KeywordProvider.RegistrationCreation.Checkin(reg);
            pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(pageResults.PageHeader.Contains(Event.PersonalInfoPage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.PersonalInfoPage.PageFooter));

            KeywordProvider.RegistrationCreation.PersonalInfo(reg);
            pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(pageResults.PageHeader.Contains(Event.AgendaPage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.AgendaPage.PageFooter));

            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(pageResults.PageHeader.Contains(Event.LodgingTravelPage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.LodgingTravelPage.PageFooter));

            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(pageResults.PageHeader.Contains(Event.MerchandisePage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.MerchandisePage.PageFooter));

            PageObject.PageObjectProvider.Register.RegistationSite.Continue_Click();
            pageResults = KeywordProvider.Display.VerifyPage();

            Assert.True(pageResults.PageHeader.Contains(Event.CheckoutPage.PageHeader));
            Assert.True(pageResults.PageFooter.Contains(Event.CheckoutPage.PageFooter));
        }
 public void FeeOptionsCombinationFixture()
 {
     Event evt = new Event("FeeOptionsCombinationFixture");
     RegType regType1 = new RegType("regType1");
 }
        public void AgendaStatus()
        {
            Event evt = new Event("AgendaStatus");
            evt.AgendaPage = new AgendaPage();
            AgendaItem_CheckBox ag1 = new AgendaItem_CheckBox("ag1");
            AgendaItem_CheckBox ag2 = new AgendaItem_CheckBox("ag2");
            ag2.InitialStatus = FormData.AgendaInitialStatus.Pending;
            AgendaItem_CheckBox ag3 = new AgendaItem_CheckBox("ag3");
            ag3.InitialStatus = FormData.AgendaInitialStatus.Confirmed;
            AgendaItem_CheckBox ag4 = new AgendaItem_CheckBox("ag4");
            ag4.InitialStatus = FormData.AgendaInitialStatus.Approved;
            AgendaItem_CheckBox ag5 = new AgendaItem_CheckBox("ag5");
            ag5.InitialStatus = FormData.AgendaInitialStatus.Declined;
            AgendaItem_CheckBox ag6 = new AgendaItem_CheckBox("ag6");
            ag6.InitialStatus = FormData.AgendaInitialStatus.NoShow;
            AgendaItem_CheckBox ag7 = new AgendaItem_CheckBox("ag7");
            ag7.InitialStatus = FormData.AgendaInitialStatus.FollowUp;
            evt.AgendaPage.AgendaItems.Add(ag1);
            evt.AgendaPage.AgendaItems.Add(ag2);
            evt.AgendaPage.AgendaItems.Add(ag3);
            evt.AgendaPage.AgendaItems.Add(ag4);
            evt.AgendaPage.AgendaItems.Add(ag5);
            evt.AgendaPage.AgendaItems.Add(ag6);
            evt.AgendaPage.AgendaItems.Add(ag7);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt, false);

            AgendaResponse_Checkbox resp1 = new AgendaResponse_Checkbox();
            resp1.AgendaItem = ag1;
            resp1.Checked = true;
            AgendaResponse_Checkbox resp2 = new AgendaResponse_Checkbox();
            resp2.AgendaItem = ag2;
            resp2.Checked = true;
            AgendaResponse_Checkbox resp3 = new AgendaResponse_Checkbox();
            resp3.AgendaItem = ag3;
            resp3.Checked = true;
            AgendaResponse_Checkbox resp4 = new AgendaResponse_Checkbox();
            resp4.AgendaItem = ag4;
            resp4.Checked = true;
            AgendaResponse_Checkbox resp5 = new AgendaResponse_Checkbox();
            resp5.AgendaItem = ag5;
            resp5.Checked = true;
            AgendaResponse_Checkbox resp6 = new AgendaResponse_Checkbox();
            resp6.AgendaItem = ag6;
            resp6.Checked = true;
            AgendaResponse_Checkbox resp7 = new AgendaResponse_Checkbox();
            resp7.AgendaItem = ag7;
            resp7.Checked = true;

            Registrant reg = new Registrant(evt);
            reg.CustomField_Responses.Add(resp1);
            reg.CustomField_Responses.Add(resp2);
            reg.CustomField_Responses.Add(resp3);
            reg.CustomField_Responses.Add(resp4);
            reg.CustomField_Responses.Add(resp5);
            reg.CustomField_Responses.Add(resp6);
            reg.CustomField_Responses.Add(resp7);

            KeywordProvider.RegistrationCreation.CreateRegistration(reg);

            KeywordProvider.SignIn.SignIn(EventFolders.Folders.RegistrationInventory);
            KeywordProvider.ManagerDefault.OpenFormDashboard(evt.Id);
            PageObject.PageObjectProvider.Manager.Dashboard.DashboardTab_Click(FormData.DashboardTab.Reports);
            PageObject.PageObjectProvider.Manager.Dashboard.Reports.AgendaReportLink_Click();

            PageObject.Reports.StandardReports agendaReport = new PageObject.Reports.StandardReports(FormData.StandardReports.AgendaReport);

            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag1.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag2.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "Pending");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag3.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "Confirmed");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag4.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "Approved");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag5.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "Declined");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag6.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "No-show");
            Assert.AreEqual(agendaReport.AgendaReportRows.Find(r => r.AgendaName.Text.Contains(ag7.NameOnForm)).Attendees[0].AgendaStatus.Text.Trim(), "Follow-up");

            agendaReport.CloseAndBackToPrevious();
        }
Ejemplo n.º 30
0
        private void GenerateEventForTaxRate(bool applyTaxOne, bool applyTaxTwo, FormData.Countries? country)
        {
            this.evt = new Event("TaxFixture");
            this.regType = new RegType("regType");
            this.paymentMethod = new PaymentMethod(FormData.PaymentMethod.Check);
            TaxRate tax1 = new TaxRate("tax1");
            if (country.HasValue)
            {
                tax1.Country = country.Value;
            }
            tax1.Rate = 50;
            TaxRate tax2 = new TaxRate("tax2");
            tax2.Rate = 10;
            regType.Price = 50;
            regType.ApplyTaxOne = applyTaxOne;
            regType.ApplyTaxTwo = applyTaxTwo;
            evt.TaxRateOne = tax1;
            evt.TaxRateTwo = tax2;
            evt.StartPage.RegTypes.Add(regType);
            evt.CheckoutPage.PaymentMethods.Add(paymentMethod);
            this.agenda = new AgendaItem_CheckBox("agenda");
            agenda.Price = 60;
            agenda.ApplyTaxOne = applyTaxOne;
            agenda.ApplyTaxTwo = applyTaxTwo;
            evt.AgendaPage = new AgendaPage();
            evt.AgendaPage.AgendaItems.Add(agenda);
            this.merch = new MerchandiseItem("merch");
            merch.Type = FormData.MerchandiseType.Fixed;
            merch.Price = 70;
            merch.ApplyTaxOne = applyTaxOne;
            merch.ApplyTaxTwo = applyTaxTwo;
            evt.MerchandisePage = new MerchandisePage();
            evt.MerchandisePage.Merchandises.Add(merch);

            KeywordProvider.SignIn.SignInAndRecreateEventAndGetEventId(EventFolders.Folders.RegistrationInventory, evt);
        }