예제 #1
0
        public void CanNavigateToManageTemplateScreen()
        {
            //TemplateSearchScreen ScreenObject = TemplateScreenNavigation.NavigateToTemplateMenuPage();
            String[]             featureList  = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObject = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            bool assert1 = ScreenObject.IsCreateNewTemplateDisplayed();
            bool assert2 = !(ScreenObject.IsCancelTemplateDisplayed());
            bool assert3 = !(ScreenObject.IsSaveTemplateDisplayed());

            Assert.True(assert1 && assert2 && assert3);
        }
예제 #2
0
        public void DeleteMessageTemplate()
        {
            String[]             featureList  = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObject = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            //Create a new template with invisible property.
            string tName = "Delete" + TemplateSearchScreen.RandomString(5);

            ScreenObject.CreateMessageTemplate(tName, "General", true);

            TemplateScreenNavigation.CloseManageMessageTemplateTab();
            TemplateScreenNavigation.NavigateToTemplateMenuPage(false);

            Assert.True(ScreenObject.DeleteTemplate(tName) == "No Records Found");
        }
예제 #3
0
        public void AbleToCloneTemplate()
        {
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            //Create a new template with invisible property.
            string tName = "Able" + TemplateSearchScreen.RandomString(5);

            ScreenObj.CreateMessageTemplate(tName, "General", false);

            //Search for newly created template.
            TemplateScreenNavigation.CloseManageMessageTemplateTab();
            TemplateScreenNavigation.NavigateToTemplateMenuPage(false);

            ScreenObj.CloneTemplateFromToolbar(tName, "General");
            ScreenObj.CheckForClonedTemplate("Copy of " + tName, "General");
        }
예제 #4
0
        public void ValInvisibleTemplateInSearchResultsIncludeInactive()
        {
            //TemplateSearchScreen ScreenObj = TemplateScreenNavigation.NavigateToTemplateMenuPage();
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);


            //Create a new template with invisible property.
            string tName = "ValInvi" + TemplateSearchScreen.RandomString(5);

            ScreenObj.CreateMessageTemplate(tName, "General", false);

            //Search for newly created template.
            TemplateScreenNavigation.CloseManageMessageTemplateTab();
            TemplateScreenNavigation.NavigateToTemplateMenuPage(false);

            bool assertVal = ScreenObj.CheckResultsInTemplateSearch(tName, true) == "Record Found";

            //ScreenObj.DeleteTemplate(tName, true);
            Assert.True(assertVal);
        }
예제 #5
0
        public void ValSameTemplateNameAndUniquePurpose()
        {
            //TemplateSearchScreen ScreenObj = TemplateScreenNavigation.NavigateToTemplateMenuPage();
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            //Create a new template first.
            string tName = "ValS" + TemplateSearchScreen.RandomString(5);

            ScreenObj.CreateMessageTemplate(tName, "General");

            //Try and make new template with same name.
            TemplateScreenNavigation.CloseManageMessageTemplateTab();

            TemplateScreenNavigation.NavigateToTemplateMenuPage(false);
            bool assertVal = ScreenObj.CreateMessageTemplate(tName, "Parental Reporting");

            //ScreenObj.DeleteTemplate(tName);

            Assert.True(assertVal);
        }
예제 #6
0
        public void ValCreateNewGeneralMsgTemplate()
        {
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            //Can i enter Template Name?
            bool assert1 = ScreenObj.IsTemplateNameAccessible();

            //Is the template name mandatory
            bool assert2 = ScreenObj.IsTemplateNameMandatory();

            //is the type of template mandatory.
            //bool assert3 = ScreenObj.IsTemplateTypeMandatory();

            //Can i select the type of template
            bool assert4 = ScreenObj.IsTemplateTypeSelectable("Parental Reporting");

            //Can i check whether the template is visible.
            bool assert5 = ScreenObj.IsTemplateMarkedActive();

            Assert.True(assert1 && assert2 && assert4 && assert5);
        }
예제 #7
0
        public void ValUniqueTemplateNameAndPurpose()
        {
            //TemplateSearchScreen ScreenObj = TemplateScreenNavigation.NavigateToTemplateMenuPage();
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

            //Create a new template first.
            string tName = "ValU" + TemplateSearchScreen.RandomString(5);

            ScreenObj.CreateMessageTemplate(tName, "General");

            //Try and make new template with same name.
            TemplateScreenNavigation.CloseManageMessageTemplateTab();

            TemplateScreenNavigation.NavigateToTemplateMenuPage(false);
            bool assertVal = ScreenObj.CreateMessageTemplate(tName, "General");

            POM.Helper.SeleniumHelper.ClickByJS(ScreenObj.cancelTemplate);
            BaseSeleniumComponents.WaitUntilDisplayed(By.CssSelector(POM.Helper.SeleniumHelper.AutomationId("ignore_commit_dialog")));
            System.Threading.Thread.Sleep(2000);
            POM.Helper.SeleniumHelper.ClickByJS(ScreenObj.cancelTemplateDontSave);
            ScreenObj.DeleteTemplate(tName);
            Assert.False(assertVal);
        }