Skip to content

Open folder in terminal#10422

Merged
vparfonov merged 10 commits intomasterfrom
goto-terminal
Jul 18, 2018
Merged

Open folder in terminal#10422
vparfonov merged 10 commits intomasterfrom
goto-terminal

Conversation

@vparfonov
Copy link
Copy Markdown
Contributor

What does this PR do?

Provide ability to open selected folder in the terminal

What issues does this PR fix or reference?

#10356

Release Notes

Docs PR

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/enhancement A feature request - must adhere to the feature request template. labels Jul 15, 2018
@vparfonov vparfonov changed the title Goto terminal Open folder in terminal Jul 15, 2018
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>

/**
* Action to open new terminal and navigate to selected directory.
*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please give some more tech details in the comment.
It will open the terminal window with "cd .." command?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -92,7 +92,7 @@ public TerminalPresenter(
* Connects to special WebSocket which allows get information from terminal on server side. The
* terminal is initialized only when the method is called the first time.
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some information about "options" parameter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}
}-*/;

public final native TerminalOptionsJso withFocusOnOpen(boolean focusOnOpen) /*-{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return this;
}-*/;

public final native TerminalOptionsJso withCommand(String command) /*-{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc please

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

private static final String PATH_TO_EXPAND = "/src/main/java";
private static final String FILE = "/README.md";

@SuppressWarnings("unused")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can omit the"@SuppressWarnings("unused")"

projectExplorer.waitContextMenu();
projectExplorer.clickOnItemInContextMenu(OPEN_IN_TERMINAL);
terminal.waitNumberTerminalTab(2);
String terminalWorkDir = terminal.getVisibleTextFromTerminal();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replace the next rows:

String terminalWorkDir = terminal.getVisibleTextFromTerminal();
Assert.assertTrue(terminalWorkDir.trim().endsWith(PROJECT_NAME + "$"));

with:

terminal.waitExpectedTextIntoTerminal(PROJECT_NAME + "$");

@vkuznyetsov vkuznyetsov mentioned this pull request Jul 17, 2018
39 tasks
projectExplorer.clickOnItemInContextMenu(OPEN_IN_TERMINAL);
terminal.waitNumberTerminalTab(2);
String terminalWorkDir = terminal.getVisibleTextFromTerminal();
Assert.assertTrue(terminalWorkDir.trim().endsWith(PROJECT_NAME + PATH_TO_EXPAND + "$"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

projectExplorer.clickOnItemInContextMenu(OPEN_IN_TERMINAL);
terminal.waitNumberTerminalTab(3);
terminalWorkDir = terminal.getVisibleTextFromTerminal();
Assert.assertTrue(terminalWorkDir.trim().endsWith(PROJECT_NAME + "$"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seleniumWebDriverHelper.sendKeys(Keys.chord(ALT, SHIFT, F12));
terminal.waitNumberTerminalTab(2);
String terminalWorkDir = terminal.getVisibleTextFromTerminal();
Assert.assertTrue(terminalWorkDir.trim().endsWith(PROJECT_NAME + "$"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
Signed-off-by: Vitalii Parfonov <vparfonov@redhat.com>
@vparfonov
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10422
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@artaleks9
Copy link
Copy Markdown
Contributor

artaleks9 commented Jul 18, 2018

Selenium tests execution on Eclipse Che Multiuser on OCP
(https://ci.codenvycorp.com/job/che-pullrequests-test-ocp/488/)
doesn't show any regression against this Pull Request.

@vparfonov vparfonov merged commit 050f4e2 into master Jul 18, 2018
@vparfonov vparfonov deleted the goto-terminal branch July 18, 2018 11:01
@vparfonov vparfonov added this to the 6.9.0 milestone Jul 18, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement A feature request - must adhere to the feature request template.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants