diff --git a/src/test/java/org/ays/feature/Logout.feature b/src/test/java/org/ays/feature/Logout.feature index dd06178..3a97e8c 100644 --- a/src/test/java/org/ays/feature/Logout.feature +++ b/src/test/java/org/ays/feature/Logout.feature @@ -7,7 +7,6 @@ Feature: Testing Logout And Click the Login button Scenario: Validating logout functionality - Given Click on the admins button When Click on the profile button And Click on the logout button Then the admin user should land on the Login page after logging out. diff --git a/src/test/java/org/ays/step_definitions/Logout.java b/src/test/java/org/ays/step_definitions/Logout.java index e1879c1..0258351 100644 --- a/src/test/java/org/ays/step_definitions/Logout.java +++ b/src/test/java/org/ays/step_definitions/Logout.java @@ -18,13 +18,12 @@ public Logout() { this.pageActions = new AysPageActions(); } - @Given("Click on the admins button") - public void clickOnTheAdminsButton() { - pageActions.clickMethod(logoutPOM.getAdminsButton()); - } + + @When("Click on the profile button") public void clickOnTheProfileButton() { + pageActions.waitUntilVisible(logoutPOM.getProfileButton()); pageActions.hoverOver(logoutPOM.getProfileButton()); }