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

Selenium: Update the E2E selenium tests according to the changes on dashboard #13589

Merged
merged 6 commits into from
Jun 21, 2019

Conversation

artaleks9
Copy link
Contributor

What does this PR do?

  • Update E2E selenium tests according to the last changes on the dashboard (PR: Create workspace from devfile #13469)
  • Update the pageobjects according to adapted E2E selenium tests
  • Update the tests suites

What issues does this PR fix or reference?

Related issue: #13570

@artaleks9
Copy link
Contributor Author

ci-test

@artaleks9 artaleks9 requested review from SkorikSergey and removed request for musienko-maxim and Ohrimenko1988 June 20, 2019 11:41
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");
Copy link
Contributor

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.

Copy link
Contributor Author

@artaleks9 artaleks9 Jun 20, 2019

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')]";
Copy link
Contributor

@dmytro-ndp dmytro-ndp Jun 20, 2019

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case it has only single element, because this is a part of workspace full name:
locator-ws-full-name-dashboard

The "//div[@id='ws-name-%s']" does not work properly (after the last changes) when to click on workspace that to go to the Workspaces Details

Copy link
Contributor

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']"?

Copy link
Contributor Author

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.

Copy link
Contributor

@dmytro-ndp dmytro-ndp Jun 20, 2019

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.

Copy link
Contributor Author

@artaleks9 artaleks9 Jun 21, 2019

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

@che-bot
Copy link
Contributor

che-bot commented Jun 20, 2019

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

@artaleks9
Copy link
Contributor Author

ci-test

Copy link
Contributor

@dmytro-ndp dmytro-ndp left a comment

Choose a reason for hiding this comment

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

Looks good!

@che-bot
Copy link
Contributor

che-bot commented Jun 21, 2019

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

@artaleks9 artaleks9 merged commit 879f296 into master Jun 21, 2019
@artaleks9 artaleks9 deleted the che#13570 branch June 21, 2019 14:35
@che-bot che-bot added this to the 7.0.0 milestone Jun 27, 2019
@che-bot che-bot added the kind/task Internal things, technical debt, and to-do tasks to be performed. label Jun 27, 2019
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