use of org.mifos.server.WARServerLauncher in project head by mifos.
the class MifosPackagedWARBasicTest method mifosLauncher.
// TODO When acceptanceTest is WebDriver instead of Selenium-based, and uses
// server-jetty instead of Cargo for start-up, this test can go into
// acceptanceTest (and the entire war-test module would no longer needed -
// be the same thing?)
private static WARServerLauncher mifosLauncher(int port) {
// maven-dependency-plugin (see pom.xml) copied it:
File warFile = new File("target/dependency/mifos.war");
assertTrue(warFile.toString() + " doesn't exist?!", warFile.exists());
return new WARServerLauncher(port, "mifos", warFile);
}
use of org.mifos.server.WARServerLauncher in project head by mifos.
the class MifosPackagedWARBasicTest method testPackagedWARStartup.
@Test
public void testPackagedWARStartup() throws Exception {
WARServerLauncher serverLauncher = mifosLauncher(7077);
serverLauncher.startServer();
WebDriver wd = new FirefoxDriver();
wd.get("http://localhost:7077/mifos/");
wd.findElement(By.id("login.input.username")).sendKeys("mifos");
wd.findElement(By.id("login.input.password")).sendKeys("testmifos");
wd.findElement(By.id("login.button.login")).click();
Assert.assertTrue(wd.getPageSource().contains("Mifos"));
Assert.assertTrue(wd.getPageSource().contains("Home"));
Assert.assertTrue(wd.getPageSource().contains("Search"));
wd.quit();
serverLauncher.stopServer();
serverLauncher = null;
}
use of org.mifos.server.WARServerLauncher in project head by mifos.
the class MifosPackagedWARBasicTest method main.
public static void main(String[] args) throws Exception {
final int port = Integer.parseInt(args[0]);
WARServerLauncher serverLauncher = mifosLauncher(port);
serverLauncher.startServer();
}
Aggregations