Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "waitCommandIsSelected" method to the "CommandsExplorer" page-object in selenium tests #7467

Merged
merged 5 commits into from
Nov 22, 2017

Conversation

Ohrimenko1988
Copy link
Contributor

What does this PR do?

Add "waitCommandIsSelected" method to the "CommandsExplorer" page-object and update "selectCommandByName" method with new check.

What issues does this PR fix or reference?

Issue #7364

Release Notes

Docs PR

@Ohrimenko1988 Ohrimenko1988 added kind/bug Outline of a bug - must adhere to the bug report template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. target/che6 labels Nov 20, 2017
public void waitCommandIsSelected(String commandName) {
String locator =
String.format(
"//div[@id='command_%s' and contains(concat(' ', normalize-space(@class), ' '), ' selected')]",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid "concat(' ', normalize-space(@Class), ' ')" here by rewriting the xpath to the:
//div[@id='command_%s' and contains(normalize-space(@class), 'selected')
?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On my regret no, in this case, this is the best way

Copy link
Contributor

@dmytro-ndp dmytro-ndp Nov 20, 2017

Choose a reason for hiding this comment

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

The simpler variant looks even better IMHO:
screenshot from 2017-11-20 17-37-19

@tolusha
Copy link
Contributor

tolusha commented Nov 21, 2017

Do we need MySuite.xml ?

@Ohrimenko1988
Copy link
Contributor Author

@tolusha no, this is a temporary suite for fast check a factory on CI, it will be removed after check the factory functionality.

@tolusha
Copy link
Contributor

tolusha commented Nov 21, 2017

Rename it respectively then

@Ohrimenko1988
Copy link
Contributor Author

Ohrimenko1988 commented Nov 22, 2017

@Ohrimenko1988 Ohrimenko1988 merged commit 51192cb into che6 Nov 22, 2017
@Ohrimenko1988 Ohrimenko1988 deleted the che6-selenium-commandexplorer branch November 22, 2017 11:43
@Ohrimenko1988 Ohrimenko1988 removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Nov 22, 2017
@benoitf benoitf added this to the 6.0.0-M2 milestone Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants