Selenium: Revise and update "Dashboard" selenium tests in "Workspaces" section ("Workspace List" and "New Workspace" pages).#9997
Conversation
…work-new-workspace
| newWorkspace.selectStack(DOT_NET); | ||
| newWorkspace.waitStackSelected(DOT_NET); | ||
| Assert.assertEquals(newWorkspace.getWorkspaceNameValue(), TEST_BLANK_WORKSPACE_NAME); | ||
|
|
There was a problem hiding this comment.
What about static import?
| } | ||
|
|
||
| public boolean equals(Object obj) { | ||
| WorkspaceListItem itemForCompare = (WorkspaceListItem) obj; |
There was a problem hiding this comment.
May be using Generic more preferable in this case?
There was a problem hiding this comment.
Generics hardly ever help to simplify the code so as we are overriding Object#equals(Object) method here.
But we could make this code safer if we are checking if obj is an instance of WorkspaceListItem as follow https://stackoverflow.com/a/2316239/2556329
And also @Override annotation is missed here as well.
@Ohrimenko1988: please, make sure there are no new warnings before merging into the master like the follow:
/home/ndp/projects/che/selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/dashboard/workspaces/Workspaces.java:437: warning: [EqualsHashCode] Classes that override equals should also override hashCode.
public boolean equals(Object obj) {
^
(see http://errorprone.info/bugpattern/EqualsHashCode)
Along with it, it would be grateful if you fix another warning as well:
/home/ndp/projects/che/selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/AddOrImportProjectFormTest.java:70: warning: [MutableConstantField] Constant field declarations should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List)
private static final Map<String, String> EXPECTED_SAMPLES_WITH_DESCRIPTIONS =
^
(see http://errorprone.info/bugpattern/MutableConstantField)
There was a problem hiding this comment.
@dmytro-ndp Thank you for so complete clarification.
| "zend"); | ||
|
|
||
| private static final List<String> EXPECTED_ALL_STACKS = | ||
| Arrays.asList( |
There was a problem hiding this comment.
May be make sense put long lists into resources for making the code more shorter?
There was a problem hiding this comment.
In my opinion, in this case, of course, it makes a code shorter, but more complicated.
|
ci-test build report: |
|
ci-test |
|
ci-test build report: |
|
ci-test |
|
ci-test build report: |
|
ci-test |
|
ci-test build report: |
|
ci-build |
| } | ||
|
|
||
| public void waitWorkspaceCheckboxEnabled(String workspaceName) { | ||
| webDriverWaitFactory |
There was a problem hiding this comment.
Looks like we can simplify the code a bit if we will create and user method SeleniumWebDriverHelper#waitCondition(ExpectedCondition<Boolean> expectedCondition)
There was a problem hiding this comment.
I have created an issue for this task #10105
|
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/4556/ |
…" section ("Workspace List" and "New Workspace" pages). (eclipse-che#9997)
What does this PR do?
Revise and update "Dashboard" selenium tests in "Workspaces" section ("Workspace List" and "New Workspace" pages).
What issues does this PR fix or reference?
Issue: #9652
Release Notes
Docs PR