Search in sources :

Example 1 with WebBrowserView

use of org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView in project linuxtools by eclipse.

the class ExposePortTest method assertPortIsAccessible.

private void assertPortIsAccessible(String exposedPort) {
    WebBrowserView browserView = new WebBrowserView();
    browserView.open();
    String url = createURL(":" + exposedPort);
    if (!mockitoIsUsed()) {
        BrowserContentsCheck.checkBrowserForErrorPage(browserView, url);
    }
}
Also used : WebBrowserView(org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView)

Example 2 with WebBrowserView

use of org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView in project linuxtools by eclipse.

the class VolumeMountTest method getIndexPageContent.

private String getIndexPageContent() throws IOException {
    String containerIP = getContainerIP(CONTAINER_NAME);
    String url = "http://" + containerIP + ":" + HOST_PORT + "/" + INDEX_PAGE;
    WebBrowserView browserView = new WebBrowserView();
    browserView.open();
    if (mockitoIsUsed()) {
        browserView = MockUtils.getBrowserView(INDEX_PAGE_PATH, getResourceAsString(INDEX_PAGE_PATH));
    }
    browserView.openPageURL(url);
    return browserView.getText();
}
Also used : WebBrowserView(org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView)

Example 3 with WebBrowserView

use of org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView in project linuxtools by eclipse.

the class ComposeTest method testCompose.

@Test
public void testCompose() {
    // Set up Docker Compose location
    PreferenceDialog dialog = new WorkbenchPreferenceDialog();
    DockerComposePreferencePage composePreference = new DockerComposePreferencePage(dialog);
    dialog.open();
    dialog.select(composePreference);
    composePreference.setPathToDockerCompose(this.dockerComposePath);
    composePreference.apply();
    new PushButton("Apply and Close").click();
    // Build Image
    DockerImagesTab imagesTab = openDockerImagesTab();
    buildImage(IMAGE_NAME, PATH_TEST_COMPOSE, imagesTab);
    assertConsoleSuccess();
    // Import resource folder
    importProject(PATH_TEST_COMPOSE);
    // Run Docker Compose
    runDockerCompose(PROJECT_TEST_COMPOSE, FILE_DOCKER_COMPOSE);
    // Check if application is running
    WebBrowserView browserView = new WebBrowserView();
    browserView.open();
    // Skip browser contents check, if mockito is used
    if (!mockitoIsUsed()) {
        browserView.openPageURL(URL);
        BrowserContentsCheck.checkBrowserForErrorPage(browserView, URL);
    }
}
Also used : WebBrowserView(org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView) PreferenceDialog(org.eclipse.reddeer.jface.preference.PreferenceDialog) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) WorkbenchPreferenceDialog(org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog) DockerImagesTab(org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab) PushButton(org.eclipse.reddeer.swt.impl.button.PushButton) DockerComposePreferencePage(org.eclipse.linuxtools.docker.reddeer.preferences.DockerComposePreferencePage) AbstractImageBotTest(org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest) Test(org.junit.Test)

Aggregations

WebBrowserView (org.eclipse.reddeer.eclipse.ui.browser.WebBrowserView)3 AbstractImageBotTest (org.eclipse.linuxtools.docker.integration.tests.image.AbstractImageBotTest)1 DockerComposePreferencePage (org.eclipse.linuxtools.docker.reddeer.preferences.DockerComposePreferencePage)1 DockerImagesTab (org.eclipse.linuxtools.docker.reddeer.ui.DockerImagesTab)1 PreferenceDialog (org.eclipse.reddeer.jface.preference.PreferenceDialog)1 PushButton (org.eclipse.reddeer.swt.impl.button.PushButton)1 WorkbenchPreferenceDialog (org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog)1 Test (org.junit.Test)1