-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Selenium: Update the E2E selenium tests according to the changes on dashboard #13589
Conversation
ci-test |
theiaProjectTree.waitItem(PROJECT_NAME); | ||
} catch (TimeoutException ex) { | ||
// remove try-catch block after issue has been resolved | ||
fail("Known permanent failure https://github.com/eclipse/che/issues/13579"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is permanent failure, let's set @Test(groups = UNDER_REPAIR)
for the test to exclude it from regular test execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
I simply wanted to verify that it "works" as expected when is run the test suite.
@@ -74,7 +74,7 @@ public Workspaces( | |||
String BULK_CHECKBOX = "//md-checkbox[@aria-label='Workspace list']"; | |||
String SEARCH_WORKSPACE_FIELD = "//input[@ng-placeholder='Search']"; | |||
String NO_WORKSPACE_FOUND = "//span[text()='No workspaces found.']"; | |||
String WORKSPACE_ITEM_NAME = "//div[@id='ws-name-%s']"; | |||
String WORKSPACE_ITEM_NAME = "//div[contains(@id, '/%s')]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This xpath looks way too common - it covers any element with id started with "/".
It's interesting to know why "//div[@id='ws-name-%s']"
can't be applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is id="ws-full-name-che/java"
on screenshot.
Can we use more precise locator: "//div[@id='ws-full-name-che/%s']"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can..Only one thing.. in this case we can use this locator only to workspaces of the name che organization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. There is class name class="workspace-name-clip"
can be used as well to locate web element in addition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose the compromise solution - to do xpath more precize:
//div[@class='workspace-name-clip' and contains(@id, '/%s')]
In this case we have minimal fix up, which works.
If to use full name locator we have a quite big refactoring related to test classes and more part of them are already excluded from test suite (and more it needs to add additional code to get prefix of full name of the workspace.):
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/CreateAndDeleteProjectsTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/DeleteRunningWorkspaceTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/DeleteStoppingWorkspaceTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/RenameWorkspaceTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/AddWorkspaceToOrganizationTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceMemberTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/organization/ShareWorkspaceOwnerTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsMachineActionsTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsMachinesRamTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsProjectsTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/dashboard/workspaces/details/WorkspaceDetailsSingleMachineTest.java
modified: selenium/che-selenium-test/src/test/java/org/eclipse/che/selenium/workspaces/ProjectStateAfterRenameWorkspaceTest.java
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
ci-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
What does this PR do?
What issues does this PR fix or reference?
Related issue: #13570