|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.functest.framework.AbstractFuncTestUtil
com.atlassian.jira.functest.framework.assertions.AssertionsImpl
public class AssertionsImpl
Implementation of Assertions
| Field Summary |
|---|
| Fields inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil |
|---|
environmentData, FS, locators, logger, logIndentLevel, tester |
| Constructor Summary | |
|---|---|
AssertionsImpl(net.sourceforge.jwebunit.WebTester tester,
com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData,
Navigation navigation,
LocatorFactory locator)
|
|
| Method Summary | |
|---|---|
void |
assertEquals(String failureMessage,
List expected,
List actual)
Elaboration of assertEquals for lists with nicer messages. |
void |
assertLastChangeHistoryRecords(String issueKey,
com.atlassian.jira.webtests.ztests.workflow.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. |
void |
dumpResponse(junit.framework.TestCase testCase,
net.sourceforge.jwebunit.WebTester tester,
Throwable cause)
This will "dump" the current contents of the WebTester including the Throwable
'cause'. |
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()
|
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()
|
| Methods inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil |
|---|
childLogIndentLevel, getAssertions, getEnvironmentData, getFuncTestHelperFactory, getLogger, log, log, navigation, submitAtPage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssertionsImpl(net.sourceforge.jwebunit.WebTester tester,
com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData,
Navigation navigation,
LocatorFactory locator)
| Method Detail |
|---|
public void dumpResponse(junit.framework.TestCase testCase,
net.sourceforge.jwebunit.WebTester tester,
Throwable cause)
AssertionsWebTester including the Throwable
'cause'.
DONT LEAVE THESE CALLS IN THE TESTS. You should really only use this if you are debugging your test code. if you
dont remove them, then you will generate "unwarranted" test artifacts in Bamboo.
dumpResponse in interface AssertionstestCase - the TestCase in playtester - the WebTester in playcause - an optional cause for dumping the response
public void assertLastChangeHistoryRecords(String issueKey,
com.atlassian.jira.webtests.ztests.workflow.ExpectedChangeHistoryRecord expectedChangeHistoryRecord)
Assertions
assertLastChangeHistoryRecords in interface AssertionsissueKey - The issue to checkexpectedChangeHistoryRecord - A ExpectedChangeHistoryRecord
itempublic CommentAssertions comments(Iterable<String> comments)
Assertions
comments in interface Assertionscomments - The comments that will be used in the assertions.
public void assertLastChangeHistoryRecords(String issueKey,
List expectedChangeHistoryRecords)
Assertions
assertLastChangeHistoryRecords in interface AssertionsissueKey - The issue to checkexpectedChangeHistoryRecords - A list of ExpectedChangeHistoryRecordspublic HTMLAssertions html()
html in interface Assertionspublic IssueNavigatorAssertions getIssueNavigatorAssertions()
Assertions
getIssueNavigatorAssertions in interface Assertionspublic ViewIssueAssertions getViewIssueAssertions()
Assertions 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.
getViewIssueAssertions in interface AssertionsIssueNavigation.viewIssue(String)public DashboardAssertions getDashboardAssertions()
getDashboardAssertions in interface Assertionspublic JiraFormAssertions getJiraFormAssertions()
getJiraFormAssertions in interface Assertionspublic JiraMessageAssertions getJiraMessageAssertions()
getJiraMessageAssertions in interface Assertionspublic URLAssertions getURLAssertions()
getURLAssertions in interface Assertionspublic TextAssertions getTextAssertions()
getTextAssertions in interface Assertionspublic LinkAssertions getLinkAssertions()
getLinkAssertions in interface Assertionspublic LabelAssertions getLabelAssertions()
getLabelAssertions in interface Assertionspublic TableAssertions getTableAssertions()
getTableAssertions in interface Assertionspublic UserAssertions getUserAssertions()
getUserAssertions in interface Assertions
public void assertEquals(String failureMessage,
List expected,
List actual)
assertEquals in interface AssertionsfailureMessage - 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 Assertionsid - 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 Assertionsid - the id of the nodepublic void assertNodeByIdDoesNotExist(String id)
Assertions
assertNodeByIdDoesNotExist in interface Assertionsid - the id of the node
public void assertNodeByIdEquals(String id,
String textToTest)
Assertions
assertNodeByIdEquals in interface Assertionsid - The id of the node to testtextToTest - The text to test for
public void assertNodeByIdHasText(String id,
String textToTest)
Assertions
assertNodeByIdHasText in interface Assertionsid - The id of the node to testtextToTest - The text to test for
public void assertNodeByIdDoesNotHaveText(String id,
String textToTest)
Assertions
assertNodeByIdDoesNotHaveText in interface Assertionsid - The id of the node to testtextToTest - The text to test forpublic void assertNodeExists(String xpath)
Assertions
assertNodeExists in interface Assertionsxpath - The xpath expression to evaluatepublic void assertNodeDoesNotExist(String xpath)
Assertions
assertNodeDoesNotExist in interface Assertionsxpath - The xpath expression to evaluate
public void assertNodeHasText(String xpath,
String textToTest)
Assertions
assertNodeHasText in interface Assertionsxpath - The xpath expression to evaluatetextToTest - The text to test for
public void assertNodeDoesNotHaveText(String xpath,
String textToTest)
Assertions
assertNodeDoesNotHaveText in interface Assertionsxpath - The xpath expression to evaluatetextToTest - The text to test forpublic void assertNodeExists(Locator locator)
Assertions
assertNodeExists in interface Assertionslocator - the locator for the nodepublic void assertNodeDoesNotExist(Locator locator)
Assertions
assertNodeDoesNotExist in interface Assertionslocator - the locator for the node
public void assertNodeEquals(Locator locator,
String textToTest)
Assertions
assertNodeEquals in interface Assertionslocator - The locator that contains texttextToTest - The text to test for
public void assertNodeHasText(Locator locator,
String textToTest)
Assertions
assertNodeHasText in interface Assertionslocator - The locator that contains texttextToTest - The text to test for
public void assertNodeDoesNotHaveText(Locator locator,
String textToTest)
Assertions
assertNodeDoesNotHaveText in interface Assertionslocator - The locator to testtextToTest - The text to test for
public void assertSubmitButtonPresentWithText(String buttonId,
String buttonText)
Assertions
assertSubmitButtonPresentWithText in interface AssertionsbuttonId - The id of the button to locatebuttonText - The text the button should contain as its value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||