Skip to content

Commit

Permalink
fix: waits for FlatWelcomeFrame and selectOpenedFileTest stabilizing …
Browse files Browse the repository at this point in the history
…the test

Signed-off-by: Martin Szuc <[email protected]>
  • Loading branch information
martinszuc committed Feb 8, 2024
1 parent bf35e57 commit b3e41bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public static NewProjectDialogWizard openNewProjectDialogFromWelcomeDialog(Remot
public static void closeProject(RemoteRobot remoteRobot) {
MainIdeWindow mainIdeWindow = remoteRobot.find(MainIdeWindow.class, Duration.ofSeconds(10));
mainIdeWindow.closeProject();
remoteRobot.find(FlatWelcomeFrame.class, Duration.ofSeconds(10));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.redhat.devtools.intellij.commonuitest.fixtures.mainidewindow.toolwindowspane.ToolWindowsPane;
import com.redhat.devtools.intellij.commonuitest.utils.constants.XPathDefinitions;
import com.redhat.devtools.intellij.commonuitest.utils.project.CreateCloseUtils;
import com.redhat.devtools.intellij.commonuitest.utils.steps.SharedSteps;
import com.redhat.devtools.intellij.commonuitest.utils.texttranformation.TextUtils;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
Expand Down Expand Up @@ -118,8 +119,10 @@ public void openViewsPopupTest() {
public void selectOpenedFileTest() {
projectExplorer.openFile(PROJECT_NAME, PROJECT_NAME + ".iml");
projectExplorer.projectViewTree().clickRow(0);
SharedSteps.waitForComponentByXpath(remoteRobot,3,1, byXpath(XPathDefinitions.MY_ICON_LOCATE_SVG));
projectExplorer.selectOpenedFile();
assertTrue(projectExplorer.projectViewTree().isPathSelected(projectExplorer.projectViewTree().getValueAtRow(0), PROJECT_NAME + ".iml"), "The file 'modules.xml' should be selected but is not.");
SharedSteps.waitForComponentByXpath(remoteRobot,3,1, byXpath(XPathDefinitions.MY_ICON_LOCATE_SVG));
assertTrue(projectExplorer.projectViewTree().isPathSelected(projectExplorer.projectViewTree().getValueAtRow(0), PROJECT_NAME + ".iml"), "The file '" + PROJECT_NAME + ".xml' should be selected but is not.");
}

@Test
Expand Down

0 comments on commit b3e41bd

Please sign in to comment.