Created
October 16, 2012 09:34
-
-
Save wayne-o/3898319 to your computer and use it in GitHub Desktop.
ManageProductCategoriesSteps.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Coypu; | |
using TechTalk.SpecFlow; | |
namespace BrightonSausageCoEcommsBehaviors.Specs | |
{ | |
[Binding] | |
public class ManageProductCategoriesSteps | |
{ | |
public BrowserSession BrowserSession | |
{ | |
get | |
{ | |
if (FeatureContext.Current.ContainsKey("BrowserSession")) | |
{ | |
return (BrowserSession)FeatureContext.Current["BrowserSession"]; | |
} | |
var sessionConfiguration = new SessionConfiguration | |
{ | |
Timeout = TimeSpan.FromMilliseconds(1000) | |
}; | |
var browserSession = new BrowserSession(sessionConfiguration); | |
FeatureContext.Current.Add("BrowserSession", browserSession); | |
return browserSession; | |
} | |
} | |
[Given(@"I am an admin user and I have logged in")] | |
public void GivenIAmAnAdminUserAndIHaveLoggedIn() | |
{ | |
//todo: come back to this | |
} | |
[Given(@"I have navigated to the manage categories screen")] | |
public void GivenIHaveNavigatedToTheManageCategoriesScreen() | |
{ | |
BrowserSession.Visit("http://localhost:4334/admin/categories"); | |
} | |
[Given(@"I click the ""(.*)"" button")] | |
public void GivenIClickTheButton(string p0) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[Given(@"I enter ""(.*)"" into the ""(.*)"" textbox")] | |
public void GivenIEnterIntoTheTextbox(string p0, string p1) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[Given(@"I ensure the ""(.*)"" checkbox is ""(.*)""")] | |
public void GivenIEnsureTheCheckboxIs(string p0, string p1) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[When(@"I click the ""(.*)"" button")] | |
public void WhenIClickTheButton(string p0) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[Then(@"I should see ""(.*)"" show up in the list of existing categories")] | |
public void ThenIShouldSeeShowUpInTheListOfExistingCategories(string p0) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[Then(@"it should be enabled")] | |
public void ThenItShouldBeEnabled() | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
[Then(@"the number of products associated should be (.*)")] | |
public void ThenTheNumberOfProductsAssociatedShouldBe(int p0) | |
{ | |
ScenarioContext.Current.Pending(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment