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"); }
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"); }
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); }
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); }
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); }