Package org.jenkinsci.test.acceptance.po
Class PluginManager
- All Implemented Interfaces:
CapybaraPortingLayer
Page object for plugin manager.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver -
Field Summary
FieldsFields inherited from class org.jenkinsci.test.acceptance.po.PageObject
jsonParser, urlFields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, timeFields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidForce update the plugin update center metadata.voidenablePlugin(String pluginName, boolean state) Enable oder disable the specified plugin.hudson.util.VersionNumbergetAvailableVersionForPlugin(String pluginName) installationStatus(String spec) installationStatus(PluginSpec spec) voidinstallPlugin(File localFile) Deprecated.Not used when runningMockUpdateCenter.booleaninstallPlugins(PluginSpec... specs) Deprecated.Please be encouraged to useWithPluginsannotations to statically declare the required plugins you need.booleanisInstalled(String... specs) Deprecated.booleanisInstalled(PluginSpec... specs) Methods inherited from class org.jenkinsci.test.acceptance.po.ContainerPageObject
action, action, equals, getConfigUrl, getJson, getJson, getJsonApiUrl, getNavigationLinks, hashCodeMethods inherited from class org.jenkinsci.test.acceptance.po.ConfigurablePageObject
apply, configure, configure, configure, configure, ensureConfigPage, getFormName, saveMethods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, ensureOpen, getContext, getJenkins, open, toString, url, url, visitMethods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isHiddenOrStale, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, runThenHandleDialog, runThenHandleInputDialog, runThenHandleUserPrompt, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
Field Details
-
jenkins
-
uploadPlugins
Deprecated.Blocks use ofMockUpdateCenter.Optional configuration value that selects whether to resolve plugins locally and upload to Jenkins (better performing when Jenkins is closer to the test execution), or install plugins from within Jenkins (more accurate testing.) -
forceRestart
@Inject(optional=true) @Named("forceRestartAfterPluginInstallation") public boolean forceRestart -
mockUpdateCenter
-
-
Constructor Details
-
PluginManager
-
-
Method Details
-
checkForUpdates
public void checkForUpdates()Force update the plugin update center metadata. -
installationStatus
-
installationStatus
- Returns:
- whether the plugin (in version greater or equal than specified) is installed
-
isInstalled
Deprecated. -
isInstalled
- Parameters:
specs- plugin ids with optional version (e.g. "ldap" or "ldap@1.8")- Returns:
- true, if plugin (in version greater or equal than specified) is installed
-
installPlugins
@Deprecated public boolean installPlugins(PluginSpec... specs) throws UpdateCenterMetadata.UnableToResolveDependencies, IOException Deprecated.Please be encouraged to useWithPluginsannotations to statically declare the required plugins you need. If you really do need to install plugins in the middle of a test, as opposed to be in the beginning, then this is the right method.The deprecation marker is to call attention to
WithPlugins. This method is not really deprecated.Installs specified plugins.- Returns:
- Always false.
- Throws:
UpdateCenterMetadata.UnableToResolveDependenciesIOException
-
getAvailableVersionForPlugin
-
installPlugin
Deprecated.Not used when runningMockUpdateCenter.Installs a plugin by uploading the *.jpi image. Can be use for corner cases to verify some behavior when very specific plugin versions are needed, for example to verify that a warning message is displayed when a risky and outdated plugin is installed on Jenkins.- Throws:
IOException
-
enablePlugin
Enable oder disable the specified plugin.- Parameters:
pluginName- plugin id (e.g. "ldap")state- enable plugin if true, disable plugin if false
-
MockUpdateCenter.