Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium: Add preferences response to the log for investigating bug #8122 #8405

Merged
merged 4 commits into from
Jan 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
import com.google.inject.Inject;
import java.net.URL;
import java.nio.file.Paths;
import org.eclipse.che.api.core.rest.HttpJsonRequestFactory;
import org.eclipse.che.selenium.core.client.TestProjectServiceClient;
import org.eclipse.che.selenium.core.constant.TestMenuCommandsConstants;
import org.eclipse.che.selenium.core.project.ProjectTemplates;
import org.eclipse.che.selenium.core.provider.TestApiEndpointUrlProvider;
import org.eclipse.che.selenium.core.workspace.TestWorkspace;
import org.eclipse.che.selenium.pageobject.AskForValueDialog;
import org.eclipse.che.selenium.pageobject.CodenvyEditor;
import org.eclipse.che.selenium.pageobject.Ide;
import org.eclipse.che.selenium.pageobject.Menu;
import org.eclipse.che.selenium.pageobject.ProjectExplorer;
import org.openqa.selenium.TimeoutException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

Expand All @@ -34,6 +38,8 @@
*/
public class CreateNewPackagesWithHelpCreationJavaClassTest {

private static final Logger LOG =
LoggerFactory.getLogger(CreateNewPackagesWithHelpCreationJavaClassTest.class);
private static final String PROJECT_NAME =
CreateNewPackagesWithHelpCreationJavaClassTest.class.getSimpleName();
private static final String NEW_PACKAGE_NAME1 = "tu";
Expand All @@ -48,6 +54,8 @@ public class CreateNewPackagesWithHelpCreationJavaClassTest {
@Inject private Menu menu;
@Inject private AskForValueDialog askForValueDialog;
@Inject private TestProjectServiceClient testProjectServiceClient;
@Inject private HttpJsonRequestFactory httpJsonRequestFactory;
@Inject private TestApiEndpointUrlProvider testApiEndpointUrlProvider;

@BeforeClass
public void setUp() throws Exception {
Expand Down Expand Up @@ -94,8 +102,17 @@ public void createNewPackageFromContextMenuTest() throws Exception {
try {
projectExplorer.waitItemInVisibleArea("TestClass2.java");
} catch (TimeoutException ex) {
LOG.info(getPreferences());
// remove try-catch block after issue has been resolved
fail("Known issue https://github.com/eclipse/che/issues/8122");
}
}

private String getPreferences() throws Exception {
return httpJsonRequestFactory
.fromUrl(testApiEndpointUrlProvider.get() + "preferences")
.useGetMethod()
.request()
.asString();
}
}