Selenium: Add new test method to the 'PullRequestPluginTest'#11128
Selenium: Add new test method to the 'PullRequestPluginTest'#11128dmytro-ndp merged 14 commits intomasterfrom
Conversation
…lRequestPlaginTest'
…ed to close the issue
|
ci-test |
|
ci-test build report: |
| static final String PULL_REQUEST_BTN = "gwt-debug-partButton-Pull Request"; | ||
| static final String BRANCH_NAME = | ||
| "//div[text()='Branch name:']/following-sibling::div//span/label[text()='%s']"; | ||
| static final String REFRESH_BRANCH_BUTTON = "gwt-debug-refreshContributionBranchButton"; |
There was a problem hiding this comment.
Is it button name or id? Could you express it in the constant name to make it clear?
There was a problem hiding this comment.
Yes, you're right.
Need to correct -> REFRESH_BRANCH_BUTTON_ID
|
|
||
| /** Click 'refresh contribution branch name' button on the 'Pull Request' panel */ | ||
| public void clickRefreshContributionBranchButton() { | ||
| seleniumWebDriverHelper.waitAndClick(refreshBranchListButton); |
There was a problem hiding this comment.
refreshBranchListButton variable name hasn't completely agreed with button name expressed in method name refreshContributionBranchButton
| private static final String NEW_BRANCH = generate("branch-", 8); | ||
| private static final String DEV_BRANCH_NAME = generate("dev-", 4); | ||
| private static final String BASE_BRANCH_NAME = generate("contrib-", 4); | ||
| private static final String NEW_BRANCH_NAME = generate("branch-", 8); |
There was a problem hiding this comment.
NEW_BRANCH_NAME = generate("new-", 4); looks more suitable here
| "%s wants to merge 1 commit into %s\n" + "from %s", | ||
| gitHubUsername, BASE_BRANCH_NAME, DEV_BRANCH_NAME); | ||
| seleniumWebDriverHelper.waitTextContains( | ||
| By.xpath("//div[@class='TableObject-item TableObject-item--primary']"), pullHeaderText); |
There was a problem hiding this comment.
It's better to name //div[@class='TableObject-item TableObject-item--primary'] somehow to understand it's propose.
| pullRequestPanel.waitStatusOk(PULL_REQUEST_ISSUED); | ||
| pullRequestPanel.waitMessage(PULL_REQUEST_CREATED); | ||
|
|
||
| // check the pull header on the GitHub page |
There was a problem hiding this comment.
it's not just pull header, but Pull Request header
|
IMHO checking pull request through the GitHub API by using is more reliably and safe method compare to getting to GitHub pull request web page and checking web elements state by it's xpath. |
|
OK, it's a good idea |
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
|
ci-test |
|
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
|
ci-test |
|
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
|
ci-test |
|
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
|
@artaleks9: please, review new changes. |
|
ci-test |
|
Looks good for me |
|
Results of automated E2E tests of Eclipse Che Multiuser on OCP: |
Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
…-che#11128) * Add new test method 'createPullRequestToNonDefaultBranch' to the 'PullRequestPlaginTest' * Add the method 'clickRefreshContributionBranchButton()' to the 'PullRequestPanel' * Add the id selector to the web element in the 'ContributePartViewImpl' * Delete the 'try/catch' from the 'PullRequestPluginWithForkTest' related to close the issue * Read test pull request info by using kohsuke library * Ensure 'Git Contribute' preference is set to default value after the test execution Signed-off-by: Dmytro Nochevnov <dnochevnov@codenvy.com>
What does this PR do?
What issues does this PR fix or reference?
#10000