Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/test/java/com/browserstack/local/pages/LocalPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import org.openqa.selenium.WebElement;

public class LocalPage {
private String DEFAULT_LOCAL_URL = "http://bs-local.com:45691/check";
private String DEFAULT_LOCAL_URL = "http://bs-local.com:45454/";
private WebDriver driver;
private WebElement element;

public LocalPage(WebDriver driver) {
this.driver = driver;
}

public String getPageSource(){
return driver.getPageSource();
public String getPageTitle(){
return driver.getTitle();
}

public void openHealthCheck() {
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/browserstack/local/steps/LocalSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public void openHealthCheck() {
page.openHealthCheck();
}

@Then("I should see \"$keyword\"")
public void pageShouldContain(String keyword) {
Assert.assertTrue(page.getPageSource().contains(keyword));
@Then("the title should contain \"$keyword\"")
public void pageTitleShouldContain(String keyword) {
Assert.assertTrue(page.getPageTitle().contains(keyword));
}
}
2 changes: 1 addition & 1 deletion src/test/resources/stories/local.story
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Scenario: Can check tunnel working

When I open health check
Then I should see "Up and running"
Then the title should contain "BrowserStack Local"