예제 #1
0
        public void OnBeforeTestsStarts()
        {
            var  templateId = ServerOperations.Templates().GetTemplateIdByTitle(TemplateTitle);
            Guid pageId     = ServerOperations.Pages().CreatePage(PageTitle, templateId);

            ServerOperations.Events().CreateEvent(EventsTitle);
            var pageNodeId = ServerOperations.Pages().GetPageNodeId(pageId);

            ServerOperationsFeather.Pages().AddCalendarWidgetToPage(pageNodeId, PlaceHolderId);
        }
예제 #2
0
        public void SetUp()
        {
            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.DynamicModules().EnsureModuleIsImported(ModuleName, ModuleResource);
            ServerOperationsFeather.DynamicModulePressArticle().CreatePressArticleItem(DynamicTitle, DynamicUrl);
            ServerOperationsFeather.Pages().AddDynamicWidgetToPage(pageId, ResolveType, WidgetName, WidgetCaptionDynamicWidget, "Contentplaceholder1");
        }
        public void VerifyToolboxConfig()
        {
            string dynamicWidgetSection = ModuleName;
            var    section       = ServerOperationsFeather.Pages().GetDynamicWidgetToolboxSection(dynamicWidgetSection);
            int    expectedCount = 4;

            Assert.IsTrue(section.Tools.Count.Equals(expectedCount), "Widgets count is unexpected.");
            Assert.IsTrue(ServerOperationsFeather.Pages().IsWidgetPresentInToolbox(section, DynamicWidgetTitle, isMvcWidget: true), "Mvc Widget not found: " + DynamicWidgetTitle);
            Assert.IsTrue(ServerOperationsFeather.Pages().IsWidgetPresentInToolbox(section, DynamicWidgetTitle, isMvcWidget: false), "Web forms Widget not found: " + DynamicWidgetTitle);
        }
        public void SetUp()
        {
            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            for (int i = 1; i < 6; i++)
            {
                ServerOperationsFeather.NewsOperations().CreatePublishedNewsItem(NewsTitle + (i - 1), NewsContent, "AuthorName", "SourceName", null, null, null);
            }

            ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageId);
        }
        public void SetUp()
        {
            ServerOperations.Comments().AllowComments(ThreadType, true);
            var  domainKey  = ServerOperations.Comments().GetCurrentSiteId.ToString();
            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");
            ServerOperationsFeather.CommentsAndReviews().CreateReview(domainKey, ThreadType, pageId, PageName, ReviewsMessage, ReviewsRating, ReviewsStatusPublish);
        }
예제 #6
0
        public void SetUp()
        {
            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(TemplateTitle);
            Guid pageId     = ServerOperations.Pages().CreatePage(PageName, templateId);
            Guid pageNodeId = ServerOperations.Pages().GetPageNodeId(pageId);

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

            ServerOperations.Pages().CreatePage(FirstRedirectPage);
            ServerOperations.Pages().CreatePage(SecondRedirectPage);
        }
        public void SetUp()
        {
            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            for (int i = 1; i < 6; i++)
            {
                ServerOperations.Events().CreateEvent(EventsTitle + i);
            }

            ServerOperationsFeather.Pages().AddEventsWidgetToPage(pageId, "Body");
        }
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(this.AdminEmail, this.AdminPass, true);

            Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(TemplateTitle);
            Guid pageId     = ServerOperations.Pages().CreatePage(PageTitle, templateId);

            pageId = ServerOperations.Pages().GetPageNodeId(pageId);
            ServerOperationsFeather.Pages().AddRegistrationWidgetToPage(pageId, PlaceHolderId);
            ServerOperationsFeather.Pages().AddProfileWidgetToPage(pageId, PlaceHolderId);
        }
        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().AddCommentsWidgetToPage(pageId, "Contentplaceholder1");
        }
예제 #10
0
        public void ServerSetUp()
        {
            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageId);
            ServerOperations.News().CreateNewsItem("TestNews");
            ServerOperationsFeather.DynamicModules().ExtractStructureZip(PackageResource, InstallationPath);
            ServerOperations.SystemManager().RestartApplication(false);
            WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)
                                               + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
        }
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id);

            ServerOperations.Images().CreateLibrary(ImageLibraryTitle);
            ServerSideUpload.UploadImage(ImageLibraryTitle, ImageTitle1, ImageResource1);
            ServerSideUpload.UploadImage(ImageLibraryTitle, ImageTitle2, ImageResource2);
            ServerSideUpload.UploadImage(ImageLibraryTitle, ImageTitle3, ImageResource3);
        }
예제 #12
0
        public void SetUp()
        {
            for (int i = 0; i < 20; i++)
            {
                ids[i] = ServerOperations.News().CreatePublishedNewsItem(newsTitle: NewsItemTitle + i, newsContent: NewsItemContent + i, author: NewsItemAuthor + i);
            }

            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageId);
        }
        public void SetUp()
        {
            ServerOperationsFeather.ListsOperations().CreateList(this.listId, ListTitle, ListDescription);
            ServerOperationsFeather.ListsOperations().CreateListItemMultilingual(this.mlconfig, this.listId, ListItem1Title, ListItem1Content, false, this.culture);
            ServerOperationsFeather.ListsOperations().CreateListItemMultilingual(this.mlconfig, this.listId, ListItem2Title, ListItem2Content, false, this.culture);
            ServerOperationsFeather.ListsOperations().CreateListItemMultilingual(this.mlconfig, this.listId, ListItem3Title, ListItem3Content, false, this.culture);

            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddListsWidgetToPage(pageId);
        }
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(this.AdminEmail, this.AdminPass, true);
            ServerOperations.ContentBlocks().CreateSecondDataProvider();
            Guid page1Id      = ServerOperations.Pages().CreatePage(PageName);
            var  providerName = ContentManager.GetManager().Provider.Name;

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id, Content);
            ServerOperationsFeather.ContentBlockOperations().CreateContentBlock("Content Block 1", "Content 1", providerName);
            ServerOperationsFeather.ContentBlockOperations().CreateContentBlock("Content Block 2", "Content 2", SecondProviderName);
        }
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);
            ServerOperationsFeather.DynamicModules().EnsureModuleIsImported(ModuleName, ModuleResource);

            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.DynamicModulePressArticle().CreatePressArticle(ItemsTitle, ItemsTitle + "Url");

            ServerOperationsFeather.Pages().AddDynamicWidgetToPage(pageId, "Telerik.Sitefinity.DynamicTypes.Model.PressRelease.PressArticle", "PressArticle", "Press Articles MVC");
        }
예제 #16
0
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);
            ServerOperations.Configuration().EnableRatings(true);
            ServerOperations.News().CreatePublishedNewsItemLiveId(NewsTitle, NewsContent, NewsAuthor, NewsSource);
            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().AddNewsWidgetToPage(pageId, "Contentplaceholder1");
        }
예제 #17
0
        public void SetUp()
        {
            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            for (int i = 1; i < 6; i++)
            {
                ServerOperations.Blogs().CreateBlog(BlogTitle + i, null, null, null);
            }

            ServerOperationsFeather.Pages().AddBlogsWidgetToPage(pageId, "Body");
        }
        public void SetUp()
        {
            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().AddCommentsWidgetToPage(pageId, "Contentplaceholder1");
            var groupKey = ServerOperations.Comments().GetCurrentSiteId.ToString();

            ServerOperations.Comments().CreateComment(groupKey, ThreadType, pageId, PageName, CommentToPage, "published", false);
        }
        private PageNode CreatePageWithMvcWidget(string templateTitle, string widgetPlaceholder)
        {
            Guid templateId  = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(templateTitle);
            var  pageId      = ServerOperations.Pages().CreatePage("TestPage1", templateId);
            var  pageNodeId  = ServerOperations.Pages().GetPageNodeId(pageId);
            var  pageManager = Telerik.Sitefinity.Modules.Pages.PageManager.GetManager();
            var  pageNode    = pageManager.GetPageNode(pageNodeId);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(pageNodeId, LayoutCompilationPerformanceTests.WidgetName, widgetPlaceholder);

            return(pageNode);
        }
예제 #20
0
        public void SetUp()
        {
            Guid newsId = ServerOperations.News().CreatePublishedNewsItemLiveId(NewsTitle, NewsContent, NewsAuthor, NewsSource);

            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().AddNewsWidgetToPage(pageId, "Contentplaceholder1");

            ServerOperations.Comments().CreatePublishedComments(2, this.key, ThreadType, newsId, NewsTitle, CommentMessage);
        }
예제 #21
0
        public void SetUp()
        {
            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().AddContentBlockWidgetToPage(pageId, string.Empty, PlaceHolderId);

            ServerSideUpload.CreateVideoLibrary(LibraryTitle);
            ServerSideUpload.UploadVideo(LibraryTitle, VideoTitle1, VideoResource1);
        }
예제 #22
0
        public void SetUp()
        {
            Guid selectorPageId = ServerOperations.Pages().CreatePage(LinkSelectorPageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(selectorPageId, ContentBlockHtml);

            Guid parentPageId = ServerOperations.Pages().CreatePage(ParentPageName);

            Guid childPageId = Guid.NewGuid();

            ServerOperations.Pages().CreatePage(ChildPageName, childPageId, parentPageId);
        }
예제 #23
0
        public void SetUp()
        {
            string templateName = ServerArrangementContext.GetCurrent().Values["templateName"];

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

            ServerOperations.News().CreatePublishedNewsItem(NewsTitle1, NewsContent1, null);
            ServerOperations.News().CreatePublishedNewsItem(NewsTitle2, NewsContent2, null);
            pageId = ServerOperations.Pages().GetPageNodeId(pageId);
            ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageId, PlaceHolderId);
        }
        public void SetUp()
        {
            ServerOperations.News().CreateNewsItem(NewsTitle);

            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageId);

            Guid singleItemPageId = ServerOperations.Pages().CreatePage(SingleItemPage);

            ServerOperationsFeather.Pages().AddNewsWidgetToPage(singleItemPageId);
        }
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id);

            var parentId = ServerOperations.Videos().CreateLibrary(VideoLibraryTitle);

            ServerOperations.Videos().CreateFolder(ChildLibraryTitle, parentId);
            ServerOperations.Taxonomies().CreateCategory(TaxonTitle + 0);
            ServerOperations.Taxonomies().CreateCategory(TaxonTitle + 1, TaxonTitle + 0);
        }
예제 #26
0
        public void PageBreak_HeaderAndFooterFieldsInitialized()
        {
            var controllerForBody = new PageBreakController();
            var controlForBody    = new MvcWidgetProxy();

            controlForBody.ControllerName = typeof(PageBreakController).FullName;
            controlForBody.Settings       = new ControllerSettings(controllerForBody);

            var controllerForHeader = new TextFieldController();
            var controlForHeader    = new MvcWidgetProxy();

            controlForHeader.ControllerName = typeof(TextFieldController).FullName;
            controlForHeader.Settings       = new ControllerSettings(controllerForHeader);

            var controllerForFooter = new ParagraphTextFieldController();
            var controlForFooter    = new MvcWidgetProxy();

            controlForFooter.ControllerName = typeof(ParagraphTextFieldController).FullName;
            controlForFooter.Settings       = new ControllerSettings(controllerForFooter);

            var formId = ServerOperationsFeather.Forms().CreateFormWithWidgets(new List <Control>()
            {
                controlForHeader
            }, new List <Control>()
            {
                controlForBody
            }, new List <Control>()
            {
                controlForFooter
            }, null);
            var pageManager = PageManager.GetManager();

            try
            {
                var template = pageManager.GetTemplates().FirstOrDefault(t => t.Name == "SemanticUI.default" && t.Title == "default");
                Assert.IsNotNull(template, "Template was not found");

                var pageId = FeatherServerOperations.Pages().CreatePageWithTemplate(template, "PageBreakValueTest", "section-header-field-value-test");
                ServerOperationsFeather.Forms().AddFormControlToPage(pageId, formId);

                var pageContent            = ServerOperationsFeather.Pages().GetPageContent(pageId);
                var formMultipageDecorator = ObjectFactory.Resolve <IFormMultipageDecorator>();
                Assert.IsTrue(pageContent.Contains(formMultipageDecorator.SeparatorBegin), "Form did not render page separators");
                Assert.IsTrue(pageContent.Contains("data-sf-role=\"text-field-container\""), "Form did not render page header");
                Assert.IsTrue(pageContent.Contains("data-sf-role=\"paragraph-text-field-container\""), "Form did not render page footer");
            }
            finally
            {
                Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().DeleteAllPages();
                FormsModuleCodeSnippets.DeleteForm(formId);
            }
        }
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddUnsubscribeWidgetToPage(page1Id);

            Guid mailingListId = Guid.NewGuid();
            Guid subscriberId  = Guid.NewGuid();

            ServerOperations.NewsLetter().CreateMailingList(mailingListId, MailingList, string.Empty, string.Empty, string.Empty);
            ServerOperations.NewsLetter().CreateSubscriber(subscriberId, SubscriberFirstName, SubscriberLastName, SubscriberEmail);
            ServerOperations.NewsLetter().AddSubscriberToMailingList(subscriberId, mailingListId);
        }
        public void SetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddVideoGalleryWidgetToPage(page1Id);

            ServerOperations.Videos().CreateLibrary(VideoLibraryTitle);
            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 1, VideoResource1);
            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 2, VideoResource2);
            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 3, VideoResource3);
            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 4, VideoResource4);
            ServerOperations.Videos().Upload(VideoLibraryTitle, VideoTitle + 5, VideoResource5);
        }
        public void ServerSetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddVideoGalleryWidgetToPage(page1Id);
            ServerOperations.Videos().CreateLibrary(AlbumName);
            ServerOperations.Videos().Upload(AlbumName, VideoTitle, FilePath, ".wmv");

            ServerOperationsFeather.DynamicModules().ExtractStructureZip(PackageResource, InstallationPath);
            ServerOperations.SystemManager().RestartApplication(false);
            WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)
                                               + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
        }
예제 #30
0
        public void SetUp()
        {
            AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true);
            Guid selectorPageId = ServerOperations.Pages().CreatePage(LinkSelectorPageName);

            ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(selectorPageId);

            Guid parentPageId = ServerOperations.Pages().CreatePage(ParentPageName);

            Guid childPageId = Guid.NewGuid();

            ServerOperations.Pages().CreatePage(ChildPageName, childPageId, parentPageId);
        }