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

Fixup for testing Organize imports operation #10446

Merged
merged 1 commit into from Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -37,16 +37,11 @@
public class OrganizeImportsTest {
private static final String PROJECT_NAME =
NameGenerator.generate(OrganizeImportsTest.class.getSimpleName(), 4);
private static final String SOURCE_FOLDER = "src/main/java";
private static final String PATH_TO_CLASS_IN_SPRING_PACKAGE =
PROJECT_NAME + "/src/main/java/org/eclipse/qa/examples/" + "AppController.java";
private static final String TEST_FILE_NAME = "TestClass.java";
private static final String PATH_TO_A_PACKAGE = PROJECT_NAME + "/src/main/java/a";
private static final String PATH_TO_CLASS_IN_A_PACKAGE =
PROJECT_NAME + "/src/main/java/a/TestClass.java";
private static final String PATH_TO_B_PACKAGE = PROJECT_NAME + "/src/main/java/b";
private static final String PATH_TO_CLASS_IN_B_PACKAGE =
PROJECT_NAME + "/src/main/java/b/TestClass.java";
private static final String NAME_OF_A_PACKAGE = "a.TestClass";
private static final String NAME_OF_B_PACKAGE = "b.TestClass";
private static final String NAME_OF_LIST_PACKAGE = "java.util.List";
Expand Down Expand Up @@ -102,7 +97,6 @@ public void organizeImportsTest() throws Exception {
TestMenuCommandsConstants.Assistant.ASSISTANT,
TestMenuCommandsConstants.Assistant.ORGANIZE_IMPORTS);
loader.waitOnClosed();
editor.waitAllMarkersInvisibility(ERROR);
Assert.assertTrue(
editor.checkWhatTextLinePresentOnce(
"import org.springframework.web.servlet.ModelAndView;"));
Expand All @@ -111,6 +105,7 @@ public void organizeImportsTest() throws Exception {
editor.typeTextIntoEditorWithoutDelayForSaving(
"import org.springframework.web.servlet.ModelAndView;");
loader.waitOnClosed();
editor.waitAllMarkersInvisibility(ERROR);
editor.goToCursorPositionVisible(20, 8);
editor.launchPropositionAssistPanel();
editor.enterTextIntoFixErrorPropByEnter("Organize imports");
Expand Down Expand Up @@ -151,12 +146,8 @@ public void organizeImportsTest() throws Exception {
organizeImports.selectImport(NAME_OF_B_PACKAGE);
organizeImports.clickOnNextButton();
organizeImports.clickOnFinishButton();
editor.waitAllMarkersInvisibility(ERROR);
loader.waitOnClosed();

projectExplorer.waitItem(PATH_TO_CLASS_IN_SPRING_PACKAGE);
projectExplorer.openItemByPath(PATH_TO_CLASS_IN_SPRING_PACKAGE);
loader.waitOnClosed();
editor.waitAllMarkersInvisibility(ERROR);

Assert.assertTrue(editor.checkWhatTextLinePresentOnce("import b.TestClass;"));
Assert.assertTrue(editor.checkWhatTextLinePresentOnce("import java.util.ArrayList;"));
Expand Down
Expand Up @@ -20,8 +20,8 @@
<version>1.0-SNAPSHOT</version>
<name>qa-spring-sample</name>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
Expand Down