Skip to content

Selenium: stabilize FindUsagesBaseOperationTest selenium test#11365

Merged
SkorikSergey merged 5 commits intomasterfrom
reworkFindUsagesBaseOperationTest
Sep 26, 2018
Merged

Selenium: stabilize FindUsagesBaseOperationTest selenium test#11365
SkorikSergey merged 5 commits intomasterfrom
reworkFindUsagesBaseOperationTest

Conversation

@SkorikSergey
Copy link
Copy Markdown
Contributor

What does this PR do?

This PR reworks use steps in FindUsagesBaseOperationTest selenium test in part that checks working with the "Find Usages" panel by clicks. Also were added timeout after every click on node.

What issues does this PR fix or reference?

#11171

@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 Sep 26, 2018
public void clickOnIconNodeInFindUsagesPanel(String nameNode) {
seleniumWebDriverHelper.waitAndClick(
By.xpath(format(Locators.FIND_USAGES_ICON_NODE, nameNode)));
WaitUtils.sleepQuietly(500, TimeUnit.MILLISECONDS);
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.

Could you, please, leave a comment in the code with explanation why do we need to wait here for 500 millisecs?

public void selectNodeInFindUsagesByDoubleClick(String node) {
seleniumWebDriverHelper.moveCursorToAndDoubleClick(
By.xpath(format(Locators.FIND_USAGES_NODE, node)));
WaitUtils.sleepQuietly(500, TimeUnit.MILLISECONDS);
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.

Could you, please, leave a comment in the code with explanation why do we need to wait here for 500 millisecs?

projectExplorer.openItemByVisibleNameInExplorer("AppController.java");

// Check basic operations of the 'find usages' panel
// Check basic operations of the FindUsages panel
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.

FindUsages -> Find Usages

findUsages.waitSelectedElementInFindUsagesPanel("numGuessByUser");

// Check nodes in the 'find usages' panel by 'double click' and click on the icon node
// Check nodes in the FindUsages panel by 'double click' and click on the icon node
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.

Code will be slightly clearer if we put comment click on the icon node at the proper place in the code below.

@SkorikSergey SkorikSergey merged commit 4ab89ff into master Sep 26, 2018
@SkorikSergey SkorikSergey deleted the reworkFindUsagesBaseOperationTest branch September 26, 2018 14:56
@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 Sep 26, 2018
@benoitf benoitf added this to the 6.12.0 milestone Sep 26, 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.

4 participants