public void SetUp()
        {
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(TemplateTitle);

            ServerOperations.Pages().CreatePage(PageName, templateId);
            ServerOperations.Users().CreateUserWithProfileAndRoles(TestAdmin, TestAdminPass, TestAdminFirstName, TestAdminLastName, TestAdminEmail, this.roles);
        }
Exemplo n.º 2
0
 public void TearDown()
 {
     EventHub.Unsubscribe <UserRegistered>(this.userRegisteredEventHandler);
     ServerOperations.Users().DeleteUserAndProfile(this.validModel.Email);
     ServerOperations.Users().DeleteUserAndProfile(this.invalidModel.Email);
     this.eventRaised = false;
 }
        public void SetUp()
        {
            ServerOperations.Roles().CreateRole(RoleName1);
            ServerOperations.Roles().CreateRole(RoleName2);
            Guid templateId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);
            Guid pageId     = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().CreatePage(PageName, templateId);

            pageId = ServerOperations.Pages().GetPageNodeId(pageId);
            ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(pageId, "Contentplaceholder1");
            ServerOperationsFeather.Pages().AddLoginStatusWidgetToPage(pageId, "Contentplaceholder1");
            ServerOperationsFeather.Pages().AddLoginFormWidgetToPage(pageId, "Contentplaceholder1");

            ServerOperations.Documents().CreateLibrary(LibraryTitle);
            ServerOperations.Documents().CreateLibrary(AnotherDocumentLibraryTitle);

            ServerOperations.Documents().Upload(LibraryTitle, DocumentTitle + 1, ImageResource1);
            ServerOperations.Documents().Upload(AnotherDocumentLibraryTitle, DocumentTitle + 2, ImageResource2);

            Guid userId1 = ServerOperations.Users().CreateUserWithProfileAndRoles(AuthorUserName1, AuthorPassword1, AuthorFirstName1, AuthorLastName1, AuthorEmail1, new List <string> {
                RoleName1
            });
            Guid userId2 = ServerOperations.Users().CreateUserWithProfileAndRoles(AuthorUserName2, AuthorPassword2, AuthorFirstName2, AuthorLastName2, AuthorEmail2, new List <string> {
                RoleName2
            });

            ServerOperations.Roles().AssignRoleToUser(RoleName1, userId1);
            ServerOperations.Roles().AssignRoleToUser(RoleName2, userId2);
        }
 public void TearDown()
 {
     AuthenticationHelper.LogoutUser(NewUserEmail);
     AuthenticationHelper.AuthenticateUser(this.AdminEmail, this.AdminPass, true);
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile(NewUserEmail);
 }
 public void TearDown()
 {
     ServerOperations.Users().LogoutUser();
     AuthenticationHelper.AuthenticateUser(AdminUser, AdminPassword);
     ServerOperations.Users().DeleteUserAndProfile(User);
     ServerOperations.Pages().DeleteAllPages();
 }
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile(AuthorUserName);
     ServerOperations.Users().DeleteUserAndProfile(AuthorUserName1);
     ServerOperations.Users().DeleteUserAndProfile(EditorUserName);
     ServerOperations.Users().DeleteUserAndProfile(AdministratorUserName1);
 }
 public void ChangeUserRole()
 {
     ServerOperations.Users().LogoutUser();
     AuthenticationHelper.AuthenticateUser(AdminUser, AdminPassword);
     ServerOperationsFeather.Users().RemoveUserFromRole(Editors, RoleProvider, User);
     ServerOperationsFeather.Users().AddUserToRole(Designers, RoleProvider, User);
     ServerOperationsFeather.Pages().RepublishPage(HomePage);
 }
 public void Setup()
 {
     ServerOperations.Users().CreateUserWithProfileAndRoles(AuthorUserName, AuthorPassword, AuthorFirstName, AuthorLastName, AuthorEmail, new List <string> {
         "BackendUsers", "Authors"
     });
     ServerOperations.Users().CreateUserWithProfileAndRoles(AdministratorUserName, AdministratorPassword, AdministratorFirstName, AdministratorLastName, AdministratorEmail, new List <string> {
         "BackendUsers", "Administrators"
     });
 }
 public void TearDown()
 {
     ServerOperations.Users().LogoutUser();
     AuthenticationHelper.AuthenticateUser(AdminUser, AdminPassword);
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Documents().DeleteAllLibrariesExceptDefaultOne();
     ServerOperations.Users().DeleteUserAndProfile(AuthorUserName1);
     ServerOperations.Users().DeleteUserAndProfile(AuthorUserName2);
     ServerOperations.Roles().DeleteRoles(new string[] { RoleName1, RoleName2 });
 }
        public void SetUp()
        {
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(TemplateTitle);

            ServerOperations.Pages().CreatePage(ProfilePage, templateId);

            ServerOperations.Users().CreateUserWithProfileAndRoles(NewUserEmail, NewUserPassword, NewUserFirstName, NewUserLastName, new List <string> {
                "BackendUsers", "Administrators"
            });
        }
Exemplo n.º 11
0
        public void TearDown()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);

            ServerOperations.Pages().DeleteAllPages();
            var siteID = ServerOperations.Comments().GetCurrentSiteId.ToString();

            ServerOperations.Comments().DeleteAllComments(siteID);
            ServerOperations.Comments().AllowComments(ThreadType, false);
            ServerOperations.Users().DeleteUserAndProfile(NewUserName);
        }
Exemplo n.º 12
0
        public void SetUp()
        {
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);
            Guid pageId     = ServerOperations.Pages().CreatePage(PageName, templateId);
            Guid pageNodeId = ServerOperations.Pages().GetPageNodeId(pageId);

            ServerOperationsFeather.Pages().AddUsersListWidgetToPage(pageNodeId, PlaceHolderId);

            ServerOperations.Users().CreateUserWithProfileAndRoles(AuthorEmail, AuthorPassword, AuthorFirstName, AuthorLastName, new List <string> {
                "BackendUsers", "Authors"
            });
            ServerOperations.Users().CreateUserWithProfileAndRoles(AdministratorEmail, AdministratorPassword, AdministratorFirstName, AdministratorLastName, new List <string> {
                "BackendUsers", "Administrators"
            });
        }
Exemplo n.º 13
0
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);

            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);
            Guid pageId     = ServerOperations.Pages().CreatePage(PageName, templateId);

            pageId = ServerOperations.Pages().GetPageNodeId(pageId);
            ServerOperationsFeather.Pages().AddProfileWidgetToPage(pageId, PlaceHolderId);

            ServerOperations.Users().CreateUserWithProfileAndRoles(NewUserName, NewUserPassword, NewUserFirstName, NewUserLastName, NewUserEmail, new List <string> {
                "BackendUsers", "Administrators"
            });
            AuthenticationHelper.LogoutUser(AdminUserName);
        }
Exemplo n.º 14
0
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);

            ServerOperations.Comments().AllowComments(ThreadType, true);
            Guid templateId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName);
            Guid pageId     = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().CreatePage(PageName, templateId);

            pageId = ServerOperations.Pages().GetPageNodeId(pageId);
            ServerOperationsFeather.Pages().AddReviewsWidgetToPage(pageId, "Contentplaceholder1");

            ServerOperations.Users().CreateUserWithProfileAndRoles(NewUserName, NewUserPassword, NewUserFirstName, NewUserLastName, NewUserEmail, new List <string> {
                "BackendUsers", "Administrators"
            });
            AuthenticationHelper.LogoutUser(AdminUserName);
        }
Exemplo n.º 15
0
        public void SetUp()
        {
            Guid listPageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddUsersListWidgetToPage(listPageId);
            Guid detailsPageId = ServerOperations.Pages().CreatePage(SingleUserPage);

            ServerOperationsFeather.Pages().AddUsersListWidgetToPage(detailsPageId);

            ServerOperations.Users().CreateUserWithProfileAndRoles(AuthorEmail, AuthorPassword, AuthorFirstName, AuthorLastName, new List <string> {
                "BackendUsers", "Authors"
            });
            ServerOperations.Users().CreateUserWithProfileAndRoles(EditorEmail, EditorPassword, EditorFirstName, EditorLastName, new List <string> {
                "BackendUsers", "Editors"
            });
        }
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id);

            var parentId    = ServerOperations.Videos().CreateLibrary(VideoLibraryTitle);
            var childId     = ServerOperations.Videos().CreateFolder(ChildLibraryTitle, parentId);
            var nextChildId = ServerOperations.Videos().CreateFolder(NextChildLibraryTitle, childId);

            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 1, VideoResource);
            ServerOperationsFeather.MediaOperations().UploadVideoInFolder(childId, VideoTitle + 2, VideoResourceChild);
            ServerOperations.Users().CreateUserWithProfileAndRoles(this.AdninistratorEmail, "password", "Administrator", "User", new List <string> {
                "BackendUsers", "Administrators"
            });

            AuthenticationHelper.AuthenticateUser(this.AdninistratorEmail, "password", true);
            ServerOperationsFeather.MediaOperations().UploadVideoInFolder(nextChildId, VideoTitle + 3, VideoResourceNextChild);
        }
Exemplo n.º 17
0
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id);

            var parentId    = ServerSideUpload.CreateAlbum(ImageLibraryTitle);
            var childId     = ServerSideUpload.CreateFolder(ChildLibraryTitle, parentId);
            var nextChildId = ServerSideUpload.CreateFolder(NextChildLibraryTitle, childId);

            ServerSideUpload.UploadImage(ImageLibraryTitle, ImageTitle + 1, ImageResource);

            ServerSideUpload.UploadImageInFolder(childId, ImageTitle + 2, ImageResourceChild);

            ServerOperations.Users().CreateUserWithProfileAndRoles("administrator", "password", "Administrator", "User", "*****@*****.**", new List <string> {
                "BackendUsers", "Administrators"
            });

            AuthenticationHelper.AuthenticateUser("administrator", "password", true);
            ServerSideUpload.UploadImageInFolder(nextChildId, ImageTitle + 3, ImageResourceNextChild);
        }
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id);

            var parentId    = ServerSideUpload.CreateDocumentLibrary(DocumentLibraryTitle);
            var childId     = ServerSideUpload.CreateFolder(ChildLibraryTitle, parentId);
            var nextChildId = ServerSideUpload.CreateFolder(NextChildLibraryTitle, childId);

            ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 1, DocumentResource);
            ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(childId, DocumentTitle + 2, DocumentResourceChild);

            ServerOperations.Users().CreateUserWithProfileAndRoles("administrator", "password", "Administrator", "User", "*****@*****.**", new List <string> {
                "BackendUsers", "Administrators"
            });

            AuthenticationHelper.AuthenticateUser("administrator", "password", true);
            ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(nextChildId, DocumentTitle + 3, DocumentResourceNextChild);
        }
        public void SetUp()
        {
            string templateName = ServerArrangementContext.GetCurrent().Values["templateName"];

            AuthenticationHelper.AuthenticateUser(AdminUser, AdminPassword);

            List <string> roles = new List <string>()
            {
                Editors, BackendUsers
            };

            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(templateName);
            Guid pageId     = ServerOperations.Pages().CreatePage(HomePage, templateId);

            pageId = ServerOperations.Pages().GetPageNodeId(pageId);

            ServerOperations.Users().CreateUserWithProfileAndRoles(User, Password, User, User, Email, roles);
            ServerOperations.Pages().CreatePage(TestPage);
            ServerOperationsFeather.Pages().DenyPermissionsForRole(Editors, RoleProvider, TestPage);

            FeatherServerOperations.Pages().AddMvcWidgetToPage(pageId, typeof(NavigationController).FullName, WidgetCaption, PlaceHolderId);
        }
Exemplo n.º 20
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile("administrator");
     ServerOperations.Libraries().DeleteLibraries(false, "Image");
 }
Exemplo n.º 21
0
 public void TearDown()
 {
     AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);
     ServerOperations.Users().DeleteUserAndProfile(NewUserName);
 }
Exemplo n.º 22
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile(AuthorEmail);
     ServerOperations.Users().DeleteUserAndProfile(EditorEmail);
 }
Exemplo n.º 23
0
 public void TearDown()
 {
     ServerOperations.Users().DeleteUserAndProfile(AuthorEmail);
     ServerOperations.Users().DeleteUserAndProfile(AdministratorEmail);
 }
Exemplo n.º 24
0
 public void TearDown()
 {
     AuthenticationHelper.AuthenticateUser(this.AdminEmail, this.AdminPass, true);
     ServerOperations.Users().DeleteUserAndProfile(NewUserEmail);
     ServerOperations.Templates().DeletePageTemplate("TestHybrid");
 }
Exemplo n.º 25
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile("administrator");
     ServerOperations.Videos().DeleteAllLibrariesExceptDefaultOne();
 }
Exemplo n.º 26
0
 public void TearDown()
 {
     ServerOperations.Pages().DeleteAllPages();
     ServerOperations.Users().DeleteUserAndProfile(this.AdninistratorEmail);
     ServerOperations.Documents().DeleteAllLibrariesExceptDefaultOne();
 }