Skip to content

Selenium: Fix of unexpected fail of "AddOrImportProjectFormTest" selenium test#10118

Merged
Ohrimenko1988 merged 21 commits intomasterfrom
CHE-10111
Jun 26, 2018
Merged

Selenium: Fix of unexpected fail of "AddOrImportProjectFormTest" selenium test#10118
Ohrimenko1988 merged 21 commits intomasterfrom
CHE-10111

Conversation

@Ohrimenko1988
Copy link
Copy Markdown
Contributor

What does this PR do?

Fix of unexpected fail of "AddOrImportProjectFormTest" selenium test

What issues does this PR fix or reference?

Issue #10111

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. team/che-qe labels Jun 20, 2018
@Ohrimenko1988 Ohrimenko1988 requested a review from vparfonov as a code owner June 20, 2018 14:54
@Ohrimenko1988
Copy link
Copy Markdown
Contributor Author

ci-test

private static final String JDK_SUGGESTION_TITLE = "JDK";
private static final String JAVA_SUGGESTION_TITLE = "JAVA";
private static final String JAVA_1_8_SUGGESTION_TITLE = "JAVA 1.8";
private static final String NAME_WITH_ONE_HUNDRED_SYMBOLS =
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.

Actually, not related to your changes, but maybe will be useful for you.
We have utility class for name generation NameGenerator. With it you can generate name with given prefix and length. So for generate workspace name with 100 symbols you can call : NameGenerator.generate("wksp-", 95)

@codenvy-ci
Copy link
Copy Markdown

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10118
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@Ohrimenko1988
Copy link
Copy Markdown
Contributor Author

ci-test

@codenvy-ci
Copy link
Copy Markdown

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10118
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@Ohrimenko1988
Copy link
Copy Markdown
Contributor Author

ci-test

@codenvy-ci
Copy link
Copy Markdown

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10118
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@riuvshin
Copy link
Copy Markdown
Contributor

ci-test

@codenvy-ci
Copy link
Copy Markdown

ci-test build report:
Build details
Test report
selenium tests report data
docker image: eclipseche/che-server:10118
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

EXPECTED_SAMPLES_WITH_DESCRIPTIONS.get(CONSOLE_SAMPLE_NAME),
EXPECTED_CONSOLE_REPOSITORY_URL);

addOrImportForm.clickOnAddOrImportProjectButton();
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.

it would be better to have separate steps divided by empty rows here from the readability point

return testWorkspaceServiceClient.getAll().size();
}

private List<Workspaces.WorkspaceListItem> getUnexpectedWorkspaces(
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.

these methods would be useful for the other tests and so more suitable for the Workspaces page object class

return testWorkspaceServiceClient.getAll().size();
}

private void waitOfOpositeCheckboxState(String workspaceName, boolean currentCheckboxState) {
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.

waitOnOpositeCheckboxState?

workspaces.waitWorkspaceCheckboxEnabled(workspaceName);
}

private void clickOnUnexpectedWorkspacesCheckboxes(List<String> expectedWorkspaces) {
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.

This method would be useful for other tests as well. How about moving it into the Workspaces page object as well?

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.

Also, it's not quite clear how Unexpected workspaces differ from ordinary one.

workspaces.waitWorkspaceCheckboxEnabled(javaWorkspaceName);
workspaces.waitWorkspaceCheckboxEnabled(blankWorkspaceName);

// for avoid of failing in the multi-thread mode
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.

it could be useful for reader to know what kind of fail is clickOnUnexpectedWorkspacesCheckboxes is preventing

@Ohrimenko1988
Copy link
Copy Markdown
Contributor Author

ci-build

@codenvy-ci
Copy link
Copy Markdown

@Ohrimenko1988 Ohrimenko1988 merged commit f51730a into master Jun 26, 2018
@Ohrimenko1988 Ohrimenko1988 deleted the CHE-10111 branch June 26, 2018 14:17
@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 Jun 26, 2018
@benoitf benoitf added this to the 6.8.0 milestone Jun 26, 2018
hbhargav pushed a commit to hbhargav/che that referenced this pull request Dec 5, 2018
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.

7 participants