Skip to content

Fix selenium tests in 'git' package to increase reliability#11125

Merged
dmytro-ndp merged 3 commits intomasterfrom
che#11105
Sep 8, 2018
Merged

Fix selenium tests in 'git' package to increase reliability#11125
dmytro-ndp merged 3 commits intomasterfrom
che#11105

Conversation

@artaleks9
Copy link
Copy Markdown
Contributor

What does this PR do?

  • Correct some selenium tests from the git package to increase their reliability when run on CI:
    • AmendCommitTest - replace the quickExpandWithJavaScript() method on the expandPathInProjectExplorerAndOpenFile()
    • CommitFilesByMultiSelectTest - delete calling addToIndex from test class as redundant and potentially leading to fail the test
    • GitPullTest - add the waiting to closing the notification pop-up after git pull to provide refresh the editor

What issues does this PR fix or reference?

#11105

@artaleks9 artaleks9 added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. kind/task Internal things, technical debt, and to-do tasks to be performed. team/che-qe labels Sep 7, 2018
git.closeGitInfoPanel();
projectExplorer.selectMultiFilesByCtrlKeys(
PROJECT_NAME + "/my-webapp/src/main/java/helloworld/AppController.java");
menu.runCommand(TestMenuCommandsConstants.Git.GIT, TestMenuCommandsConstants.Git.ADD_TO_INDEX);
Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 7, 2018

Choose a reason for hiding this comment

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

Does it really work without adding changes to index?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, of course. We can commit changes without add to index from UI Git command

Copy link
Copy Markdown
Contributor

@dmytro-ndp dmytro-ndp Sep 7, 2018

Choose a reason for hiding this comment

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

That is the changes are added to index automatically.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes

@artaleks9 artaleks9 changed the title Do corrections to selenium tests in 'git' package to increase reliability Fix selenium tests in 'git' package to increase reliability Sep 7, 2018

@Test
public void checkAmendPreviousCommit() {
String pathToFile = PROJECT_NAME + "/src/main/java/org.eclipse.qa.examples";
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.

We have already have PATH_TO_FILE constant which looks similar to pathToFile. I would name variable differently to avoid confusion.

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.

What about the name pathToFileItem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't mind

@dmytro-ndp dmytro-ndp merged commit 3fe94f3 into master Sep 8, 2018
@dmytro-ndp dmytro-ndp deleted the che#11105 branch September 8, 2018 21:40
@benoitf benoitf added this to the 6.11.0 milestone Sep 8, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Sep 8, 2018
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