Skip to content

Selenium: cover Python language server format feature by selenium test#10149

Merged
SkorikSergey merged 10 commits intomasterfrom
checkPythonLsFormatFeature
Jun 22, 2018
Merged

Selenium: cover Python language server format feature by selenium test#10149
SkorikSergey merged 10 commits intomasterfrom
checkPythonLsFormatFeature

Conversation

@SkorikSergey
Copy link
Copy Markdown
Contributor

What does this PR do?

This issue adds checking Python language server format feature to PythonFileEditingTest selenium test.

@SkorikSergey SkorikSergey added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. team/che-qe labels Jun 22, 2018
@SkorikSergey SkorikSergey requested a review from vparfonov as a code owner June 22, 2018 08:09
editor.openContextMenuInEditor();
editor.clickOnItemInContextMenu(FORMAT);
editor.waitTextIntoEditor(
" towers(i-1, middle, finish, start)\n\n\n" + "towers(5, 'X', 'Z', 'Y')\n");
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.

" + " looks redundant inside the string.

editor.typeTextIntoEditor("\n");
editor.goToPosition(7, 1);
editor.goToPosition(18, 53);
editor.typeTextIntoEditor("\n\n");
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.

Looks like these two typeTextIntoEditor commands can be united into the single command:

editor.typeTextIntoEditor("\n\nobject = MyClass()\nprint(object.");

@@ -132,42 +112,34 @@ public void checkAutocompleteFeature() throws Exception {
editor.enterAutocompleteProposal("function() ");
editor.waitTextIntoEditor("print(object.function");
editor.typeTextIntoEditor("())");
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.

What is the propose of typing text "())" into editor if we don't check anything after that?

@BeforeClass
public void setUp() throws Exception {
URL resource =
PythonFileEditingTest.this.getClass().getResource("/projects/console-python3-simple");
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Jun 22, 2018

Choose a reason for hiding this comment

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

PythonFileEditingTest.this. is redundant here.

variable = "variable"

def function(self):
print("This is a message inside the class.") No newline at end of file
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Jun 22, 2018

Choose a reason for hiding this comment

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

It would better to add empty line at the end of file.

print('move disk from ', start, ' to ', finish)
towers ( i-1, middle, finish, start )

towers ( 5, 'X', 'Z', 'Y' ) No newline at end of file
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Jun 22, 2018

Choose a reason for hiding this comment

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

It would better to add empty line at the end of file.

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.

In this case an empty line will be added as result of Format feature.

@SkorikSergey SkorikSergey merged commit 3c09d14 into master Jun 22, 2018
@SkorikSergey SkorikSergey deleted the checkPythonLsFormatFeature branch June 22, 2018 13:28
@benoitf benoitf added this to the 6.8.0 milestone Jun 22, 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 Jun 22, 2018
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.

5 participants