diff --git a/inji-web-test/src/main/java/pages/HomePage.java b/inji-web-test/src/main/java/pages/HomePage.java index 1d62e03..15389e0 100644 --- a/inji-web-test/src/main/java/pages/HomePage.java +++ b/inji-web-test/src/main/java/pages/HomePage.java @@ -18,5 +18,7 @@ public Boolean isLogoDisplayed() { return isElementIsVisible("//img[@src='/static/media/inji-logo.3eee14d8592e46b14318.png']"); } - + public Boolean isTextWordIsDisplayed() { + return isElementIsVisible("//a[text()='Help']"); + } } diff --git a/inji-web-test/src/test/java/stepdefinitions/StepDef.java b/inji-web-test/src/test/java/stepdefinitions/StepDef.java index ed4af3e..465a6de 100644 --- a/inji-web-test/src/test/java/stepdefinitions/StepDef.java +++ b/inji-web-test/src/test/java/stepdefinitions/StepDef.java @@ -38,22 +38,18 @@ public void validateTheTitleOfThePage() { @Then("Verify that inji web logo is displayed") public void verifyInjiWebLogoIsDisplayed() throws InterruptedException { Thread.sleep(3000); - -// Boolean logoDisplayed = page.locator("//img[@src='/static/media/inji-logo.3eee14d8592e46b14318.png']") -// .isVisible(); Assert.assertEquals(homePage.isLogoDisplayed(), true); } @When("User clicks on the help button") public void clicksOnHelpButton() { homePage.clickOnHelp(); - //page.locator("//a[text()='Help']").click(); } @Then("Verify that text help is displayed on page") public void verifiyTextHelpIsDisplayedOnPage() throws InterruptedException { Thread.sleep(3000); - Assert.assertEquals(page.locator("//a[text()='Help']").isVisible(), true); + Assert.assertEquals(homePage.isTextWordIsDisplayed(), true); } } diff --git a/inji-web-test/src/test/resources/featurefiles/homepage.feature b/inji-web-test/src/test/resources/featurefiles/homepage.feature index feb4e48..1f3da6d 100644 --- a/inji-web-test/src/test/resources/featurefiles/homepage.feature +++ b/inji-web-test/src/test/resources/featurefiles/homepage.feature @@ -1,20 +1,3 @@ -#Author: mohanachandran.s@technoforte.co.in -#Keywords Summary : -#Feature: List of scenarios. -#Scenario: Business rule through list of steps with arguments. -#Given: Some precondition step -#When: Some key actions -#Then: To observe outcomes or validation -#And,But: To enumerate more Given,When,Then steps -#Scenario Outline: List of steps for data-driven as an Examples and -#Examples: Container for s table -#Background: List of steps run before each of the scenarios -#""" (Doc Strings) -#| (Data Tables) -#@ (Tags/Labels):To group Scenarios -#<> (placeholder) -#"" -## (Comments) Feature: Inji web homepage testing @smoke @verifyingHomepage