Class LatestBuildsPortlet
java.lang.Object
org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
org.jenkinsci.test.acceptance.po.PageAreaImpl
org.jenkinsci.test.acceptance.plugins.dashboard_view.AbstractDashboardViewPortlet
org.jenkinsci.test.acceptance.plugins.dashboard_view.LatestBuildsPortlet
- All Implemented Interfaces:
CapybaraPortingLayer
,Control.Owner
,PageArea
The basic latest builds portlet shipped with the dashboard view plugin.
- Author:
- Rene Zarwel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default number of latest builds to show.static final String
Default name of this Portlet.Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
Constructor Summary
ConstructorDescriptionLatestBuildsPortlet
(DashboardView parent, String path) Constructs a new latest builds portlet. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of builds of the portlet.org.openqa.selenium.WebElement
getTable()
Gets the latest builds table asWebElement
.boolean
hasBuild
(int buildNr) Returns true if this Portlet contains a build with the given number.boolean
Returns true if this Portlet contains a job with the given name.void
openBuild
(int buildNr) Opens the build with the given number, if it exists in the Portlet.void
Opens the job with the given name, if it exists in the Portlet.void
setNumberOfBuilds
(int number) Sets the number of builds of the portlet.Methods inherited from class org.jenkinsci.test.acceptance.plugins.dashboard_view.AbstractDashboardViewPortlet
delete, getName, setName
Methods inherited from class org.jenkinsci.test.acceptance.po.PageAreaImpl
control, control, createPageArea, getPage, getPath, getPath, getPath, path, self
Methods 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, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, executeScript, fillIn, find, findIfNotVisible, getElement, getPageSource, last, lastIfNotVisible, runThenConfirmAlert, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
Field Details
-
PORTLET_NAME
Default name of this Portlet.- See Also:
-
NUMBER_OF_BUILDS
public static final int NUMBER_OF_BUILDSDefault number of latest builds to show.- See Also:
-
-
Constructor Details
-
LatestBuildsPortlet
Constructs a new latest builds portlet.- Parameters:
parent
- Parent dashboard view this portlet is scoped to.path
- Absolute path to the area.
-
-
Method Details
-
getTable
public org.openqa.selenium.WebElement getTable()Gets the latest builds table asWebElement
.- Returns:
- latest builds table
-
setNumberOfBuilds
public void setNumberOfBuilds(int number) Sets the number of builds of the portlet.- Parameters:
number
- the number of builds of the portlet
-
getNumberOfBuilds
public int getNumberOfBuilds()Returns the number of builds of the portlet.- Returns:
- the number of builds of the portlet
-
hasJob
Returns true if this Portlet contains a job with the given name.- Parameters:
jobName
- Name of the job to look for.- Returns:
- True, if this Portlet contains a job with the given name.
-
hasBuild
public boolean hasBuild(int buildNr) Returns true if this Portlet contains a build with the given number.- Parameters:
buildNr
- Number of the build to look for.- Returns:
- True, if this Portlet contains a build with the given number.
-
openJob
Opens the job with the given name, if it exists in the Portlet.- Parameters:
jobName
- Name of the job to open.
-
openBuild
public void openBuild(int buildNr) Opens the build with the given number, if it exists in the Portlet.- Parameters:
buildNr
- number of the build to open.
-