public void GivenSearchForEvent(string eventName)
        {
            try
            {
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.OpenTab("Registrations");
                String xRegistrantName = "//input[contains(@id,'_CONSTITUENTNAME_value')]";
                Panel.SetTextField(xRegistrantName, "Crispin"); // search for the Kelli Crispin registrant with the "Crispin" char string
                Panel.GetDisplayedElement(xRegistrantName).SendKeys(Keys.Enter);
                string xSelectedRow;
                xSelectedRow = "//div[contains(@id,'ext-gen')]/div/table/tbody/tr[1]/td[4]/div/a";
                Dialog.WaitClick(xSelectedRow, 15);

                //click on the link to remove a registrant
                Dialog.WaitClick("//button[contains(@class,'linkbutton')]/div[text()='Delete registrant']", 10);
                //click on the link to remove a spouse

                Dialog.Yes();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not search for the event. " + ex.Message);
            }
        }
        public void WhenICreateAnInvitation(string eventName)
        {
            string invitationName;
            string xTab;

            eventName += uniqueStamp;
            BBCRMHomePage.OpenEventsFA();

            EventsFunctionalArea.EventSearch(eventName);  //search for an event
            invitationName = "Inv" + eventName;
            string caption = "General";

            EventPanel.OpenTab("Invitations");               //open the invitations tab
            EventPanel.ClickSectionAddButton("Invitations"); // add an invitation
            xTab = getXInnerTab(caption);
            EventPanel.getXTab(xTab);

            string xEmailString;

            xEmailString = Dialog.getXInput("InvitationAddForm", "_NAME_value");
            xTab         = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);                                                                           //open the general subtab in the popup
            Dialog.SetTextField(xEmailString, invitationName);                                                    // enter the invitation name
            Dialog.SetTextField("//input[contains(@id, '_MAILDATE_value')]", DateTime.Today.ToShortDateString()); //add in the date
            xEmailString = Dialog.getXInput("PackageSearch", "_NAME_value");

            caption = "Processing Options";
            xTab    = getXInnerTab(caption);
            Dialog.WaitClick(xTab, 10);
            Dialog.SetCheckbox("//input[contains(@id, '_CHANNELCODE_1')]", true);  //set the "send through email" radio button to true
            // enter email package name
            Dialog.SetSearchList(Dialog.getXInput("InvitationAddForm", "_EMAILPACKAGEID_value"), xEmailString, "UDO FY16 Carolina Connection Email Package");
            Dialog.Save();
        }
        public void WhenIAddRegistrantToEvent(string registrant, string eventName, Table registrations)
        {
            try
            {
                registrant += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                eventName  += uniqueStamp;                   // the unique stamp is a series of numbers to keep names different from each other
                BBCRMHomePage.OpenEventsFA();                // open event functional area
                Panel.CollapseSection("Event calendar", "CalendarViewForm");
                EventsFunctionalArea.EventSearch(eventName); // search for an event
                EventPanel.AddRegistrant();
                RegistrantDialog.SetRegistrant(registrant);

                foreach (var registrantRow in registrations.Rows)  // find all the registrants in the table
                {
                    if (registrantRow.ContainsKey("Registrant") && !string.IsNullOrEmpty(registrantRow["Registrant"]) &&
                        registrantRow["Registrant"] != "(Unnamed guest)")
                    {
                        registrantRow["Registrant"] += uniqueStamp;                                                        // the unique stamp is a series of numbers to keep names different from each other
                    }
                }

                RegistrantDialog.SetRegistrants(registrations);
                Dialog.Save();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add a registrant to an event. " + ex.Message);
            }
        }
Example #4
0
 public void WhenIAddCoordinatorToEvent(string constituentLastName, string eventName)
 {
     constituentLastName += uniqueStamp;
     eventName           += uniqueStamp;
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.EventSearch(eventName);
     EventPanel.AddCoordinator(constituentLastName);
 }
Example #5
0
 private void GetEventPanel(string eventName)
 {
     if (!Panel.IsPanelHeader(eventName))
     {
         BBCRMHomePage.OpenEventsFA();
         EventsFunctionalArea.EventSearch(eventName);
     }
 }
 public void GivenEventManagementTemplateExists(string templateName)
 {
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.EventManagementTemplates();
     if (!EventManagementTemplatesPanel.TemplateExists(templateName))
     {
         EventManagementTemplatesPanel.AddTemplate(templateName);
     }
 }
Example #7
0
 public void GivenLocationExists(string locationName)
 {
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.Locations();
     if (!LocationsPanel.LocationExists(locationName))
     {
         LocationsPanel.AddLocation(locationName);
     }
 }
 public void GivenAnEventExists(Table events)
 {
     foreach (var e in events.Rows)
     {
         e["Name"] += uniqueStamp;
         BBCRMHomePage.OpenEventsFA();
         EventsFunctionalArea.AddEvent(e);
     }
 }
 public void WhenIAddEvents(Table eventsToAdd)
 {
     BBCRMHomePage.OpenEventsFA();
     foreach (var eventToAdd in eventsToAdd.Rows)
     {
         eventToAdd["Name"] += uniqueStamp;
         EventsFunctionalArea.AddEvent(eventToAdd);
     }
 }
 public void WhenIAddCoordinatorToEvent(string constituentLastName, string eventName)
 {
     try
     {
         constituentLastName += uniqueStamp;             // the unique stamp is a series of numbers to keep names different from each other
         eventName           += uniqueStamp;             // the unique stamp is a series of numbers to keep names different from each other
         BBCRMHomePage.OpenEventsFA();                   // open event functional area
         EventsFunctionalArea.EventSearch(eventName);    // search for an event
         EventPanel.AddCoordinator(constituentLastName); // add a coordinator
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add a coordinator to an event. " + ex.Message);
     }
 }
Example #11
0
 private void GetEventPanel(string eventName)
 {
     try
     {
         if (!Panel.IsPanelHeader(eventName))
         {
             BBCRMHomePage.OpenEventsFA();                // open event functional area
             EventsFunctionalArea.EventSearch(eventName); // search for an event
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not get the event panel. " + ex.Message);
     }
 }
 public void GivenLocationExists(string locationName)
 {
     try
     {
         //Open events functional area and then add a location
         locationName += uniqueStamp;              // the unique stamp is a series of numbers to keep names different from each other
         BBCRMHomePage.OpenEventsFA();             // open event functional area
         EventsFunctionalArea.Locations();
         LocationsPanel.AddLocation(locationName); //add a location
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not find the specified event location. " + ex.Message);
     }
 }
 public void GivenAnEventExists(Table events)
 {
     try
     {
         foreach (var e in events.Rows)
         {
             e["Name"] += uniqueStamp;         // the unique stamp is a series of numbers to keep names different from each other
             BBCRMHomePage.OpenEventsFA();     // open event functional area
             EventsFunctionalArea.AddEvent(e); // Add an event
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not find that a certain event exists. " + ex.Message);
     }
 }
Example #14
0
 public void GivenAnEventExistsThatIncludesRegistrationOption(Table table)
 {
     #region data setup
     //setup date field.  StepHelper for date must come before dynamic objects
     StepHelper.SetTodayDateInTableRow("Start date", table);
     dynamic objectData           = table.CreateDynamicInstance();
     var     eventDialogId        = "EventAddForm";
     var     registrationDialogID = "RegistrationOptionAddForm2";
     objectData.Name += uniqueStamp;
     //sorts out date format due to datetime adding 00:00:00
     DateTime findDate = objectData.StartDate;
     //set the thread culture to get the correct date for the browser
     StepHelper.SetCurrentThreadCultureToConfigValue();
     //fields for add an event
     IDictionary <string, CrmField> EventSupportedFields = new Dictionary <string, CrmField>
     {
         { "Name", new CrmField("_NAME_value", FieldType.TextInput) },
         { "Start date", new CrmField("_STARTDATE_value", FieldType.TextInput) },
         { "Category", new CrmField("_EVENTCATEGORYCODEID_value", FieldType.Dropdown) }
     };
     //fields for Registration form
     IDictionary <string, CrmField> RegistrationSupportedFields = new Dictionary <string, CrmField>
     {
         { "Registration type", new CrmField("_EVENTREGISTRATIONTYPEID_value", FieldType.Dropdown) },
         { "Registration count", new CrmField("_REGISTRATIONCOUNT_value", FieldType.TextInput) },
         { "Registration fee", new CrmField("_AMOUNT_value", FieldType.TextInput) }
     };
     #endregion
     //navigation
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.AddEvent();
     //set fields for Add an Event
     Dialog.SetField(eventDialogId, "Name", objectData.Name, EventSupportedFields);
     Dialog.SetField(eventDialogId, "Start date", findDate.ToShortDateString(), EventSupportedFields);
     Dialog.SetField(eventDialogId, "Category", objectData.Category, EventSupportedFields);
     Dialog.Save();
     //add registration
     Panel.SelectTab("Options");
     Panel.ClickSectionAddButton("Registration options");
     //add registration options
     Dialog.SetField(registrationDialogID, "Registration type", objectData.RegistrationType, RegistrationSupportedFields);
     Dialog.SetField(registrationDialogID, "Registration count", Convert.ToString(objectData.RegistrationCount), RegistrationSupportedFields);
     Dialog.SetField(registrationDialogID, "Registration fee", Convert.ToString(objectData.RegistrationFee), RegistrationSupportedFields);
     //Save dialog
     Dialog.Save();
 }
Example #15
0
        public void WhenIStartToCreateAMulti_EventUsingTemplate(string template, Table events)
        {
            BBCRMHomePage.OpenEventsFA();
            EventsFunctionalArea.AddMultiEvent();
            Dialog.SetDropDown("//input[contains(@id,'_EVENTMANAGEMENTTEMPLATEID_value')]", template + uniqueStamp);

            foreach (var eventToAdd in events.Rows)
            {
                eventToAdd["event"] += uniqueStamp;
                if (eventToAdd["parent"] == string.Empty)
                {
                    MultiLevelEventDialog.AddExistingEvent(eventToAdd["event"]);
                }
                else
                {
                    MultiLevelEventDialog.AddChildEvent(eventToAdd["event"], eventToAdd["parent"] + uniqueStamp);
                }
            }
        }
        public void WhenIStartToCreateAMulti_EventUsingTemplate(string template, Table events)
        {
            BBCRMHomePage.OpenEventsFA();
            EventsFunctionalArea.AddMultiEvent();
            MultiLevelEventDialog.SetTemplate(template);

            foreach (var eventToAdd in events.Rows)
            {
                eventToAdd["event"] += uniqueStamp;
                if (eventToAdd["parent"] == string.Empty)
                {
                    MultiLevelEventDialog.AddExistingEvent(eventToAdd["event"]);
                }
                else
                {
                    MultiLevelEventDialog.AddChildEvent(eventToAdd["event"], eventToAdd["parent"] + uniqueStamp);
                }
            }
        }
 public void WhenIAddEvents(Table eventsToAdd)
 {
     try
     {
         BBCRMHomePage.OpenEventsFA();  // open event functional area
         Panel.CollapseSection("Event calendar", "CalendarViewForm");
         foreach (var eventToAdd in eventsToAdd.Rows)
         {
             if (eventToAdd["Name"].Substring(0, 3) != "UDO")
             {
                 eventToAdd["Name"] += uniqueStamp;     // the unique stamp is a series of numbers to keep names different from each other
             }
             EventsFunctionalArea.AddEvent(eventToAdd); // add an event
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error: could not add an event. " + ex.Message);
     }
 }
Example #18
0
        public void WhenIAddRegistrantToEvent(string registrant, string eventName, Table registrations)
        {
            registrant += uniqueStamp;
            eventName  += uniqueStamp;
            BBCRMHomePage.OpenEventsFA();
            EventsFunctionalArea.EventSearch(eventName);
            EventPanel.AddRegistrant();
            RegistrantDialog.SetRegistrant(registrant);

            foreach (var registrantRow in registrations.Rows)
            {
                if (registrantRow.ContainsKey("Registrant") && !string.IsNullOrEmpty(registrantRow["Registrant"]) &&
                    registrantRow["Registrant"] != "(Unnamed guest)")
                {
                    registrantRow["Registrant"] += uniqueStamp;
                }
            }

            RegistrantDialog.SetRegistrants(registrations);
            Dialog.Save();
        }
Example #19
0
        public void WhenISearchForEvent(string eventName, Table events)
        {
            TableRow eventrow = events.Rows[0];

            try
            {
                BBCRMHomePage.OpenEventsFA();  // open event functional area
                try
                {
                    EventsFunctionalArea.EventSearch(eventName);  // search for an event
                }
                catch
                {
                    EventsFunctionalArea.AddEvent(eventrow);  //add an event if it does not exist
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not create a test event. " + ex.Message);
            }
        }
Example #20
0
 public void GivenISelectEvent(string TargetEvent)
 {
     BBCRMHomePage.OpenEventsFA();
     EventsFunctionalArea.EventSearch(TargetEvent += uniqueStamp);
 }