Created
February 16, 2013 04:27
-
-
Save telagraphic/4965543 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
package com.gfs.corp.bid.cucumber.codebidspage; | |
import static org.junit.Assert.assertEquals; | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.openqa.selenium.internal.seleniumemulation.WaitForPageToLoad; | |
import com.gfs.corp.bid.cucumber.pageobjects.CodeBidsPage; | |
import com.gfs.corp.bid.cucumber.pageobjects.PageFooterPartial; | |
import com.gfs.corp.bid.cucumber.pageobjects.PageHeaderPartial; | |
import com.gfs.corp.bid.cucumber.pageobjects.ViewBidsPage; | |
import cucumber.api.java.Before; | |
import cucumber.api.java.en.Given; | |
import cucumber.api.java.en.Then; | |
import cucumber.api.java.en.When; | |
import cucumber.runtime.PendingException; | |
/** | |
* Feature: Code Bid page has standard page header and footer | |
* https://jira.gfs.com/jira/browse/SBA-2880 | |
**/ | |
public class StandardHeaderAndFooterStepDefs { | |
private ViewBidsPage viewBidsPage; | |
private PageHeaderPartial pageHeaderPartial; | |
private PageFooterPartial pageFooterPartial; | |
@Before | |
public void before_examples() throws Exception { | |
viewBidsPage = new ViewBidsPage(); | |
pageHeaderPartial = new PageHeaderPartial(viewBidsPage.webDriver()); // current approach | |
pageFooterPartial = new PageFooterPartial(viewBidsPage.webDriver()); | |
} | |
@Given("^I'm \"([^\"]*)\" user and any \"([^\"]*)\"$") | |
public void I_m_user_and_any(String arg1, String arg2) throws Throwable { | |
viewBidsPage.open(); | |
} | |
@When("^I click on the \"([^\"]*)\" bid milestone tab$") | |
public void I_click_on_the_bid_milestone_tab(String milestoneTab) throws Throwable { | |
viewBidsPage.waitForPageToLoad(); | |
viewBidsPage.clickOnMilestoneTab(milestoneTab); | |
} | |
@Then("^I should see the standard header and footer$") | |
public void I_should_see_the_standard_header_and_footer() throws Throwable { | |
assertEquals("Strategic Bid Application", pageHeaderPartial.getHeaderTitle().getText()); | |
assertEquals("View Bids - Code", pageHeaderPartial.getCurrentPageTitle().getText()); | |
assertEquals(true, pageFooterPartial.getFooterDate()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment