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

Extend NavigateToFile selenium test #6889

Merged
merged 7 commits into from
Oct 24, 2017
Merged

Conversation

SkorikSergey
Copy link
Contributor

What does this PR do?

We need extend NavigateToFile selenium test to cover next use cases:

What issues does this PR fix or reference?

#6641

@SkorikSergey SkorikSergey added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Oct 21, 2017
@skabashnyuk
Copy link
Contributor

Pr for branch che6 please.

@benoitf benoitf added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Oct 22, 2017
navigateToFile.typeSymbolInFileNameField("H");
loader.waitOnClosed();
navigateToFile.waitFileNamePopUp();
Assert.assertFalse(navigateToFile.waitListOfFilesNames(FILE_H_SYMBOL));
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, use static import to get rid of Assert. here to simplify the code.

@@ -78,6 +83,9 @@
@Inject private Menu menu;
@Inject private TestWorkspaceServiceClient workspaceServiceClient;
@Inject private TestProjectServiceClient testProjectServiceClient;
@Inject private org.eclipse.che.selenium.pageobject.git.Git git;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, move Git package to import section to simplify the code.

@@ -67,6 +71,7 @@
Arrays.asList(
"classpath (/NavigateFile_2/.che)", "classpath (/NavigateFile/.che)",
"createdFrom.con (/NavigateFile_2)", "createdFrom.api (/NavigateFile)");
private static final String FILE_H_SYMBOL = "HEAD (/NavigateFile/.git)";
Copy link
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 comment or better to rename the constant to explain the exact proposal of it?

TestMenuCommandsConstants.Assistant.ASSISTANT,
TestMenuCommandsConstants.Assistant.NAVIGATE_TO_FILE);
navigateToFile.waitFormToOpen();
loader.waitOnClosed();
Copy link
Contributor

Choose a reason for hiding this comment

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

Waiting of closing of loader looks useless here after the NavigateToFile form had opened, doesn't it?

@@ -124,8 +124,8 @@ public void waitFileNamePopUp() {
*
* @param text a text that should be into list
*/
public void waitListOfFilesNames(final String text) {
new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
public Boolean waitListOfFilesNames(final String text) {
Copy link
Contributor

Choose a reason for hiding this comment

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

"Wait" doesn't require returning the value. IMHO it's better to rename method to isFilenameSuggested(nameFragment) according to the actual commands.

@SkorikSergey
Copy link
Contributor Author

Pull request for che6 branch merged #6909.

@SkorikSergey SkorikSergey merged commit 4373a16 into master Oct 24, 2017
@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 Oct 24, 2017
@benoitf benoitf added this to the 5.20.0 milestone Oct 24, 2017
@SkorikSergey SkorikSergey deleted the extendNavigateToFileTest branch October 25, 2017 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants