Beispiel #1
0
 /// <summary>
 /// Creates a page using a specific template and gies a user view permissions for the page.
 /// Will not work unless the test is already on the Add Page form.
 /// </summary>
 /// <param name="pageName">The name of the page.</param>
 /// <param name="userName">The username of the user.</param>
 /// <param name="templateName">The name of the template.</param>
 public void AddPageGiveUserViewPermissionSelectTemplate(string pageName, string userName, string templateName)
 {
     PageNameField.Value = pageName;
     PageTemplateSelect.Select(templateName);
     System.Threading.Thread.Sleep(1000);
     PermissionsTabLink.Click();
     UserPermissionField.Value = userName;
     AddUserPermissionLink.Click();
     System.Threading.Thread.Sleep(1000);
     AddPageLink.Click();
     System.Threading.Thread.Sleep(3000);
 }
Beispiel #2
0
 /// <summary>
 /// Creates a page using a specific template. All other settings will have the default value.
 /// Will not work unless the test is already on the Add Page form.
 /// </summary>
 /// <param name="pageName">The name of the page.</param>
 /// <param name="template">The name of the template.</param>
 public void AddPageSelectTemplate(string pageName, string template)
 {
     PageNameField.Value = pageName;
     if (TemplateFolderSelectList.Option("Templates/").Exists)
     {
         TemplateFolderSelectList.Select("Templates/");
     }
     else
     {
         TemplateFolderSelectList.Select("Root");
     }
     PageTemplateSelect.Select(template);
     AddPageLink.ClickNoWait();
     System.Threading.Thread.Sleep(1000);
 }
Beispiel #3
0
 /// <summary>
 /// Creates a page using a specific template and gives All Users view permissions for the page. All other settings will have the default value.
 /// Will not work unless the test is already on the Add Page form.
 /// </summary>
 /// <param name="pageName">The name of the page.</param>
 /// <param name="template">The name of the template.</param>
 public void AddPageSelectTemplateAllUsersView(string pageName, string template)
 {
     PageNameField.Value = pageName;
     if (TemplateFolderSelectList.Option("Templates/").Exists)
     {
         TemplateFolderSelectList.Select("Templates/");
     }
     else
     {
         TemplateFolderSelectList.Select("Root");
     }
     PageTemplateSelect.Select(template);
     SetPermissionForRole("Grant", "View", "All Users");
     AddPageLink.ClickNoWait();
     System.Threading.Thread.Sleep(1500);
 }