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

JENKINS-69757 Improve priority sorter plugin automated test coverage #259

Merged
merged 8 commits into from
May 17, 2023

Conversation

995560375
Copy link
Contributor

@995560375 995560375 commented May 16, 2023

JENKINS-69757
This pull request introduces new tests for the PrioritySorterConfiguration class, specifically targeting the doFillStrategyItems method.

The doFillStrategyItems method is responsible for populating a ListBoxModel with the display names and keys of all sorter strategies. The test, testDoFillStrategyItems, ensures that this List BoxModel is correctly populated.
7771684196549_ pic

7791684203855_ pic

The test leverages Mockito to mock the SorterStrategyDescriptor instances and their respective methods, getDisplayName and getKey. It verifies that the ListBoxModel returned by doFillStrategyItems contains the correct number of items and that each item's name and value match the expected values.

@github-actions github-actions bot added the test Automated test addition or improvement label May 16, 2023
@github-actions github-actions bot added the dependencies Dependency related change label May 16, 2023
@995560375 995560375 changed the title Create PrioritySorterConfigurationTest.java JENKINS-69757 Improve priority sorter plugin automated test coverage May 16, 2023
@MarkEWaite MarkEWaite removed the dependencies Dependency related change label May 16, 2023
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request. There is one minor item that needs to be adjusted and then it is ready to merge.

In future pull requests, please create a new branch that contains your changes rather than placing your changes on a branch named master. When your branch is named master it complicates the review process for maintainers like me.

You can read more about creating a pull request in the "Improve a plugin" tutorial.

pom.xml Outdated Show resolved Hide resolved
@github-actions github-actions bot added the dependencies Dependency related change label May 17, 2023
Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks!

@MarkEWaite MarkEWaite removed the dependencies Dependency related change label May 17, 2023
@MarkEWaite MarkEWaite merged commit 99f370d into jenkinsci:master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants