Create new test for covering Refactoring ->Rename feature for DotNet LS#11006
Create new test for covering Refactoring ->Rename feature for DotNet LS#11006musienko-maxim merged 17 commits intomasterfrom
Conversation
| public void checkRenaming() { | ||
| String newClassName = "HelloWorld"; | ||
| String textFragmentAfterRenaming = "public class HelloWorld"; | ||
| projectExplorer.openItemByPath(PROJECT_NAME); |
There was a problem hiding this comment.
This project was already opened in setUp() method(line 71).
| * | ||
| * @param renamevalue | ||
| */ | ||
| public void doRenamingByLanguageServerField(String renamevalue) { |
There was a problem hiding this comment.
It maybe better to rename variable to 'renameValue'
| } | ||
|
|
||
| /** | ||
| * wait renaming field in the Editor (usually it field is used by language servers) type new |
There was a problem hiding this comment.
Maybe there need a comma after brackets
| * @param renamevalue | ||
| */ | ||
| public void doRenamingByLanguageServerField(String renamevalue) { | ||
| seleniumWebDriverHelper |
There was a problem hiding this comment.
Please use "SeleniumWebDriverHelper#setText(WebElement webElement, String value)"
| editor.waitTextIntoEditor(textFragmentAfterRenaming); | ||
| } catch (TimeoutException ex) { | ||
| // remove try-catch block after issue has been resolved | ||
| fail("Known issue https://github.com/eclipse/che/issues/10180", ex); |
There was a problem hiding this comment.
Is it permanent failure? If so, it's better to express it in error message like the follow:
Known permanent failure https://github.com/eclipse/che/issues/10180
|
|
||
| @BeforeClass | ||
| public void setUp() throws Exception { | ||
| URL resource = getClass().getResource("/projects/CsharpHelloWorld"); |
There was a problem hiding this comment.
To be consistent: CsharpHelloWorld > CSharpHelloWorld
| * Red Hat, Inc. - initial API and implementation | ||
| */ | ||
| package org.eclipse.che.selenium.languageserver; | ||
| package org.eclipse.che.selenium.languageserver.Csharp; |
There was a problem hiding this comment.
package name should be in lower case: Csharp > csharp
| import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.IMPLEMENTATION_CONTAINER; | ||
| import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.ITEM_TAB_LIST; | ||
| import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.JAVA_DOC_POPUP; | ||
| import static org.eclipse.che.selenium.pageobject.CodenvyEditor.Locators.LANGUAGE_SERVER_RENFACTORING_RENAME_FIELD_CSS; |
| String HOVER_POPUP_XPATH = | ||
| "//div[@class='textviewTooltip' and contains(@style,'visibility: visible')]"; | ||
| String AUTOCOMPLETE_PROPOSAL_DOC_ID = "gwt-debug-content-assistant-doc-popup"; | ||
| String LANGUAGE_SERVER_RENFACTORING_RENAME_FIELD_CSS = "input.orionCodenvy"; |
| } | ||
|
|
||
| /** | ||
| * wait renaming field in the Editor (usually it field is used by language servers), type new |
There was a problem hiding this comment.
type new rename value > type new value
| } | ||
|
|
||
| /** | ||
| * wait renaming field in the Editor (usually it field is used by language servers), type new |
There was a problem hiding this comment.
What does Language Server Field mean? Did you mean Code Assistant?
There was a problem hiding this comment.
I see, thank you for the explanation.
| String HOVER_POPUP_XPATH = | ||
| "//div[@class='textviewTooltip' and contains(@style,'visibility: visible')]"; | ||
| String AUTOCOMPLETE_PROPOSAL_DOC_ID = "gwt-debug-content-assistant-doc-popup"; | ||
| String LANGUAGE_SERVER_RENFACTORING_RENAME_FIELD_CSS = "input.orionCodenvy"; |
There was a problem hiding this comment.
input.orionCodenvy style name looks too general IMHO
There was a problem hiding this comment.
I agree but it is part of Orion component. With this general name of css locator is simple and reliable. If you have other idea for this - we will apply it
| import org.testng.annotations.BeforeClass; | ||
| import org.testng.annotations.Test; | ||
|
|
||
| public class CSharpRenamingTest { |
There was a problem hiding this comment.
According to name convention there should be CSharpClassRenamingTest test class name, IMHO.
|
I see you created separate test class to test C# renaming, but it consumes additional time for creation and starting test workspace, and for resolving #C project dependencies. |
|
I totally agree with you but at this moment C# language is very unstable. During the test we can get an error that was described in the issue: #10151. This one totally breaks the test environment. And all tests after that will be broken. In this case we cannot track if the known issue has been fixed or not (because the workspace does not work properly). Also we won't know which feature works, because all tests related to the workspace will fail anyway. So it is temporary solution i think after we stabilize and fix known issues, we can join this into common class |
|
Got it! Thank you for response. |
|
ci-build |


What does this PR do?
What issues does this PR fix or reference?
#10195
@dmytro-ndp, @Ohrimenko1988, @SkorikSergey