Package org.jenkinsci.test.acceptance.po
Class TopLevelItem
-
- All Implemented Interfaces:
CapybaraPortingLayer
public abstract class TopLevelItem extends ContainerPageObject
Super class for top level items. Top level items includeJob
s and other non-buildable items such asFolder
s. UseDescribable
annotation to register an implementation.
-
-
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 String
name
-
Fields inherited from class org.jenkinsci.test.acceptance.po.PageObject
jsonParser, url
-
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 TopLevelItem(com.google.inject.Injector injector, URL url, String name)
TopLevelItem(PageObject context, URL url, String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T extends TopLevelItem>
Tas(Class<T> type)
"Casts" this object into a subtype by creating the specified type.abstract void
delete()
void
description(String description, boolean withCodeMirror)
Changes the description.boolean
equals(Object other)
String
getDescription()
String
getDisplayName()
List<Parameter>
getParameters()
int
hashCode()
<T extends TopLevelItem>
TrenameTo(String newName)
Renames the job.void
setDescription(String description)
void
setDescription(String description, boolean withCodeMirror)
String
toString()
-
Methods inherited from class org.jenkinsci.test.acceptance.po.ContainerPageObject
action, action, getConfigUrl, getJson, getJson, getJsonApiUrl, getNavigationLinks
-
Methods inherited from class org.jenkinsci.test.acceptance.po.ConfigurablePageObject
apply, configure, configure, configure, configure, ensureConfigPage, getFormName, getSubmitButtonText, save
-
Methods inherited from class org.jenkinsci.test.acceptance.po.PageObject
control, control, createPageArea, createRandomName, getContext, getJenkins, open, url, url, visit
-
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
-
-
-
-
Field Detail
-
name
public String name
-
-
Constructor Detail
-
TopLevelItem
public TopLevelItem(PageObject context, URL url, String name)
-
-
Method Detail
-
renameTo
@CheckReturnValue public <T extends TopLevelItem> T renameTo(String newName)
Renames the job. Opens the configuration section, sets the name and saves the form. Finally the rename is confirmed.- Parameters:
newName
- the new name of the job- Returns:
- the renamed job (with new URL)
-
getDescription
public String getDescription()
-
description
public void description(String description, boolean withCodeMirror)
Changes the description. Opens the configuration section, sets the description and saves the form.- Parameters:
description
- the description of the jobwithCodeMirror
- if description field uses CodeMirror or not (depending on Markup Formatter)
-
setDescription
public void setDescription(String description)
-
setDescription
public void setDescription(String description, boolean withCodeMirror)
-
getDisplayName
public String getDisplayName()
-
as
public <T extends TopLevelItem> T as(Class<T> type)
"Casts" this object into a subtype by creating the specified type.
-
toString
public String toString()
- Overrides:
toString
in classPageObject
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classContainerPageObject
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classContainerPageObject
-
delete
public abstract void delete()
-
-