public void Try_Create_Server_Source_On_Restricted_Server() { try { _containerOps = TestLauncher.StartLocalCIRemoteContainer(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestResults")); ExplorerUIMap.ConnectToRestrictedRemoteServer(); UIMap.WaitForControlVisible(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.FirstRemoteServer.FirstItem); UIMap.Click_Settings_RibbonButton(); SettingsUIMap.AddNewServerPermissionsUser(); ExplorerUIMap.Click_NewServerButton_From_ExplorerConnectControl(); ServerSourceUIMap.Select_http_From_Server_Source_Wizard_Address_Protocol_Dropdown(); ServerSourceUIMap.Enter_TextIntoAddress_On_ServerSourceTab("localhost"); ServerSourceUIMap.Select_Server_Authentication_Public(); Assert.IsTrue(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab.WorkSurfaceContext.NewServerSource.TestConnectionButton.Enabled, "Test Connection button not enabled"); ServerSourceUIMap.Click_Server_Source_Wizard_Test_Connection_Button(); Assert.IsFalse(UIMap.MainStudioWindow.SideMenuBar.SaveButton.Enabled, "Can create new server source on server without permission to do so."); } finally { Keyboard.SendKeys(UIMap.MainStudioWindow, "^%{F4}"); _containerOps?.Dispose(); } }
public void ClickingSave_ThenPressEnter_SavesServerResource_AndClosesSaveDialog() { ExplorerUIMap.Select_NewServerSource_From_ExplorerContextMenu(); ServerSourceUIMap.Select_http_From_Server_Source_Wizard_Address_Protocol_Dropdown(); ServerSourceUIMap.Enter_TextIntoAddress_On_ServerSourceTab("tst-ci-remote"); ServerSourceUIMap.Select_Server_Authentication_Public(); Assert.IsTrue(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab.WorkSurfaceContext.NewServerSource.TestConnectionButton.Enabled, "Test Connection button not enabled"); ServerSourceUIMap.Click_Server_Source_Wizard_Test_Connection_Button_For_Valid_Server_Source(); Mouse.Click(UIMap.MainStudioWindow.SideMenuBar.SaveButton); DialogsUIMap.Enter_Valid_Service_Name_Into_Save_Dialog("ClickSaveEnterSavesServerResource"); WorkflowTabUIMap.Enter_Using_Shortcut(); Point point; DialogsUIMap.SaveDialogWindow.WaitForControlCondition(control => !control.TryGetClickablePoint(out point), 60000); Assert.IsFalse(DialogsUIMap.SaveDialogWindow.Exists); }
public void Try_Create_Server_Source_On_Restricted_Server() { var ServerSourceName = "Try_Create_Server_Source_On_Restricted_Server"; var ServerSourceDefinitionXml = @"\\tst-ci-remote.dev2.local\c$\ProgramData\Warewolf\Resources\" + ServerSourceName + ".xml"; var ServerSourceDefinitionBite = @"\\tst-ci-remote.dev2.local\c$\ProgramData\Warewolf\Resources\" + ServerSourceName + ".bite"; try { ExplorerUIMap.ConnectToRestrictedRemoteServer(); UIMap.WaitForControlVisible(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.FirstRemoteServer.FirstItem); if (File.Exists(ServerSourceDefinitionXml)) { File.Delete(ServerSourceDefinitionXml); ExplorerUIMap.Click_Explorer_Refresh_Button(); } if (File.Exists(ServerSourceDefinitionBite)) { File.Delete(ServerSourceDefinitionBite); ExplorerUIMap.Click_Explorer_Refresh_Button(); } ExplorerUIMap.Click_NewServerButton_From_ExplorerConnectControl(); ServerSourceUIMap.Select_http_From_Server_Source_Wizard_Address_Protocol_Dropdown(); ServerSourceUIMap.Enter_TextIntoAddress_On_ServerSourceTab("localhost"); ServerSourceUIMap.Select_Server_Authentication_Public(); Assert.IsTrue(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab.WorkSurfaceContext.NewServerSource.TestConnectionButton.Enabled, "Test Connection button not enabled"); ServerSourceUIMap.Click_Server_Source_Wizard_Test_Connection_Button_For_Valid_Server_Source(); UIMap.Save_With_Ribbon_Button_And_Dialog(ServerSourceName); } finally { if (File.Exists(ServerSourceDefinitionXml)) { File.Delete(ServerSourceDefinitionXml); Assert.Fail("Created new server source on server without permission to do so."); } else if (File.Exists(ServerSourceDefinitionBite)) { File.Delete(ServerSourceDefinitionBite); Assert.Fail("Created new server source on server without permission to do so."); } Keyboard.SendKeys(UIMap.MainStudioWindow, "^%{F4}"); } }
public void Try_Create_Server_Source_On_Restricted_Server() { try { UIMap.Click_Settings_RibbonButton(); SettingsUIMap.AddNewServerPermissionsUser(); ExplorerUIMap.Click_NewServerButton_From_ExplorerConnectControl(); ServerSourceUIMap.Select_http_From_Server_Source_Wizard_Address_Protocol_Dropdown(); ServerSourceUIMap.Enter_TextIntoAddress_On_ServerSourceTab("localhost"); ServerSourceUIMap.Select_Server_Authentication_Public(); Assert.IsTrue(ServerSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.ServerSourceTab.WorkSurfaceContext.NewServerSource.TestConnectionButton.Enabled, "Test Connection button not enabled"); ServerSourceUIMap.Click_Server_Source_Wizard_Test_Connection_Button(); Assert.IsFalse(UIMap.MainStudioWindow.SideMenuBar.SaveButton.Enabled, "Can create new server source on server without permission to do so."); } finally { Keyboard.SendKeys(UIMap.MainStudioWindow, "^%{F4}"); } }