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
public class LatestBuildsPortlet extends AbstractDashboardViewPortlet
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
Fields Modifier and Type Field Description static int
NUMBER_OF_BUILDS
Default number of latest builds to show.static String
PORTLET_NAME
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
Constructors Constructor Description LatestBuildsPortlet(DashboardView parent, String path)
Constructs a new latest builds portlet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumberOfBuilds()
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
hasJob(String jobName)
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
openJob(String jobName)
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, 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 Detail
-
PORTLET_NAME
public static final String PORTLET_NAME
Default name of this Portlet.- See Also:
- Constant Field Values
-
NUMBER_OF_BUILDS
public static final int NUMBER_OF_BUILDS
Default number of latest builds to show.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LatestBuildsPortlet
public LatestBuildsPortlet(DashboardView parent, String path)
Constructs a new latest builds portlet.- Parameters:
parent
- Parent dashboard view this portlet is scoped to.path
- Absolute path to the area.
-
-
Method Detail
-
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
public boolean hasJob(String jobName)
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
public void openJob(String jobName)
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.
-
-