Esempio n. 1
0
 public void GivenAnEventExists(Table events)
 {
     foreach (var e in events.Rows)
     {
         StepHelper.SetTodayDateInTableRow("Start date", e);
         e["Name"] += uniqueStamp;
         //navigate to event and add event
         BBCRMHomePage.OpenEventsFA();
         Panel.WaitClick(XpathHelper.xPath.VisiblePanel + "//button[./text()='Add new']");
         Panel.WaitClick("//span[./text()='Event']");
         //test for "Cannot read property 'createChild' of null" popup?
         try
         {
             BaseComponent.GetEnabledElement("//span[contains(.,'Cannot read property')]", 5);
             Dialog.OK();
         }
         catch
         {
             //eat exception
         }
         //check is visible
         BaseComponent.GetEnabledElement(XpathHelper.xPath.VisibleBlock + "//span[text()='Add an event']");
         //set fields
         Dialog.SetTextField("//input[contains(@id,'_STARTDATE_value')]", e["Start date"]);
         Dialog.SetTextField("//input[contains(@id,'_NAME_value')]", e["Name"]);
         Dialog.SetTextField("//input[contains(@id,'_EVENTCATEGORYCODEID_value')]", e["Category"]);
         StepHelper.AddEntryOnTheFly();
         Dialog.Save();
     }
 }
Esempio n. 2
0
 public void GivenConstituentIsMarkedAsDeceasedWithSourceOf(string ConstituentName, string source)
 {
     //lets set the thread culture to get the correct date for the browser
     StepHelper.SetCurrentThreadCultureToConfigValue();
     SearchAndSelectConstituent(ConstituentName);
     //select personal info
     Panel.SelectTab("Personal Info");
     //select "mark deceased"
     BaseComponent.WaitClick("//table[.//div[./text()='Personal information']]/tbody/tr/td[8]//button[./text()='Mark deceased']");
     Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@id,'DECEASEDDATE_value')]", DateTime.Now.ToShortDateString());
     Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@id,'DECEASEDSOURCECODEID_value')]", source);
     StepHelper.AddEntryOnTheFly();
     Dialog.Save();
 }
Esempio n. 3
0
        public void WhenIAddToAssestsTab(Table table)
        {
            dynamic objectData = table.CreateDynamicInstance();

            //edit planned gift
            BaseComponent.WaitClick("//div[./text()='Edit planned gift']");
            BaseComponent.WaitClick(XpathHelper.xPath.VisibleDialog + "//span[./text()='Assets']");
            Dialog.WaitClick(XpathHelper.xPath.VisibleDialog + "//div[contains(@class,'x-grid3-cell-inner x-grid3-col-ASSETTYPECODEID')]");
            Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@class,'x-form-text x-form-field x-form-focus')]", objectData.Type);
            StepHelper.AddEntryOnTheFly();
            Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@class,'x-form-text x-form-field x-form-text-required')]", objectData.Description);
            Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@class,'x-form-text x-form-field bbui-forms-collectiongrid-right')]", Convert.ToString(objectData.Value));
            Dialog.GetEnabledElement(XpathHelper.xPath.VisibleDialog + "//td[contains(@class,'x-grid3-col x-grid3-cell x-grid3-td-VALUE')]/div[./text()='$100.00']");
            Dialog.GetEnabledElement(XpathHelper.xPath.VisibleDialog + "//div[contains(@class,'x-grid3-cell-inner x-grid3-col-ASSETVALUATIONMETHODCODEID')]");
            Dialog.WaitClick(XpathHelper.xPath.VisibleDialog + "//div[contains(@class,'x-grid3-cell-inner x-grid3-col-ASSETVALUATIONMETHODCODEID')]");
            Dialog.SetTextField(XpathHelper.xPath.VisibleDialog + "//input[contains(@class,'x-form-text x-form-field x-form-focus')]", objectData.ValuationMethod);
            StepHelper.AddEntryOnTheFly();
            Dialog.Save();
        }
Esempio n. 4
0
        public void GivenEventExistsWithRegistrationOption(string eventName, string StartDate, Table options)
        {
            DateTime actualStartDate = StepHelper.SetTodayDateForVariable(StartDate);

            eventName += uniqueStamp;
            //navigate to event and add event
            BBCRMHomePage.OpenEventsFA();
            try
            {
                Panel.WaitClick(XpathHelper.xPath.VisiblePanel + "//button[./text()='Add new']", 15);
                Panel.WaitClick("//span[./text()='Event']", 15);
            }
            catch
            {
                try
                {
                    BaseComponent.GetEnabledElement("//span[contains(.,'Cannot read property')]", 5);
                    Dialog.OK();
                }
                catch { }
                Panel.WaitClick(XpathHelper.xPath.VisiblePanel + "//button[./text()='Add new']", 15);
                Panel.WaitClick("//span[./text()='Event']", 15);
            }

            //check is visible
            BaseComponent.GetEnabledElement(XpathHelper.xPath.VisibleBlock + "//span[text()='Add an event']");
            //set fields
            Dialog.SetTextField("//input[contains(@id,'_STARTDATE_value')]", actualStartDate.ToShortDateString());
            Dialog.SetTextField("//input[contains(@id,'_NAME_value')]", eventName);
            Dialog.SetTextField("//input[contains(@id,'_EVENTCATEGORYCODEID_value')]", "Sport");
            StepHelper.AddEntryOnTheFly();
            Dialog.Save();

            foreach (var option in options.Rows)
            {
                EventPanel.AddRegistrationOption(option);
            }
        }