<commit_before>/**
 * Created with IntelliJ IDEA.
 * User: jhasmanyquiroz
 * Date: 11/10/15
 * Time: 11:00 AM
 * To change this template use File | Settings | File Templates.
 */
package steps;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import ui.PageTransporter;

public class LoginSteps {
    public PageTransporter page = PageTransporter.getInstance();

    @Given("^I navigate to Login page$")
    public void navigateLoginPage(){
        page.navigateToMainPage();
    }

    @When("^I login as \"(.*?)\" with password \"(.*?)\"$")
    public void loginAs(String userName, String userPassword){
        page.navigateToLoginPage();
    }

    @Then("^I should login successfully$")
    public void should_login_successfully(){
    }
}<commit_msg>Implement the methods for the asserts<commit_after>/**
 * Created with IntelliJ IDEA.
 * User: jhasmanyquiroz
 * Date: 11/10/15
 * Time: 11:00 AM
 * To change this template use File | Settings | File Templates.
 */
package steps;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import ui.PageTransporter;
import ui.pages.HomePage;
import ui.pages.LoginPage;
import ui.pages.MainPage;

import static org.testng.Assert.assertTrue;

public class LoginSteps {
    private static PageTransporter page = PageTransporter.getInstance();
    private HomePage homePage;
    private LoginPage loginPage;
    private MainPage mainPage;

    @Given("^I navigate to Login page$")
    public void navigateLoginPage(){
        mainPage = page.navigateToMainPage();
        loginPage = mainPage.clickLogInButton();
        //loginPage = page.navigateToLoginPage();
    }

    @When("^I login as \"(.*?)\" with password \"(.*?)\"$")
    public void loginAs(String userName, String userPassword){
        homePage = loginPage.loginSuccessful(userName, userPassword);
    }

    @Then("^I should login successfully.$")
    public void shouldLoginSuccessfully(){
        assertTrue(homePage.isPartnersDisplayed(), "User Name displayed");
    }
}
{'fraction_non_alphanumeric': 0.12290769966523195, 'fraction_numerical': 0.009564801530368245, 'mean_word_length': 3.7117117117117115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5546181', 'n_tokens_mistral': 662, 'n_tokens_neox': 632, 'n_words': 167}