-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
Pr for branch che6 please. |
navigateToFile.typeSymbolInFileNameField("H"); | ||
loader.waitOnClosed(); | ||
navigateToFile.waitFileNamePopUp(); | ||
Assert.assertFalse(navigateToFile.waitListOfFilesNames(FILE_H_SYMBOL)); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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)"; |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
Pull request for che6 branch merged #6909. |
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