diff --git a/ui-tests/src/main/java/org/openmrs/reference/page/ModulesPage.java b/ui-tests/src/main/java/org/openmrs/reference/page/ModulesPage.java new file mode 100644 index 000000000..f819d6ad2 --- /dev/null +++ b/ui-tests/src/main/java/org/openmrs/reference/page/ModulesPage.java @@ -0,0 +1,17 @@ +package org.openmrs.reference.page; + + +import org.openqa.selenium.WebDriver; + +public class ModulesPage extends AbstractBasePage { + + public ModulesPage(WebDriver driver) { + super(driver); + } + + @Override + public String expectedUrlPath() { + return "/openmrs/admin/modules/module.list"; + } +} + diff --git a/ui-tests/src/test/java/org/openmrs/reference/CheckModules.java b/ui-tests/src/test/java/org/openmrs/reference/CheckModules.java new file mode 100644 index 000000000..9fc1017ec --- /dev/null +++ b/ui-tests/src/test/java/org/openmrs/reference/CheckModules.java @@ -0,0 +1,44 @@ +package org.openmrs.reference; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openmrs.reference.page.HomePage; +import org.openmrs.reference.page.LoginPage; +import org.openmrs.reference.page.ModulesPage; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +public class CheckModules extends TestBase { + private LoginPage loginPage; + private HomePage homePage; + private ModulesPage modulesPage; + + @Before + public void setUp() { + loginPage = new LoginPage(driver); + homePage = new HomePage(driver); + modulesPage = new ModulesPage(driver); + } + + @Test + public void checkModules() throws Exception { + assertPage(loginPage); + loginPage.loginAsAdmin(); + assertPage(homePage); + homePage.gotoPage("/admin/modules/module.list"); + assertPage(modulesPage); + // Get the modulesListing