public void ServerSetUp()
        {
            Guid listId = ServerOperations.Lists().CreateList("TestList");

            ServerOperations.Lists().CreateListItem(listId, "TestListItem", "TestListItem");
            Guid pageId = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddListsWidgetToPage(pageId);
            ServerOperationsFeather.DynamicModules().ExtractStructureZip(PackageResource, InstallationPath);
            ServerOperations.SystemManager().RestartApplication(false);
            WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)
                                               + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
        }
Пример #2
0
        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));
        }
Пример #3
0
        public void DynamicStructureTransfer_ImportDynamicModule_VerifyMvcWidgetsExist()
        {
            var exportModulePath = HostingEnvironment.MapPath(ImportExportDynamicStructureTests.ExportModulePath);

            if (!Directory.Exists(exportModulePath))
            {
                Directory.CreateDirectory(exportModulePath);
            }

            var assembly = ServerOperationsFeather.DynamicModules().GetTestUtilitiesAssembly();

            Dictionary <string, string> files = new System.Collections.Generic.Dictionary <string, string>()
            {
                { "PackedModule.sf", ImportExportDynamicStructureTests.DynamicModuleFile },
                { "widgetTemplates.sf", ImportExportDynamicStructureTests.DynamicModuleWidgetTemplatesFile },
                { "configs.sf", ImportExportDynamicStructureTests.DynamicModuleConfigurationsFile }
            };

            foreach (var file in files)
            {
                using (Stream embeddedFileStream = assembly.GetManifestResourceStream(file.Value))
                {
                    var filePath = string.Concat(exportModulePath, Path.DirectorySeparatorChar, file.Key);
                    using (FileStream fileStream = new FileStream(filePath, FileMode.Create))
                    {
                        embeddedFileStream.CopyTo(fileStream);
                    }
                }
            }

            // Restart the application
            SystemManager.ClearCurrentTransactions();
            ServerOperations.SystemManager().RestartApplication(false);
            WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) +
                                               (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));

            var dynamicWidgetSection = ServerOperationsFeather.Pages().GetDynamicWidgetToolboxSection(ModuleName);

            string[] widgets = new string[]
            {
                ModuleWidgetTitle1,
                ModuleWidgetTitle2,
                ModuleWidgetTitle3
            };

            foreach (var widget in widgets)
            {
                Assert.IsTrue(ServerOperationsFeather.Pages().IsWidgetPresentInToolbox(dynamicWidgetSection, widget, isMvcWidget: true), "Widget " + widget + " is missing!");
                Assert.IsTrue(ServerOperationsFeather.Pages().IsWidgetPresentInToolbox(dynamicWidgetSection, widget, isMvcWidget: false), "Widget " + widget + " is missing!");
            }
        }
Пример #4
0
        public void ServerSetUp()
        {
            Guid page1Id = ServerOperations.Pages().CreatePage(PageName);

            ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(page1Id);
            Guid albumId = ServerOperations.Documents().CreateLibrary(AlbumName);
            MultilingualTestConfig config = MultilingualTestConfig.Get();

            config.DocumentBgTitle = DocumentTitle;
            ServerOperations.Multilingual().Documents().CreateDocumentMultilingual(config, null, albumId, false, 0, "en");

            ServerOperationsFeather.DynamicModules().ExtractStructureZip(PackageResource, InstallationPath);
            ServerOperations.SystemManager().RestartApplication(false);
            WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)
                                               + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
        }
Пример #5
0
 public void LoadApplication()
 {
     WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url
                                        .GetLeftPart(UriPartial.Authority) + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
 }
Пример #6
0
 public void RestartApplication()
 {
     ServerOperations.SystemManager().RestartApplication(false);
     WaitUtils.WaitForSitefinityToStart(HttpContext.Current.Request.Url
                                        .GetLeftPart(UriPartial.Authority) + (HostingEnvironment.ApplicationVirtualPath.TrimEnd('/') ?? string.Empty));
 }