Пример #1
0
        public void GivenAStaticSelectionCopyOfQueryExists(string selection, string query)
        {
            BBCRMHomePage.OpenAnalysisFA();
            AnalysisFunctionalArea.InformationLibrary();

            IDictionary <string, string> queryRow = new Dictionary <string, string> {
                { "Name", query }
            };

            if (!InformationLibraryPanel.QueryExists(queryRow))
            {
                CreateUnacknowledgedRevenueSelection(query);
            }

            IDictionary <string, string> selectionRow = new Dictionary <string, string> {
                { "Name", selection }
            };

            if (InformationLibraryPanel.QueryExists(selectionRow))
            {
                InformationLibraryPanel.DeleteQuery(selectionRow);
                //re-nvaigate should not be necessary.  only done due to filed bug 490200
                BBCRMHomePage.OpenAnalysisFA();
                AnalysisFunctionalArea.InformationLibrary();
            }

            InformationLibraryPanel.CopyQueryAsStaticSelection(selection, queryRow);
        }
        public void WhenIAddAd_HocQueryType(string queryType)
        {
            try
            {
                BBCRMHomePage.OpenAnalysisFA();               //open the analysis functional area
                AnalysisFunctionalArea.InformationLibrary();  //open the information library
                InformationLibraryPanel.SelectTab("Queries"); //Select the queries tab

                string querystring = "//div/table/tbody/tr//td/table/tbody/tr//td/div/../..//td/table/tbody/tr/td/em/button[./text() = 'Add an ad-hoc query']";

                InformationLibraryPanel.WaitClick(querystring, 10);                                       //click on the "ad-hoc query" button

                Dialog.SetDropDown(Dialog.getXInput("AdHocQueryNewForm", "RECORDTYPE_value"), queryType); //start the adhoc query for the selected querytype
                string gridRowXPath = "";

                if (queryType == "Constituent")
                {
                    //Fundraisers
                    gridRowXPath = "//div[contains(@id,'AdHocQueryNewForm')]//div[contains(@id, 'GROUPTYPE-Constituent-bd')]/div[3]/table";
                }
                else if (queryType == "Revenue")
                {
                    gridRowXPath = "//div[contains(@id,'AdHocQueryNewForm')]//div[contains(@id, 'GROUPTYPE-Revenue-bd')]/div[2]/table";
                }
                InformationLibraryPanel.WaitClick(gridRowXPath, 20); //click on that row
                InformationLibraryPanel.WaitClick(Dialog.getXOKButton, 20);
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add an adhoc query. " + ex.Message);
            }
        }
Пример #3
0
        public void GivenUnacknowledgedRevenueQueryExists(string selection)
        {
            BBCRMHomePage.OpenAnalysisFA();
            AnalysisFunctionalArea.InformationLibrary();
            IDictionary <string, string> selectionRow = new Dictionary <string, string> {
                { "Name", selection }
            };

            if (InformationLibraryPanel.QueryExists(selectionRow))
            {
                return;
            }
            CreateUnacknowledgedRevenueSelection(selection);
        }
        public void WhenIAddAConstituentAdhocQueryType()
        {
            try
            {
                BBCRMHomePage.OpenAnalysisFA();               //open the analysis functional area
                AnalysisFunctionalArea.InformationLibrary();  //open the information library
                InformationLibraryPanel.SelectTab("Queries"); //Select the queries tab

                string querystring = "//div[contains(@class,'bbui-pages-contentcontainer')" +
                                     "and not(contains(@class,'hide'))]//div[not(contains(@class,'x-hide-display'))" +
                                     "and contains(@class,'bbui-pages-pagesection') and not(contains(@class,'row'))]//div[contains(@id,'pageSection')]" +
                                     "/div/table/tbody/tr//td/table/tbody/tr//td/div/../..//td/table/tbody/tr/td/em/button[./text() = 'Add an ad-hoc query']";

                InformationLibraryPanel.WaitClick(querystring, 10);                                                //click on the "ad-hoc query" button

                string gridRowXPath = "//div[contains(@id,'GROUPTYPE-Most commonly used')]/div[1]/table/tbody/tr"; //select one of the rows for that query type
                InformationLibraryPanel.WaitClick(gridRowXPath, 10);                                               //click on that row
                InformationLibraryPanel.WaitClick(Dialog.getXOKButton, 10);
            }
            catch (Exception ex)
            {
                throw new Exception("Error: could not add a constituent ad hoc query type. " + ex.Message);
            }
        }
Пример #5
0
 public void WhenIAddAd_HocQueryType(string queryType)
 {
     BBCRMHomePage.OpenAnalysisFA();
     AnalysisFunctionalArea.InformationLibrary();
     InformationLibraryPanel.AddAdHocQuery(queryType);
 }