Created
October 20, 2018 21:20
-
-
Save johnmmoss/4ac275c101e146c52d651da74a5142cb to your computer and use it in GitHub Desktop.
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
| [Binding] | |
| public class UserAdminSteps | |
| { | |
| [Given(@"I am a valid user of the site")] | |
| public void GivenIAmAValidUserOfTheSite() | |
| { | |
| } | |
| [Given(@"I have navigated to the login page")] | |
| public void GivenIHaveNavigatedToTheLoginPage() | |
| { | |
| var homePage = ScenarioContext.Current.Get<HomePage>(); | |
| var loginPage = homePage.ClickLoginLink(); | |
| ScenarioContext.Current.Set(loginPage); | |
| } | |
| [Given(@"I have entered a username of ""(.*)"" and a password of ""(.*)""")] | |
| public void GivenIHaveEnteredAUsernameOfAndAPasswordOf(string username, string password) | |
| { | |
| var loginPage = ScenarioContext.Current.Get<LoginPage>(); | |
| loginPage.EnterUsername(username); | |
| loginPage.EnterPassword(password); | |
| } | |
| [When(@"I click the create button")] | |
| public void WhenIClickTheCreateButton() | |
| { | |
| var loginPage = ScenarioContext.Current.Get<LoginPage>(); | |
| loginPage.ClickLogin(); | |
| } | |
| [Then(@"I am logged in to the site")] | |
| public void ThenIAmLoggedInToTheSite() | |
| { | |
| var homePage = ScenarioContext.Current.Get<HomePage>(); | |
| Assert.IsTrue(homePage.IsLoggedIn()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment