-
Notifications
You must be signed in to change notification settings - Fork 249
[JENKINS-76114] Test "All" and "Suggested" buttons from the plugin configuration wizard #2178
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
Conversation
jtnord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test would appear to be flaky and performs actions without asserting anything
src/main/java/org/jenkinsci/test/acceptance/po/WizardCustomizeJenkins.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/test/acceptance/po/WizardCustomizeJenkins.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/test/acceptance/po/WizardCustomizeJenkins.java
Show resolved
Hide resolved
| wizardCustomize.searchPlugin("JUnit"); | ||
| wizardCustomize.selectPlugin("junit"); | ||
| wizardCustomize.startInstall(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this is a weak test, as junit is a suggested plugin - so the customisation may be completely broken. (there is also no check that the plugin is installed later on!)
src/main/java/org/jenkinsci/test/acceptance/po/WizardCustomizeJenkins.java
Outdated
Show resolved
Hide resolved
| private boolean isSelected(String pluginKey) { | ||
| return driver | ||
| .findElements(by.xpath( | ||
| "//div[contains(@class, 'plugins-for-category')]/div[contains(@class, 'plugin') and contains(@class, 'selected') and contains(@class, '%s')]", | ||
| pluginKey)) | ||
| .stream() | ||
| .findFirst() | ||
| .isPresent(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeromepochat this fails for some plugins. e.g. workflow-aggregator
can be reproduced with
diff --git a/src/test/java/core/InstallWizardTest.java b/src/test/java/core/InstallWizardTest.java
index 2a8507cb..6d3da103 100644
--- a/src/test/java/core/InstallWizardTest.java
+++ b/src/test/java/core/InstallWizardTest.java
@@ -93,8 +93,8 @@ public class InstallWizardTest extends AbstractJUnitTest {
wizardCustomize.selectSuggested();
wizardCustomize.selectAll();
wizardCustomize.selectNone();
- wizardCustomize.searchPlugin("JUnit");
- wizardCustomize.selectPlugin("junit");
+ wizardCustomize.searchPlugin("Pipeline");
+ wizardCustomize.selectPlugin("workflow-aggregator");
wizardCustomize.startInstall();
wizardCustomize.shouldFinishInstallSuccessfully();
This tests that "All" and "Suggested" button from plugin setup wizard are clickable ("None" link is already tested).
Testing done
Manual tests were performed as part of jenkinsci/jenkins#11070.
This extends coverage of the existing automated test. I tested locally:
JENKINS_VERSION=2.526 mvn test -Dtest=InstallWizardTest#wizardInstallCustomPluginsTestSubmitter checklist