/**
 * 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(){
    }
}
@@ -302,16 +302,140 @@
 sporter;
+%0Aimport ui.pages.HomePage;%0Aimport ui.pages.LoginPage;%0Aimport ui.pages.MainPage;%0A%0Aimport static org.testng.Assert.assertTrue;
 %0A%0Apublic
@@ -459,19 +459,27 @@
  %7B%0A    p
-ubl
+rivate stat
 ic PageT
@@ -526,16 +526,111 @@
 tance();
+%0A    private HomePage homePage;%0A    private LoginPage loginPage;%0A    private MainPage mainPage;
 %0A%0A    @G
@@ -700,32 +700,43 @@
 nPage()%7B%0A       
+ mainPage =
  page.navigateTo
@@ -739,32 +739,131 @@
 teToMainPage();%0A
+        loginPage = mainPage.clickLogInButton();%0A        //loginPage = page.navigateToLoginPage();%0A
     %7D%0A%0A    @When
@@ -988,33 +988,67 @@
     
-page.navigateToLoginPage(
+homePage = loginPage.loginSuccessful(userName, userPassword
 );%0A 
@@ -1092,16 +1092,17 @@
 essfully
+.
 $%22)%0A    
@@ -1123,16 +1123,14 @@
 ould
-_l
+L
 ogin
-_s
+S
 ucce
@@ -1136,19 +1136,94 @@
 essfully()%7B%0A
+        assertTrue(homePage.isPartnersDisplayed(), %22User Name displayed%22);%0A
     %7D%0A%7D

Implement the methods for the asserts