From 3c41eea22f2e2a4c634dda7d0dfa0353fbfd6203 Mon Sep 17 00:00:00 2001 From: Nathan Heskew Date: Wed, 16 Mar 2011 11:28:05 -0700 Subject: [PATCH] Updating the widgets spec test to keep up with the UI changes. --HG-- branch : dev --- src/Orchard.Specs/Widgets.feature | 7 ++++--- src/Orchard.Specs/Widgets.feature.cs | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Orchard.Specs/Widgets.feature b/src/Orchard.Specs/Widgets.feature index feed9f25f..76582af2b 100644 --- a/src/Orchard.Specs/Widgets.feature +++ b/src/Orchard.Specs/Widgets.feature @@ -6,12 +6,13 @@ Scenario: I can edit a default layer Given I have installed Orchard When I go to "admin/widgets" - And I follow "Edit Default layer" - And I fill in + And I follow "Edit" + Then I should see "]*name="Name"[^>]*value="Default"[^>]*>" + When I fill in | name | value | | Description | This is the default layer. | And I hit "Save" And I am redirected Then I should see "Your Layer has been saved" - When I follow "Edit Default layer" + When I follow "Edit" Then I should see "]*>\s*This is the default layer.\s*" diff --git a/src/Orchard.Specs/Widgets.feature.cs b/src/Orchard.Specs/Widgets.feature.cs index a25672125..0c8c5bb65 100644 --- a/src/Orchard.Specs/Widgets.feature.cs +++ b/src/Orchard.Specs/Widgets.feature.cs @@ -65,7 +65,9 @@ this.ScenarioSetup(scenarioInfo); #line 8 testRunner.When("I go to \"admin/widgets\""); #line 9 - testRunner.And("I follow \"Edit Default layer\""); + testRunner.And("I follow \"Edit\""); +#line 10 + testRunner.Then("I should see \"]*name=\"Name\"[^>]*value=\"Default\"[^>]*>\""); #line hidden TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] { "name", @@ -73,17 +75,17 @@ this.ScenarioSetup(scenarioInfo); table1.AddRow(new string[] { "Description", "This is the default layer."}); -#line 10 - testRunner.And("I fill in", ((string)(null)), table1); -#line 13 - testRunner.And("I hit \"Save\""); +#line 11 + testRunner.When("I fill in", ((string)(null)), table1); #line 14 - testRunner.And("I am redirected"); + testRunner.And("I hit \"Save\""); #line 15 - testRunner.Then("I should see \"Your Layer has been saved\""); + testRunner.And("I am redirected"); #line 16 - testRunner.When("I follow \"Edit Default layer\""); + testRunner.Then("I should see \"Your Layer has been saved\""); #line 17 + testRunner.When("I follow \"Edit\""); +#line 18 testRunner.Then("I should see \"]*>\\s*This is the default layer.\\s*\""); #line hidden testRunner.CollectScenarioErrors();