package steps;

import cucumber.api.java.en.And;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.testng.Assert;
import ui.PageTransporter;
import ui.pages.tablet.LoginTablePage;
import ui.pages.tablet.MainTablePage;
import ui.pages.tablet.ScheduleTabletPage;

/**
 * Created with IntelliJ IDEA.
 * User: BrayanRosas
 * Date: 12/12/15
 * Time: 1:16 PM
 * To change this template use File | Settings | File Templates.
 */
public class TableSteps {
    LoginTablePage loginTablePage;
    MainTablePage mainTablePage;
    ScheduleTabletPage scheduleTabletPage;


    @When("^I navigate to Tablet page$")
    public void navigateToTabletPage(){
        loginTablePage=PageTransporter.getInstance().navigateToLoginTablePage();
        loginTablePage.sigInToTable("https://172.20.208.216:4040","BrayanRosas","Client123");
    }

    @And("^I select the \"([^\\\"]*)\" Conference Room$")
    public void selectConferenceRoom(String conferenceRoomName){
        mainTablePage=loginTablePage.selectSomeConferenceRooms(conferenceRoomName);
    }

    @Then("^the Resource \"([^\\\"]*)\" should not be displayed in the Resource Tablet list$")
    public void isResourceTabletRoomList(String resourceCustomName){
         boolean actual=mainTablePage.isResourceInRoomOfTablet(resourceCustomName);
         boolean expected=false;
         Assert.assertEquals(actual,expected);
    }

    @Given("^I navigate to Schedule page$")
    public void navigateToSchedulePage(){
        scheduleTabletPage=mainTablePage.clickScheduleButton();




    }




}

@@ -141,24 +141,61 @@
 va.en.When;%0A
+import framework.CredentialsManager;%0A
 import org.t
@@ -208,16 +208,16 @@
 Assert;%0A
-
 import u
@@ -857,64 +857,385 @@
 ble(
-%22https://172.20.208.216:4040%22,%22BrayanRosas%22,%22Client123%22)
+%0A                CredentialsManager%0A                        .getInstance()%0A                        .getRoomManagerService(),%0A                CredentialsManager%0A                        .getInstance()%0A                        .getTabletUserName(),%0A                CredentialsManager%0A                        .getInstance()%0A                        .getTabletUserPassword())%0A        
 ;%0A  
@@ -1942,20 +1942,11 @@
 ();%0A
-%0A%0A%0A%0A
     %7D%0A
-%0A%0A%0A%0A%7D%0A
+%7D

Read the parameters from Credential Manager file