// ReSharper disable once InconsistentNaming public void Create_Save_And_Edit_WebServiceSource_From_ExplorerContextMenu_UITests() { //Create Source ExplorerUIMap.Click_NewWebSource_From_ExplorerContextMenu(); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Enabled, "Web server address textbox not enabled."); Assert.IsFalse(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection button is enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AnonymousRadioButton.Enabled, "Anonymous Radio button is not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.UserRadioButton.Enabled, "User Radio button is not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.DefaultQueryTextBox.Enabled, "Default Query Textbox is not enabled"); WebSourceUIMap.Click_UserButton_On_WebServiceSourceTab(); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.UserNameTextBox.Enabled, "Username Textbox not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.PasswordTextBox.Enabled, "Password Textbox not enabled"); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab("http://RSAKLFSVRTFSBLD:9810"); WebSourceUIMap.Enter_RunAsUser_On_WebServiceSourceTab(); WebSourceUIMap.Enter_DefaultQuery_On_WebServiceSourceTab(""); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection button not enabled"); WebSourceUIMap.Click_NewWebSource_TestConnectionButton(); //Save Source UIMap.MainStudioWindow.SideMenuBar.SaveButton.WaitForControlEnabled(60000); Assert.IsTrue(UIMap.MainStudioWindow.SideMenuBar.SaveButton.Enabled, "Save Ribbon Button is not enabled after clicking new web source test button and waiting one minute (60000ms)."); UIMap.Save_With_Ribbon_Button_And_Dialog(SourceName); ExplorerUIMap.Filter_Explorer(SourceName); Assert.IsTrue(ExplorerUIMap.MainStudioWindow.DockManager.SplitPaneLeft.Explorer.ExplorerTree.localhost.FirstItem.Exists, "Source did not save in the explorer UI."); //Edit Source WebSourceUIMap.Click_Close_Web_Source_Wizard_Tab_Button(); ExplorerUIMap.Select_Source_From_ExplorerContextMenu(SourceName); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Enabled, "Web server address textbox not enabled."); WebSourceUIMap.Click_AnonymousButton_On_WebServiceSourceTab(); UIMap.Click_Save_Ribbon_Button_With_No_Save_Dialog(); WebSourceUIMap.Click_Close_Web_Source_Wizard_Tab_Button(); ExplorerUIMap.Select_Source_From_ExplorerContextMenu(SourceName); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AnonymousRadioButton.Selected); }
// ReSharper disable once InconsistentNaming public void Test_WebServiceSource_DefaulQuery_UITests() { //Create Source ExplorerUIMap.Click_NewWebSource_From_ExplorerContextMenu(); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab("https://data.gov.in"); WebSourceUIMap.Enter_DefaultQuery_On_WebServiceSourceTab("/api/datastore/resource.json?resource_id=0a076478-3fd3-4e2c-b2d2-581876f56d77&api-key=fd6eaccb00617ecf8d225d4573f8f7be"); WebSourceUIMap.Click_NewWebSource_TestConnectionButton(); //Save Source UIMap.MainStudioWindow.SideMenuBar.SaveButton.WaitForControlEnabled(60000); Assert.IsTrue(UIMap.MainStudioWindow.SideMenuBar.SaveButton.Enabled, "Save Ribbon Button is not enabled after clicking new web source test button and waiting one minute (60000ms)."); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.DefaultQueryTextBox.TestPassedImage.Exists, "Expected Test to Pass, but got different results after clicking test button."); }
public void HTTPWebDELETETool_Small_And_LargeView_UITest() { Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.Exists, "Delete Web Tool does not exist on the design surface after drag and drop from toolbox."); //Small View HTTPToolsUIMap.WebDeleteTool_ChangeView_With_DoubleClick(); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.SmallView.Exists, "Web DELETE small view does not exist after collapsing the large view with a double click."); //Large View HTTPToolsUIMap.WebDeleteTool_ChangeView_With_DoubleClick(); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.LargeView.SourcesComboBox.Exists, "Web DELETE large view sources combobox does not exist."); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.LargeView.GenerateOutputsButton.Exists, "Web DELETE large view generate inputs button does not exist."); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.LargeView.Table.Exists, "Web DELETE large view headers table generate inputs button does not exist."); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.DoneButton.Exists, "Web DELETE large view done does not exist."); //New Source Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.LargeView.NewSourceButton.Exists, "New Source Button does not exist"); HTTPToolsUIMap.Click_NewSourceButton_From_HttpWebDeleteTool(); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Enabled, "Web server address textbox not enabled."); Assert.IsFalse(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection button is enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AnonymousRadioButton.Enabled, "Anonymous Radio button is not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.UserRadioButton.Enabled, "User Radio button is not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.DefaultQueryTextBox.Enabled, "Default Query Textbox is not enabled"); WebSourceUIMap.Click_UserButton_On_WebServiceSourceTab(); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.UserNameTextBox.Enabled, "Username Textbox not enabled"); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.PasswordTextBox.Enabled, "Password Textbox not enabled"); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab("http://RSAKLFSVRTFSBLD:9810"); WebSourceUIMap.Enter_RunAsUser_On_WebServiceSourceTab(); WebSourceUIMap.Enter_DefaultQuery_On_WebServiceSourceTab(""); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.TestConnectionButton.Enabled, "Test Connection button not enabled"); WebSourceUIMap.Click_NewWebSource_TestConnectionButton(); UIMap.MainStudioWindow.SideMenuBar.SaveButton.WaitForControlEnabled(60000); Assert.IsTrue(UIMap.MainStudioWindow.SideMenuBar.SaveButton.Enabled, "Save Ribbon Button is not enabled after entering valid web source details, clicking test in web source wizard and waiting one minute (6000ms)."); UIMap.Save_With_Ribbon_Button_And_Dialog(SourceName); WebSourceUIMap.Click_Close_Web_Source_Wizard_Tab_Button(); //Edit Source HTTPToolsUIMap.WebDeleteTool_ChangeView_With_DoubleClick(); HTTPToolsUIMap.Select_Source_From_DELETEWebTool(); Assert.IsTrue(HTTPToolsUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WorkflowTab.WorkSurfaceContext.WorkflowDesignerView.DesignerView.ScrollViewerPane.ActivityTypeDesigner.WorkflowItemPresenter.Flowchart.WebDelete.LargeView.EditSourceButton.Enabled, "Edit Source Button is not enabled after selecting source."); HTTPToolsUIMap.Click_EditSourceButton_On_DELETEWebTool(); WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WaitForControlExist(60000); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Enabled, "Web server address textbox not enabled."); WebSourceUIMap.Click_AnonymousButton_On_WebServiceSourceTab(); UIMap.Click_Save_Ribbon_Button_With_No_Save_Dialog(); WebSourceUIMap.Click_Close_Web_Source_Wizard_Tab_Button(); HTTPToolsUIMap.WebDeleteTool_ChangeView_With_DoubleClick(); HTTPToolsUIMap.Click_EditSourceButton_On_DELETEWebTool(); Assert.IsTrue(WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AnonymousRadioButton.Selected); }
// ReSharper disable once InconsistentNaming public void Test_WebServiceSource_ValidateDefaultHttps_AddedOnMissingText_UITests() { const string httpsAddress = "https://data.gov.in"; const string httpAddress = "http://data.gov.in"; const string noPrefixAddress = "data.gov.in"; //Create Source ExplorerUIMap.Click_NewWebSource_From_ExplorerContextMenu(); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab(httpsAddress); Keyboard.SendKeys("\t"); Assert.AreEqual(httpsAddress, WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Text); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab(noPrefixAddress); Keyboard.SendKeys("\t"); Assert.AreEqual(httpsAddress, WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Text); WebSourceUIMap.Enter_TextIntoAddress_On_WebServiceSourceTab(httpAddress); Keyboard.SendKeys("\t"); Assert.AreEqual(httpAddress, WebSourceUIMap.MainStudioWindow.DockManager.SplitPaneMiddle.TabManSplitPane.TabMan.WebSourceTab.WorkSurfaceContext.AddressTextbox.Text); }