Skip to content

Selenium: Update the 'GolangFileEditingTest' according to the test plan#11312

Merged
artaleks9 merged 11 commits intomasterfrom
che#11209
Sep 25, 2018
Merged

Selenium: Update the 'GolangFileEditingTest' according to the test plan#11312
artaleks9 merged 11 commits intomasterfrom
che#11209

Conversation

@artaleks9
Copy link
Copy Markdown
Contributor

What does this PR do?

  • Update the 'GolangFileEditingTest' according to the test plan
  • Add new methods to the 'SeleniumWebDriverHelper'
  • Add and chahge methods in the 'FindReferencesConsoleTab'
  • Change name of the method in the 'AssistantFindPanel'
  • Add new methods to the 'CodenvyEditor'

What issues does this PR fix or reference?

#11209

@artaleks9 artaleks9 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 Sep 21, 2018
}

public void doubleClickOnReference(String visibleText) {
Actions action = actionsFactory.createAction(seleniumWebDriver);
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.

seleniumWebDriverHelper.getAction()

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.

even more. You can remove this row and replace the last row of the method ( action.doubleClick().perform(); ) by:

seleniumWebDriverHelper.doubleClick();

@artaleks9
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:11312
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@artaleks9
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:11312
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@artaleks9
Copy link
Copy Markdown
Contributor Author

ci-test

@riuvshin
Copy link
Copy Markdown
Contributor

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:11312
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

seleniumWebDriverHelper.waitTextContains(proposalDoc, expectedText);
}

/** enter the 'Ctrl + F12' */
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 24, 2018

Choose a reason for hiding this comment

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

All of key pressing methods look redundant inside CodenvyEditor class, IMHO.

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.

You mean, that may skip the comment line?

Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 24, 2018

Choose a reason for hiding this comment

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

I meant that we can use seleniumWebDriverHelper.press... methods directly.

clickOnReference(visibleText);
waitReferenceSelection(visibleText);
action.doubleClick().perform();
seleniumWebDriverHelper.doubleClick();
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.

Good catch!

private static final String REFERENCES_NOTJHING_TO_SHOW_TEXT = "Nothing to show";

private static final String[] REFERENCES_EXPECTED_TEXT = {
"/desktop-go-simple/towers.go\n" + "From:19:5 To:19:10",
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.

Concatenation at the middle of row looks weird.

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.

You propose next:

"/desktop-go-simple/towers.go\nFrom:19:5 To:19:10"

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.

Yes, I did.

editor.typeTextIntoEditor(Keys.DELETE.toString());
editor.waitAllMarkersInvisibility(ERROR);

// check adding comment code by keyboard 'Ctrl+/'
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.

// check adding comment code by keyboard 'Ctrl+/' > // check code line commenting

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.

I agree

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.

I would also move comment code verification into separate test checkCodeCommentFeature so that it doesn't connected to code validation feature.

editor.goToCursorPositionVisible(13, 1);
editor.launchCommentCodeFeature();
editor.waitTextIntoEditor("//package main");
editor.launchCommentCodeFeature();
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.

// check code line uncommenting missed, IMHO

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.

I agree

editor.launchCommentCodeFeature();
editor.waitTextIntoEditor("//package main");
editor.launchCommentCodeFeature();
editor.waitTextIntoEditor("package main");
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.

It doesn't actually check that "//" disappear, do it?

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.

Yes.. you are right )

}

@Test(priority = 1)
public void checkRenameCodeFeature() {
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.

Test method sounds a little bit strange: it is not about renaming the code - it is about renaming something inside the code, which is part of code.
So, I would propose to rename the test to checkRenameFeature

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.

OK, agree

// it is a workaround, need to fix after resolve the issue
try {
findReferencesConsoleTab.waitAllReferencesWithText(
"/desktop-go-simple/towers.go\n" + "From:23:71 To:23:76");
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.

Such concatenation at the middle of row looks weird.

};

private static final String[] PROJECT_SYMBOL_EXPECTED_TEXT = {
"print" + "/desktop-go-simple/format.go", "Print" + "/desktop-go-simple/print.go"
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.

Concatenations inside the row look weird.

"main" + "symbols (4)", "count", "hanoi", "main"
};

private static final String[] PROJECT_SYMBOL_EXPECTED_TEXT = {
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 24, 2018

Choose a reason for hiding this comment

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

Looks like it is about FIND_SYMBOL_EXPECTED_TEXT, IMHO.

assistantFindPanel.typeToInputField("print");
assistantFindPanel.waitAllNodes(PROJECT_SYMBOL_EXPECTED_TEXT);

// select item in the find panel
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 24, 2018

Choose a reason for hiding this comment

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

// select item in the find panel by clicking on node

@artaleks9 artaleks9 merged commit 6542cec into master Sep 25, 2018
@artaleks9 artaleks9 deleted the che#11209 branch September 25, 2018 09:31
@benoitf benoitf added this to the 6.12.0 milestone Sep 25, 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 Sep 25, 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.

6 participants