From df523bda9747233e6c554178e63d7907a777952b Mon Sep 17 00:00:00 2001 From: Murali Doddi Date: Wed, 11 Feb 2015 14:15:09 +0200 Subject: [PATCH] Adding Toolbox Specs --- .../Toolbox.feature | 37 ++++++ .../Toolbox.feature.cs | 106 +++++++++++++++++- 2 files changed, 141 insertions(+), 2 deletions(-) diff --git a/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature b/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature index a611ac11b18..fe4f8db4cb6 100644 --- a/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature +++ b/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature @@ -3,3 +3,40 @@ Feature: Toolbox In order to use tools As a warewolf user I want a toolbox + + +Scenario: Searching a Tool in toolbox + Given warewolf "Localhost" Toolbox is loaded + When I search for "Decision" in toolbox + Then "Controlflow\Decision" is visible + And "Controlflow\Data Merge" is not visible + And "Controlflow\Data Split" is not visible + And "Controlflow\Delete" is not visible + + +Scenario: Searching for Tools + Given warewolf "Localhost" Toolbox is loaded + When I search for "B" in toolbox + Then "Data\Base Conversion" is visible + And "Dropbox\Drop box" is visible + And "Recordset\SQL Bulk Insert" is visible + And "Recordset\Web Request" is visible + And "Utility\Format Number" is visible + +Scenario: Searching for Tool with wrong name + Given warewolf "Localhost" Toolbox is loaded + When I search for "gang" in toolbox + Then "Data\Base Conversion" is not visible + And "Dropbox\Drop box" is not visible + And "Recordset\SQL Bulk Insert" is not visible + And "Recordset\Web Request" is not visible + And "Utility\Format Number" is not visible + And all tools are not visible + + + +Scenario: Resizing Toolbox + Given warewolf "Localhost" Toolbox is loaded + When the toolbox is resized "Horizontaly" + Then the tools are refreshed + And they appear from a "left to right" diff --git a/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature.cs b/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature.cs index 474186f7b45..98cfeda0cd2 100644 --- a/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature.cs +++ b/Dev/Warewolf.AcceptanceTesting.Explorer/Toolbox.feature.cs @@ -3,7 +3,7 @@ // This code was generated by SpecFlow (http://www.specflow.org/). // SpecFlow Version:1.9.0.77 // SpecFlow Generator Version:1.9.0.0 -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -31,7 +31,7 @@ public partial class ToolboxFeature public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext) { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Toolbox", "In order to use tools\nAs a warewolf user\nI want a toolbox", ProgrammingLanguage.CSharp, new string[] { + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Toolbox", "In order to use tools\r\nAs a warewolf user\r\nI want a toolbox", ProgrammingLanguage.CSharp, new string[] { "Toolbox"}); testRunner.OnFeatureStart(featureInfo); } @@ -68,6 +68,108 @@ public virtual void ScenarioCleanup() { testRunner.CollectScenarioErrors(); } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Searching a Tool in toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("Toolbox")] + public virtual void SearchingAToolInToolbox() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Searching a Tool in toolbox", ((string[])(null))); +#line 8 +this.ScenarioSetup(scenarioInfo); +#line 9 + testRunner.Given("warewolf \"Localhost\" Toolbox is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 10 + testRunner.When("I search for \"Decision\" in toolbox", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 11 + testRunner.Then("\"Controlflow\\Decision\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 12 + testRunner.And("\"Controlflow\\Data Merge\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 13 + testRunner.And("\"Controlflow\\Data Split\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 14 + testRunner.And("\"Controlflow\\Delete\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Searching for Tools")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("Toolbox")] + public virtual void SearchingForTools() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Searching for Tools", ((string[])(null))); +#line 17 +this.ScenarioSetup(scenarioInfo); +#line 18 + testRunner.Given("warewolf \"Localhost\" Toolbox is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 19 + testRunner.When("I search for \"B\" in toolbox", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 20 + testRunner.Then("\"Data\\Base Conversion\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 21 + testRunner.And("\"Dropbox\\Drop box\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 22 + testRunner.And("\"Recordset\\SQL Bulk Insert\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 23 + testRunner.And("\"Recordset\\Web Request\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 24 + testRunner.And("\"Utility\\Format Number\" is visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Searching for Tool with wrong name")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("Toolbox")] + public virtual void SearchingForToolWithWrongName() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Searching for Tool with wrong name", ((string[])(null))); +#line 26 +this.ScenarioSetup(scenarioInfo); +#line 27 + testRunner.Given("warewolf \"Localhost\" Toolbox is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 28 + testRunner.When("I search for \"gang\" in toolbox", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 29 + testRunner.Then("\"Data\\Base Conversion\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 30 + testRunner.And("\"Dropbox\\Drop box\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 31 + testRunner.And("\"Recordset\\SQL Bulk Insert\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 32 + testRunner.And("\"Recordset\\Web Request\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 33 + testRunner.And("\"Utility\\Format Number\" is not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line 34 + testRunner.And("all tools are not visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + this.ScenarioCleanup(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("Resizing Toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "Toolbox")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategoryAttribute("Toolbox")] + public virtual void ResizingToolbox() + { + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Resizing Toolbox", ((string[])(null))); +#line 38 +this.ScenarioSetup(scenarioInfo); +#line 39 + testRunner.Given("warewolf \"Localhost\" Toolbox is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line 40 + testRunner.When("the toolbox is resized \"Horizontaly\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line 41 + testRunner.Then("the tools are refreshed", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line 42 + testRunner.And("they appear from a \"left to right\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + this.ScenarioCleanup(); + } } } #pragma warning restore