Skip to content

Selenium: cover Golang language server functionality by selenium test #10625

Merged
SkorikSergey merged 10 commits intomasterfrom
coverGolangLSFunctionality
Aug 6, 2018
Merged

Selenium: cover Golang language server functionality by selenium test #10625
SkorikSergey merged 10 commits intomasterfrom
coverGolangLSFunctionality

Conversation

@SkorikSergey
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR creates GolangFileEditingTest selenium test that cover the Golang language server functionality by use cases from Language servers test plan - https://github.com/eclipse/che/wiki/Test-plan-for-checking-Language-servers.

What issues does this PR fix or reference?

#10084

@SkorikSergey SkorikSergey added status/in-progress This issue has been taken by an engineer and is under active development. kind/task Internal things, technical debt, and to-do tasks to be performed. team/che-qe labels Aug 1, 2018
@SkorikSergey
Copy link
Copy Markdown
Contributor Author

ci-build

@SkorikSergey SkorikSergey added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed status/in-progress This issue has been taken by an engineer and is under active development. labels Aug 1, 2018

@Test(priority = 1)
public void checkCodeValidation() {
editor.selectTabByName(GO_FILE_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.

From the readability view it's better to divide separate steps by empty rows.

editor.waitAllMarkersInvisibility(ERROR);
editor.goToCursorPositionVisible(13, 1);
editor.typeTextIntoEditor("p");
editor.waitMarkerInPosition(ERROR, 13);
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.

IMHO it's important to check error message as well.


@Test
public void checkLanguageServerInitialized() {
projectExplorer.waitAndSelectItem(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.

    projectExplorer.waitAndSelectItem(PROJECT_NAME);
    projectExplorer.openItemByPath(PROJECT_NAME);
    projectExplorer.openItemByPath(PATH_TO_GO_FILE);

Can be changed to "ProjectExplorer#expandPathInProjectExplorerAndOpenFile(String path, String fileName)"

Copy link
Copy Markdown
Contributor

@musienko-maxim musienko-maxim Aug 6, 2018

Choose a reason for hiding this comment

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

Can we apply quickExpandWithJavaScript()? For reducing of opening time.

editor.launchAutocompleteAndWaitContainer();

editor.checkProposalDocumentation("No documentation found.");
editor.waitTextIntoAutocompleteContainer("Print");
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.

maybe we should works this method for using of multiple arguments:

CodenvyEditor#waitTextIntoAutocompleteContainer(String ... expectedText);

It helps to reach more compact syntax:

editor.waitTextIntoAutocompleteContainer("Print", "Println",  "Printf");

what do you think about this?

@SkorikSergey SkorikSergey merged commit 1e7a37d into master Aug 6, 2018
@SkorikSergey SkorikSergey deleted the coverGolangLSFunctionality branch August 6, 2018 11:00
@SkorikSergey SkorikSergey removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Aug 6, 2018
@benoitf benoitf added this to the 6.10.0 milestone Aug 9, 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