Interface Assertions
- All Known Implementing Classes:
AssertionsImpl
public interface Assertions
A set of "extended" assertions within JIRA web functional testing. Also note we have a very similar interface
called
TextAssertions that deals with text assertions specifically.- Since:
- v3.13
-
Method Summary
Modifier and TypeMethodDescriptionvoidassertEquals(String failureMesg, List expected, List actual) voidassertHttpStatusCode(com.atlassian.httpclient.api.HttpStatus code) Check that the last response returned the provided HTTP status code.voidassertLastChangeHistoryRecords(String issueKey, ExpectedChangeHistoryRecord expectedChangeHistoryRecord) Useful to check that a particular change history item exists for a given issue.voidassertLastChangeHistoryRecords(String issueKey, List expectedChangeHistoryRecords) Useful to check that a number of change history items exist for a given issue.voidassertNewestChangeHistoryRecord(String issueKey, String authorName, List<ExpectedChangeHistoryItem> expectedChangeHistoryItems) Useful to check if newest change history entry exists with proper values.voidAsserts that a given node does not existsvoidassertNodeByIdDoesNotHaveText(String id, String textToTest) Asserts that a given node exists but does not contain the given textvoidassertNodeByIdEquals(String id, String textToTest) Asserts that a given node exactly equals the given textvoidAsserts that a given node existsvoidassertNodeByIdHasText(String id, String textToTest) Asserts that a given node contains the given textvoidassertNodeDoesNotExist(Locator locator) Asserts that a given node does not existsvoidassertNodeDoesNotExist(String xpath) Asserts that a node does not exist under the xpath expression givenvoidassertNodeDoesNotHaveText(Locator locator, String textToTest) Asserts that a given node exists but does not contain the given textvoidassertNodeDoesNotHaveText(String xpath, String textToTest) Asserts that a node under the xpath expression given does not contain the given textvoidassertNodeEquals(Locator locator, String textToTest) Asserts that a given node exactly equals the given textvoidassertNodeExists(Locator locator) Asserts that a given node existsvoidassertNodeExists(String xpath) Asserts that a node exists under the xpath expression givenvoidassertNodeHasText(Locator locator, String textToTest) Asserts that a given node contains the given textvoidassertNodeHasText(String xpath, String textToTest) Asserts that a node under the xpath expression given contains the given textvoidassertProfileLinkPresent(String id, String linkText) Checks that a profile link with the given ID and link Text exists on the page.voidassertSubmitButtonPresentWithText(String buttonId, String buttonText) Check that the button with the id provided has the text provided as its value.Returns an object that can be used to make assertions on a specified group of comments.Returns an object that can be used to make assertions on a specified group of comments.forms()Form assertions.Return an object that can be used to make assertions about the navigator.Returns an object that can be used to make assertions on the "View Issue" page.html()HTML assertions.link()Link assertions.plugins()Returns an object that can be used to make assertions about P2 plugins.text()Text assertions.
-
Method Details
-
assertLastChangeHistoryRecords
void assertLastChangeHistoryRecords(String issueKey, ExpectedChangeHistoryRecord expectedChangeHistoryRecord) Useful to check that a particular change history item exists for a given issue.- Parameters:
issueKey- The issue to checkexpectedChangeHistoryRecord- AExpectedChangeHistoryRecorditem
-
assertNewestChangeHistoryRecord
void assertNewestChangeHistoryRecord(String issueKey, String authorName, List<ExpectedChangeHistoryItem> expectedChangeHistoryItems) Useful to check if newest change history entry exists with proper values.- Parameters:
issueKey- - issue to check history entries inauthorName- - key name of the authorexpectedChangeHistoryItems- - A list ofExpectedChangeHistoryItemitems
-
assertLastChangeHistoryRecords
Useful to check that a number of change history items exist for a given issue.- Parameters:
issueKey- The issue to checkexpectedChangeHistoryRecords- A list ofExpectedChangeHistoryRecords
-
getViewIssueAssertions
ViewIssueAssertions getViewIssueAssertions()Returns an object that can be used to make assertions on the "View Issue" page. It is assumed that you are already on the View Issue page. If not, then use something likenavigation.issue().viewIssue("RAT-1")to get to the required Issue.- Returns:
- an object that can be used to make assertions on the "View Issue" page.
- See Also:
-
getDashboardAssertions
DashboardAssertions getDashboardAssertions()- Returns:
- an object that can be used to make assertions about Dashboard pages
-
getJiraFormAssertions
JiraFormAssertions getJiraFormAssertions()- Returns:
- an object that can be used to make assertions about JIRA forms
-
getJiraMessageAssertions
JiraMessageAssertions getJiraMessageAssertions()- Returns:
- an object that can be used to make assertions about JIRA messages
-
getProjectFieldsAssertions
ProjectFieldsAssertions getProjectFieldsAssertions()- Returns:
- an object that can be used to make assertions about Project and Issue Type fields
-
getURLAssertions
URLAssertions getURLAssertions()- Returns:
- an object that can be used to make assertions about the current JIRA url.
-
getTextAssertions
TextAssertions getTextAssertions()- Returns:
- an object that can be used for text assertions.
-
getLinkAssertions
LinkAssertions getLinkAssertions()- Returns:
- an object that can be used to make assertions about links.
-
getLabelAssertions
LabelAssertions getLabelAssertions()- Returns:
- an object that can be used to make assertions about labels.
-
getUserAssertions
UserAssertions getUserAssertions()- Returns:
- an object that can be used to make assertions about users.
-
getTableAssertions
TableAssertions getTableAssertions()- Returns:
- an object that can be used to make assertions about tables.
-
getRequestAssertions
RequestAssertions getRequestAssertions()- Returns:
- an object that can be used to make assertions about requests, headers etc.
-
getSidebarAssertions
SidebarAssertions getSidebarAssertions()- Returns:
- an object that can be used to make assertions about the sidebar
-
assertEquals
-
assertProfileLinkPresent
Checks that a profile link with the given ID and link Text exists on the page. Also clicks the link and checks that the user's profile with linkText shows up.- Parameters:
id- The id of the profileLinklinkText- The Text of the profileLink (usually the user's full name).
-
assertNodeExists
Asserts that a node exists under the xpath expression given- Parameters:
xpath- The xpath expression to evaluate
-
assertNodeDoesNotExist
Asserts that a node does not exist under the xpath expression given- Parameters:
xpath- The xpath expression to evaluate
-
assertNodeHasText
Asserts that a node under the xpath expression given contains the given text- Parameters:
xpath- The xpath expression to evaluatetextToTest- The text to test for
-
assertNodeDoesNotHaveText
Asserts that a node under the xpath expression given does not contain the given text- Parameters:
xpath- The xpath expression to evaluatetextToTest- The text to test for
-
assertNodeByIdExists
Asserts that a given node exists- Parameters:
id- the id of the node
-
assertNodeByIdDoesNotExist
Asserts that a given node does not exists- Parameters:
id- the id of the node
-
assertNodeByIdEquals
Asserts that a given node exactly equals the given text- Parameters:
id- The id of the node to testtextToTest- The text to test for
-
assertNodeByIdHasText
Asserts that a given node contains the given text- Parameters:
id- The id of the node to testtextToTest- The text to test for
-
assertNodeByIdDoesNotHaveText
Asserts that a given node exists but does not contain the given text- Parameters:
id- The id of the node to testtextToTest- The text to test for
-
assertNodeExists
Asserts that a given node exists- Parameters:
locator- the locator for the node
-
assertNodeDoesNotExist
Asserts that a given node does not exists- Parameters:
locator- the locator for the node
-
assertNodeEquals
Asserts that a given node exactly equals the given text- Parameters:
locator- The locator that contains texttextToTest- The text to test for
-
assertNodeHasText
Asserts that a given node contains the given text- Parameters:
locator- The locator that contains texttextToTest- The text to test for
-
assertNodeDoesNotHaveText
Asserts that a given node exists but does not contain the given text- Parameters:
locator- The locator to testtextToTest- The text to test for
-
assertSubmitButtonPresentWithText
Check that the button with the id provided has the text provided as its value.- Parameters:
buttonId- The id of the button to locatebuttonText- The text the button should contain as its value
-
assertHttpStatusCode
void assertHttpStatusCode(com.atlassian.httpclient.api.HttpStatus code) Check that the last response returned the provided HTTP status code. -
comments
Returns an object that can be used to make assertions on a specified group of comments.- Parameters:
comments- The comments that will be used in the assertions.- Returns:
- a {CommentAssertions} object that can be used to make assertions on a specified group of comments.
-
comments
Returns an object that can be used to make assertions on a specified group of comments.- Parameters:
comments- The comments that will be used in the assertions.- Returns:
- a {CommentAssertions} object that can be used to make assertions on a specified group of comments.
-
html
HTMLAssertions html()HTML assertions.- Returns:
- HTML assertions.
-
text
TextAssertions text()Text assertions. Shortcut forgetTextAssertions().- Returns:
- text assertions.
-
link
LinkAssertions link()Link assertions. Shortcut forgetLinkAssertions().- Returns:
- link assertions.
-
forms
JiraFormAssertions forms()Form assertions. Shortcut forgetJiraFormAssertions().- Returns:
- form assertions
-
plugins
PluginAssertions plugins()Returns an object that can be used to make assertions about P2 plugins.- Returns:
- see above
- Since:
- 7.4
-