Search in sources :

Example 1 with GitblitRunnable

use of de.akquinet.devops.GitblitRunnable in project gitblit by gitblit.

the class AbstractUITest method setUpClass.

/**
	 * starts a gitblit server instance in a separate thread before test cases
	 * of concrete, non-abstract child-classes are executed
	 */
@BeforeClass
public static void setUpClass() {
    Runnable gitblitRunnable = new GitblitRunnable(HTTP_PORT, HTTPS_PORT, SHUTDOWN_PORT, GITBLIT_PROPERTIES_PATH, USERS_PROPERTIES_PATH);
    serverThread = new Thread(gitblitRunnable);
    serverThread.start();
    FirefoxProfile firefoxProfile = new FirefoxProfile();
    firefoxProfile.setPreference("startup.homepage_welcome_url", "https://www.google.de");
    firefoxProfile.setPreference("browser.download.folderList", 2);
    firefoxProfile.setPreference("browser.download.manager.showWhenStarting", false);
    String downloadDir = System.getProperty("java.io.tmpdir");
    firefoxProfile.setPreference("browser.download.dir", downloadDir);
    firefoxProfile.setPreference("browser.helperApps.neverAsk.saveToDisk", "text/csv,text/plain,application/zip,application/pdf");
    firefoxProfile.setPreference("browser.helperApps.alwaysAsk.force", false);
    System.out.println("Saving all attachments to: " + downloadDir);
    driver = new FirefoxDriver(firefoxProfile);
}
Also used : FirefoxDriver(org.openqa.selenium.firefox.FirefoxDriver) GitblitRunnable(de.akquinet.devops.GitblitRunnable) FirefoxProfile(org.openqa.selenium.firefox.FirefoxProfile) GitblitRunnable(de.akquinet.devops.GitblitRunnable) BeforeClass(org.junit.BeforeClass)

Aggregations

GitblitRunnable (de.akquinet.devops.GitblitRunnable)1 BeforeClass (org.junit.BeforeClass)1 FirefoxDriver (org.openqa.selenium.firefox.FirefoxDriver)1 FirefoxProfile (org.openqa.selenium.firefox.FirefoxProfile)1