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 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 check
      expectedChangeHistoryRecord - A ExpectedChangeHistoryRecord item
    • 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 in
      authorName - - key name of the author
      expectedChangeHistoryItems - - A list of ExpectedChangeHistoryItem items
    • assertLastChangeHistoryRecords

      void assertLastChangeHistoryRecords(String issueKey, List expectedChangeHistoryRecords)
      Useful to check that a number of change history items exist for a given issue.
      Parameters:
      issueKey - The issue to check
      expectedChangeHistoryRecords - A list of ExpectedChangeHistoryRecords
    • getIssueNavigatorAssertions

      IssueNavigatorAssertions getIssueNavigatorAssertions()
      Return an object that can be used to make assertions about the navigator.
      Returns:
      an object that can be used to make assertions about the navigator.
    • 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 like navigation.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

      void assertEquals(String failureMesg, List expected, List actual)
    • assertProfileLinkPresent

      void assertProfileLinkPresent(String id, String linkText)
      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 profileLink
      linkText - The Text of the profileLink (usually the user's full name).
    • assertNodeExists

      void assertNodeExists(String xpath)
      Asserts that a node exists under the xpath expression given
      Parameters:
      xpath - The xpath expression to evaluate
    • assertNodeDoesNotExist

      void assertNodeDoesNotExist(String xpath)
      Asserts that a node does not exist under the xpath expression given
      Parameters:
      xpath - The xpath expression to evaluate
    • assertNodeHasText

      void assertNodeHasText(String xpath, String textToTest)
      Asserts that a node under the xpath expression given contains the given text
      Parameters:
      xpath - The xpath expression to evaluate
      textToTest - The text to test for
    • assertNodeDoesNotHaveText

      void assertNodeDoesNotHaveText(String xpath, String textToTest)
      Asserts that a node under the xpath expression given does not contain the given text
      Parameters:
      xpath - The xpath expression to evaluate
      textToTest - The text to test for
    • assertNodeByIdExists

      void assertNodeByIdExists(String id)
      Asserts that a given node exists
      Parameters:
      id - the id of the node
    • assertNodeByIdDoesNotExist

      void assertNodeByIdDoesNotExist(String id)
      Asserts that a given node does not exists
      Parameters:
      id - the id of the node
    • assertNodeByIdEquals

      void assertNodeByIdEquals(String id, String textToTest)
      Asserts that a given node exactly equals the given text
      Parameters:
      id - The id of the node to test
      textToTest - The text to test for
    • assertNodeByIdHasText

      void assertNodeByIdHasText(String id, String textToTest)
      Asserts that a given node contains the given text
      Parameters:
      id - The id of the node to test
      textToTest - The text to test for
    • assertNodeByIdDoesNotHaveText

      void assertNodeByIdDoesNotHaveText(String id, String textToTest)
      Asserts that a given node exists but does not contain the given text
      Parameters:
      id - The id of the node to test
      textToTest - The text to test for
    • assertNodeExists

      void assertNodeExists(Locator locator)
      Asserts that a given node exists
      Parameters:
      locator - the locator for the node
    • assertNodeDoesNotExist

      void assertNodeDoesNotExist(Locator locator)
      Asserts that a given node does not exists
      Parameters:
      locator - the locator for the node
    • assertNodeEquals

      void assertNodeEquals(Locator locator, String textToTest)
      Asserts that a given node exactly equals the given text
      Parameters:
      locator - The locator that contains text
      textToTest - The text to test for
    • assertNodeHasText

      void assertNodeHasText(Locator locator, String textToTest)
      Asserts that a given node contains the given text
      Parameters:
      locator - The locator that contains text
      textToTest - The text to test for
    • assertNodeDoesNotHaveText

      void assertNodeDoesNotHaveText(Locator locator, String textToTest)
      Asserts that a given node exists but does not contain the given text
      Parameters:
      locator - The locator to test
      textToTest - The text to test for
    • assertSubmitButtonPresentWithText

      void assertSubmitButtonPresentWithText(String buttonId, String buttonText)
      Check that the button with the id provided has the text provided as its value.
      Parameters:
      buttonId - The id of the button to locate
      buttonText - 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

      CommentAssertions comments(Iterable<String> 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

      CommentAssertions comments(String... 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

      HTML assertions.
      Returns:
      HTML assertions.
    • text

      Text assertions. Shortcut for getTextAssertions().
      Returns:
      text assertions.
    • link

      Link assertions. Shortcut for getLinkAssertions().
      Returns:
      link assertions.
    • forms

      Form assertions. Shortcut for getJiraFormAssertions().
      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