public void ChangeAuditsFilePath_ThenSave_PersistsChanges_UITest()
        {
            var DataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData, Environment.SpecialFolderOption.Create), "Warewolf");

            var defaultPath = Path.Combine(DataPath, @"Audits");
            var changedPath = Path.Combine(DataPath, @"NewAudits");

            if (!Directory.Exists(changedPath))
            {
                Directory.CreateDirectory(changedPath);
                Assert.IsTrue(Directory.Exists(changedPath));
            }

            UIMap.Click_ConfigureSetting_From_Menu();
            SettingsUIMap.Select_LoggingTab();
            SettingsUIMap.Assert_Audits_File_Path(defaultPath);
            SettingsUIMap.Update_Audits_File_Path(changedPath);
            UIMap.Click_Save_RibbonButton();
            SettingsUIMap.Click_Close_Settings_Tab_Button();
            UIMap.Click_ConfigureSetting_From_Menu();
            SettingsUIMap.Select_LoggingTab();
            // ASSERT CHANGE HAPPENED AFTER CLOSING THE SETTINGS TAB
            SettingsUIMap.Assert_Audits_File_Path(changedPath);
            // RESET TO DEFAULT
            SettingsUIMap.Update_Audits_File_Path(defaultPath);
            UIMap.Click_Save_RibbonButton();

            if (Directory.Exists(changedPath))
            {
                Directory.Delete(changedPath);
                Assert.IsFalse(Directory.Exists(changedPath));
            }
        }
 private void GivenAuditsFilePathIsDefaultValue(string defaultPath)
 {
     // RESET TO DEFAULT
     UIMap.Click_ConfigureSetting_From_Menu();
     SettingsUIMap.Select_LoggingTab();
     SettingsUIMap.Update_Audits_File_Path(defaultPath);
     UIMap.Click_Save_RibbonButton();
     SettingsUIMap.Click_Close_Settings_Tab_Button();
 }
 public void ChangeServerLoggingType_ThenSave_PersistsChanges_UITest()
 {
     UIMap.Click_ConfigureSetting_From_Menu();
     SettingsUIMap.Select_LoggingTab();
     SettingsUIMap.Select_Fatal_Event_Log();
     UIMap.Click_Save_RibbonButton();
     SettingsUIMap.Click_Close_Settings_Tab_Button();
     UIMap.Click_ConfigureSetting_From_Menu();
     SettingsUIMap.Select_LoggingTab();
     Assert.IsTrue(UIMap.ControlExistsNow(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.LogSettingsView.LoggingTypesComboBox.FatalOnlylogeventsthText));
 }
 public void Open_SettingsTab_Then_ConfigureLogging_UITest()
 {
     UIMap.Click_ConfigureSetting_From_Menu();
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.Exists, "Settings tab does not exist after the Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.Exists, "Logging tab does not exist after the Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.Enabled, "Logging tab is disabled after the Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.Exists, "Current selected tab page is not Security after Configure/Setting Menu button is clicked");
     SettingsUIMap.Select_LoggingTab();
     Assert.IsTrue(UIMap.ControlExistsNow(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.LogSettingsView.LoggingTypesComboBox));
     SettingsUIMap.Click_Server_Log_File_Button();
     SettingsUIMap.Click_Studio_Log_File();
 }
Esempio n. 5
0
 public void Open_SettingsTab_Then_ConfigureLogging_UITest()
 {
     UIMap.Click_ConfigureSetting_From_Menu();
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.Exists, "Settings tab does not exist after the Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.Exists, "Logging tab does not exist after the Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.LoggingTab.Enabled, "Logging tab is disabled after the Configure/Setting Menu button is clicked");
     Assert.AreEqual("SECURITY", SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SECURITY.Name, "Current selected tab page is not Security after Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.Exists, "Current selected tab page is not Security after Configure/Setting Menu button is clicked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.Exists, "Warewolf Administrators row does not exist");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.DeleteCell.DeleteButton.Exists, "DeleteButton does not exist");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.DeployToCell.DeployToCheckBox.Checked, "DeployTo checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.DeployFromCell.DeployFromCheckBox.Checked, "DeployFrom checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.AdministratorCell.AdministratorCheckBox.Checked, "Administrator checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.ExecuteCell.ExecuteCheckBox.Checked, "Execute checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.ViewCell.ViewCheckBox.Checked, "View checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.WarewolfAdminROW.ContributeCell.ContributeCheckBox.Checked, "Contribute checkbox is Unchecked");
     Assert.IsTrue(SettingsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.SettingsTab.WorksurfaceContext.SettingsView.TabList.SecurityTab.SecurityWindow.ServerPermissions.PublicROW.Exists, "Public row does not exist");
     SettingsUIMap.Select_LoggingTab();
     SettingsUIMap.Click_Server_Log_File_Button();
     SettingsUIMap.Click_Studio_Log_File();
 }
        public void ChangeAuditsFilePath_ThenSave_PersistsChanges_UITest()
        {
            //Prepare for test
            var DataPath    = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData, Environment.SpecialFolderOption.Create), "Warewolf");
            var defaultPath = Path.Combine(DataPath, @"Audits");
            var changedPath = Path.Combine(DataPath, @"NewAudits");

            GivenAuditsFilePathIsDefaultValue(defaultPath);
            GivenDirectoryExistsAndIsEmpty(changedPath);

            //Execute test
            UIMap.Click_ConfigureSetting_From_Menu();
            SettingsUIMap.Select_LoggingTab();
            SettingsUIMap.Assert_Audits_File_Path(defaultPath);
            SettingsUIMap.Update_Audits_File_Path(changedPath);
            UIMap.Click_Save_RibbonButton();
            SettingsUIMap.Click_Close_Settings_Tab_Button();

            //Assert
            UIMap.Click_ConfigureSetting_From_Menu();
            SettingsUIMap.Select_LoggingTab();
            SettingsUIMap.Assert_Audits_File_Path(changedPath);
        }