@Then("^a \"([^\"]*)\" of events is displayed$") public void a_of_events_is_displayed(String cssSelector) throws Throwable { webDriver.findElement(By.className(cssSelector)); }
@Then("^the first (\\d+) blocks from article is shown$") public void the_first_blocks_from_article_is_shown(int stories) throws Throwable { List<WebElement> s = webDriver.findElements(By.cssSelector(".story-latest .article-body .sample-paras p")); assertEquals(s.size(), stories); }
@Then("^Latest developments is displayed$") public void Latest_developments_is_displayed() throws Throwable { WebElement heading = webDriver.waitForElement(By.cssSelector(".story-latest .story-sub-head")); assertTrue(heading.getText().equals("Latest")); }
@Then("^Latest stories is displayed$") public void Latest_stories_is_displayed() throws Throwable { webDriver.waitForElement(By.id("js-latest-stories")); }
@Given("^I am on an story$") public void I_am_on_an_article() throws Throwable { webDriver.open(story); }