public class AssertionsImpl extends Object implements Assertions
Assertions
Constructor and Description |
---|
AssertionsImpl(net.sourceforge.jwebunit.WebTester tester,
JIRAEnvironmentData environmentData,
Navigation navigation,
LocatorFactory locator,
Backdoor backdoor) |
Modifier and Type | Method and Description |
---|---|
void |
assertEquals(String failureMessage,
List expected,
List actual)
Elaboration of assertEquals for lists with nicer messages.
|
void |
assertHttpStatusCode(com.atlassian.httpclient.api.HttpStatus code)
Check that the last response returned the provided HTTP status code.
|
void |
assertLastChangeHistoryRecords(String issueKey,
ExpectedChangeHistoryRecord expectedChangeHistoryRecord)
Useful to check that a particular change history item exists for a given issue.
|
void |
assertLastChangeHistoryRecords(String issueKey,
List expectedChangeHistoryRecords)
Useful to check that a number of change history items exist for a given issue.
|
void |
assertNodeByIdDoesNotExist(String id)
Asserts that a given node does not exists
|
void |
assertNodeByIdDoesNotHaveText(String id,
String textToTest)
Asserts that a given node exists but does not contain the given text
|
void |
assertNodeByIdEquals(String id,
String textToTest)
Asserts that a given node exactly equals the given text
|
void |
assertNodeByIdExists(String id)
Asserts that a given node exists
|
void |
assertNodeByIdHasText(String id,
String textToTest)
Asserts that a given node contains the given text
|
void |
assertNodeDoesNotExist(Locator locator)
Asserts that a given node does not exists
|
void |
assertNodeDoesNotExist(String xpath)
Asserts that a node does not exist under the xpath expression given
|
void |
assertNodeDoesNotHaveText(Locator locator,
String textToTest)
Asserts that a given node exists but does not contain the given text
|
void |
assertNodeDoesNotHaveText(String xpath,
String textToTest)
Asserts that a node under the xpath expression given does not contain the given text
|
void |
assertNodeEquals(Locator locator,
String textToTest)
Asserts that a given node exactly equals the given text
|
void |
assertNodeExists(Locator locator)
Asserts that a given node exists
|
void |
assertNodeExists(String xpath)
Asserts that a node exists under the xpath expression given
|
void |
assertNodeHasText(Locator locator,
String textToTest)
Asserts that a given node contains the given text
|
void |
assertNodeHasText(String xpath,
String textToTest)
Asserts that a node under the xpath expression given contains the given text
|
void |
assertProfileLinkPresent(String id,
String linkText)
Checks that a profile link with the given ID and link Text exists on the page.
|
void |
assertSubmitButtonPresentWithText(String buttonId,
String buttonText)
Check that the button with the id provided has the text provided as its value.
|
CommentAssertions |
comments(Iterable<String> comments)
Returns an object that can be used to make assertions on a specified group of comments.
|
CommentAssertions |
comments(String... comments)
Returns an object that can be used to make assertions on a specified group of comments.
|
JiraFormAssertions |
forms()
Form assertions.
|
DashboardAssertions |
getDashboardAssertions() |
IssueNavigatorAssertions |
getIssueNavigatorAssertions()
Return an object that can be used to make assertions about the navigator.
|
JiraFormAssertions |
getJiraFormAssertions() |
JiraMessageAssertions |
getJiraMessageAssertions() |
LabelAssertions |
getLabelAssertions() |
LinkAssertions |
getLinkAssertions() |
ProjectFieldsAssertions |
getProjectFieldsAssertions() |
RequestAssertions |
getRequestAssertions() |
SidebarAssertions |
getSidebarAssertions() |
TableAssertions |
getTableAssertions() |
TextAssertions |
getTextAssertions() |
URLAssertions |
getURLAssertions() |
UserAssertions |
getUserAssertions() |
ViewIssueAssertions |
getViewIssueAssertions()
Returns an object that can be used to make assertions on the "View Issue" page.
|
HTMLAssertions |
html()
HTML assertions.
|
LinkAssertions |
link()
Link assertions.
|
PluginAssertions |
plugins()
Returns an object that can be used to make assertions about P2 plugins.
|
TextAssertions |
text()
Text assertions.
|
@Inject public AssertionsImpl(net.sourceforge.jwebunit.WebTester tester, JIRAEnvironmentData environmentData, Navigation navigation, LocatorFactory locator, Backdoor backdoor)
public void assertLastChangeHistoryRecords(String issueKey, ExpectedChangeHistoryRecord expectedChangeHistoryRecord)
Assertions
assertLastChangeHistoryRecords
in interface Assertions
issueKey
- The issue to checkexpectedChangeHistoryRecord
- A ExpectedChangeHistoryRecord
itempublic CommentAssertions comments(Iterable<String> comments)
Assertions
comments
in interface Assertions
comments
- The comments that will be used in the assertions.public CommentAssertions comments(String... comments)
Assertions
comments
in interface Assertions
comments
- The comments that will be used in the assertions.public void assertLastChangeHistoryRecords(String issueKey, List expectedChangeHistoryRecords)
Assertions
assertLastChangeHistoryRecords
in interface Assertions
issueKey
- The issue to checkexpectedChangeHistoryRecords
- A list of ExpectedChangeHistoryRecord
spublic HTMLAssertions html()
Assertions
html
in interface Assertions
public TextAssertions text()
Assertions
Assertions.getTextAssertions()
.text
in interface Assertions
public LinkAssertions link()
Assertions
Assertions.getLinkAssertions()
.link
in interface Assertions
public JiraFormAssertions forms()
Assertions
Assertions.getJiraFormAssertions()
.forms
in interface Assertions
public PluginAssertions plugins()
Assertions
plugins
in interface Assertions
public IssueNavigatorAssertions getIssueNavigatorAssertions()
Assertions
getIssueNavigatorAssertions
in interface Assertions
public ViewIssueAssertions getViewIssueAssertions()
Assertions
navigation.issue().viewIssue("RAT-1")
to get to the required Issue.getViewIssueAssertions
in interface Assertions
IssueNavigation.viewIssue(String)
public DashboardAssertions getDashboardAssertions()
getDashboardAssertions
in interface Assertions
public JiraFormAssertions getJiraFormAssertions()
getJiraFormAssertions
in interface Assertions
public JiraMessageAssertions getJiraMessageAssertions()
getJiraMessageAssertions
in interface Assertions
public ProjectFieldsAssertions getProjectFieldsAssertions()
getProjectFieldsAssertions
in interface Assertions
public URLAssertions getURLAssertions()
getURLAssertions
in interface Assertions
public TextAssertions getTextAssertions()
getTextAssertions
in interface Assertions
public LinkAssertions getLinkAssertions()
getLinkAssertions
in interface Assertions
public LabelAssertions getLabelAssertions()
getLabelAssertions
in interface Assertions
public TableAssertions getTableAssertions()
getTableAssertions
in interface Assertions
public UserAssertions getUserAssertions()
getUserAssertions
in interface Assertions
public RequestAssertions getRequestAssertions()
getRequestAssertions
in interface Assertions
public SidebarAssertions getSidebarAssertions()
getSidebarAssertions
in interface Assertions
public void assertEquals(String failureMessage, List expected, List actual)
assertEquals
in interface Assertions
failureMessage
- The message (prefix) to use to describe a failure.expected
- the expected list.actual
- the actual list to be tested.public void assertProfileLinkPresent(String id, String linkText)
Assertions
assertProfileLinkPresent
in interface Assertions
id
- The id of the profileLinklinkText
- The Text of the profileLink (usually the user's full name).public void assertNodeByIdExists(String id)
Assertions
assertNodeByIdExists
in interface Assertions
id
- the id of the nodepublic void assertNodeByIdDoesNotExist(String id)
Assertions
assertNodeByIdDoesNotExist
in interface Assertions
id
- the id of the nodepublic void assertNodeByIdEquals(String id, String textToTest)
Assertions
assertNodeByIdEquals
in interface Assertions
id
- The id of the node to testtextToTest
- The text to test forpublic void assertNodeByIdHasText(String id, String textToTest)
Assertions
assertNodeByIdHasText
in interface Assertions
id
- The id of the node to testtextToTest
- The text to test forpublic void assertNodeByIdDoesNotHaveText(String id, String textToTest)
Assertions
assertNodeByIdDoesNotHaveText
in interface Assertions
id
- The id of the node to testtextToTest
- The text to test forpublic void assertNodeExists(String xpath)
Assertions
assertNodeExists
in interface Assertions
xpath
- The xpath expression to evaluatepublic void assertNodeDoesNotExist(String xpath)
Assertions
assertNodeDoesNotExist
in interface Assertions
xpath
- The xpath expression to evaluatepublic void assertNodeHasText(String xpath, String textToTest)
Assertions
assertNodeHasText
in interface Assertions
xpath
- The xpath expression to evaluatetextToTest
- The text to test forpublic void assertNodeDoesNotHaveText(String xpath, String textToTest)
Assertions
assertNodeDoesNotHaveText
in interface Assertions
xpath
- The xpath expression to evaluatetextToTest
- The text to test forpublic void assertNodeExists(Locator locator)
Assertions
assertNodeExists
in interface Assertions
locator
- the locator for the nodepublic void assertNodeDoesNotExist(Locator locator)
Assertions
assertNodeDoesNotExist
in interface Assertions
locator
- the locator for the nodepublic void assertNodeEquals(Locator locator, String textToTest)
Assertions
assertNodeEquals
in interface Assertions
locator
- The locator that contains texttextToTest
- The text to test forpublic void assertNodeHasText(Locator locator, String textToTest)
Assertions
assertNodeHasText
in interface Assertions
locator
- The locator that contains texttextToTest
- The text to test forpublic void assertNodeDoesNotHaveText(Locator locator, String textToTest)
Assertions
assertNodeDoesNotHaveText
in interface Assertions
locator
- The locator to testtextToTest
- The text to test forpublic void assertSubmitButtonPresentWithText(String buttonId, String buttonText)
Assertions
assertSubmitButtonPresentWithText
in interface Assertions
buttonId
- The id of the button to locatebuttonText
- The text the button should contain as its valuepublic void assertHttpStatusCode(com.atlassian.httpclient.api.HttpStatus code)
Assertions
assertHttpStatusCode
in interface Assertions
Copyright © 2002-2021 Atlassian. All Rights Reserved.