示例#1
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");
        }
示例#2
0
        public void ValInvisibleTemplateInSearchResultsExcludeInactive()
        {
            //TemplateSearchScreen ScreenObj = TemplateScreenNavigation.NavigateToTemplateMenuPage();
            String[]             featureList = { "SendMessage", "ManageTemplate" };
            TemplateSearchScreen ScreenObj   = TemplateScreenNavigation.NavigateToTemplateMenuPageFeatureBee(featureList);

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

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

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

            bool assertVal = ScreenObj.CheckResultsInTemplateSearch(tName) == "No Records Found";

            ScreenObj.DeleteTemplate(tName, true);

            Assert.True(assertVal);
        }
示例#3
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);
        }