Skip to content

Commit 069f636

Browse files
committed
change step name to add contain clause
1 parent 70a24cb commit 069f636

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/java/com/browserstack/stepdefs/StackDemoSteps.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public void product_should_be_added_to_cart() {
5151
Assert.assertEquals(homePage.getSelectedProductName(), homePage.getProductCartText());
5252
}
5353

54-
@Then("the page title should be '(.+)'$")
55-
public void page_title_should_be(String expectedTitle) {
54+
@Then("the page title should contain '(.+)'$")
55+
public void page_title_should_contain(String expectedTitle) {
5656
Assert.assertTrue(driver.getTitle().contains(expectedTitle));
5757
}
5858

src/test/resources/features/localtest/Local.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Feature: Verify Local test
22

33
Scenario: Navigate to Local App page
44
Given I am on the website 'http://bs-local.com:45454/'
5-
Then the page title should be 'BrowserStack Local'
5+
Then the page title should contain 'BrowserStack Local'

0 commit comments

Comments
 (0)