Created
October 16, 2012 12:33
-
-
Save wayne-o/3898993 to your computer and use it in GitHub Desktop.
This file contains 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
[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) | |
{ | |
BrowserSession.ClickLink("Register"); | |
} | |
[Given(@"I enter ""(.*)"" into the ""(.*)"" textbox")] | |
public void GivenIEnterIntoTheTextbox(string p0, string p1) | |
{ | |
BrowserSession.FillIn(p1).With(p0); | |
} | |
[Given(@"I ensure the ""(.*)"" checkbox is ""(.*)""")] | |
public void GivenIEnsureTheCheckboxIs(string p0, bool p1) | |
{ | |
if (p1) | |
{ | |
BrowserSession.Check(p0); | |
} | |
else | |
{ | |
BrowserSession.Uncheck(p0); | |
} | |
} | |
[When(@"I click the ""(.*)"" button")] | |
public void WhenIClickTheButton(string p0) | |
{ | |
BrowserSession.ClickButton(p0); | |
} | |
[Then(@"I should see ""(.*)"" show up in the list of existing categories")] | |
public void ThenIShouldSeeShowUpInTheListOfExistingCategories(string p0) | |
{ | |
BrowserSession.FindSection(p0).Exists().Should().BeTrue(); | |
} | |
[Then(@"it should be enabled")] | |
public void ThenItShouldBeEnabled() | |
{ | |
BrowserSession.FindXPath("//tr[@class='category']/td[@class='activated']"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment