Skip to content

Commit

Permalink
Framework setup for UI automation of Inji Web
Browse files Browse the repository at this point in the history
Signed-off-by: Mohanachandran S <[email protected]>
  • Loading branch information
mohanachandran-s committed May 3, 2024
1 parent 4b2ca13 commit e4ea2a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
4 changes: 3 additions & 1 deletion inji-web-test/src/main/java/pages/HomePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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']");
}
}
6 changes: 1 addition & 5 deletions inji-web-test/src/test/java/stepdefinitions/StepDef.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
17 changes: 0 additions & 17 deletions inji-web-test/src/test/resources/featurefiles/homepage.feature
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
#Author: [email protected]
#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 <placeholder>
#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
Expand Down

0 comments on commit e4ea2a5

Please sign in to comment.