com.atlassian.jira.functest.framework.assertions
Class ViewIssueAssertions

java.lang.Object
  extended by com.atlassian.jira.functest.framework.AbstractFuncTestUtil
      extended by com.atlassian.jira.functest.framework.assertions.ViewIssueAssertions
All Implemented Interfaces:
com.atlassian.jira.testkit.client.log.FuncTestLogger

public class ViewIssueAssertions
extends AbstractFuncTestUtil

Makes assertions on the View Issue page.

Since:
v3.13.5

Field Summary
 
Fields inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
environmentData, FS, locators, logger, logIndentLevel
 
Constructor Summary
ViewIssueAssertions(net.sourceforge.jwebunit.WebTester tester, Assertions assertions, JIRAEnvironmentData environmentData)
           
 
Method Summary
 void assertAffectsVersionAbsent()
           
 void assertAffectsVersions(String expected)
          Asserts that the actual value for the "Affects Version/s" field in this View Issue page is equal to the given expected version.
 void assertAffectsVersionsNone()
          Asserts that the value for the "Affects Version/s" field in this View Issue page is "None".
 void assertAssignee(String userFullName)
           
 void assertComponents(String expected)
          Asserts that the actual value for the "Component/s" field in this View Issue page is equal to the given expected component.
 void assertComponentsAbsent()
           
 void assertComponentsNone()
           
 void assertCustomFieldValue(String fieldId, String expected)
          Asserts the value for a custom field.
 void assertEnvironmentEquals(String expected)
           
 void assertFixVersionAbsent()
           
 void assertFixVersions(String expected)
          Asserts that the actual value for the "Fix Version/s" field in this View Issue page is equal to the given expected version.
 void assertFixVersionsNone()
          Asserts that the value for the "Fix Version/s" field in this View Issue page is "None".
 void assertInwardLinkNotPresent(String issueKey)
           
 void assertInwardLinkPresent(String issueKey)
           
 void assertOnViewIssuePage(String issueKey)
           
 void assertOutwardLinkNotPresent(String issueKey)
           
 void assertOutwardLinkPresent(String issueKey)
           
 void assertStatus(String expectedStatus)
          Assert that current issue status is equal to expectedStatus.
 void assertSummary(String summary)
           
 void assertTimeTrackingInfo(String original, String remaining, String logged)
          Asserts the time tracking info shown in the module on the View Issue screen.
 String getAffectsVersionsText()
          Returns the Text for the "Affects Version/s" in this View Issue page.
 String getComponentsText()
           
 String getFixVersionsText()
           
 List<String> getInwardLinks()
          Returns a list of Issue Keys that are inward links.
 List<String> getOutwardLinks()
          Returns a list of Issue Keys that are outward links.
 
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

ViewIssueAssertions

public ViewIssueAssertions(net.sourceforge.jwebunit.WebTester tester,
                           Assertions assertions,
                           JIRAEnvironmentData environmentData)
Method Detail

assertOnViewIssuePage

public void assertOnViewIssuePage(String issueKey)

assertAssignee

public void assertAssignee(String userFullName)

assertStatus

public void assertStatus(String expectedStatus)
Assert that current issue status is equal to expectedStatus.

Parameters:
expectedStatus - expected issue status

assertOutwardLinkPresent

public void assertOutwardLinkPresent(String issueKey)

assertOutwardLinkNotPresent

public void assertOutwardLinkNotPresent(String issueKey)

getOutwardLinks

public List<String> getOutwardLinks()
Returns a list of Issue Keys that are outward links.

Returns:
a list of Issue Keys that are outward links.

assertInwardLinkPresent

public void assertInwardLinkPresent(String issueKey)

assertInwardLinkNotPresent

public void assertInwardLinkNotPresent(String issueKey)

getInwardLinks

public List<String> getInwardLinks()
Returns a list of Issue Keys that are inward links.

Returns:
a list of Issue Keys that are inward links.

assertAffectsVersions

public void assertAffectsVersions(String expected)
Asserts that the actual value for the "Affects Version/s" field in this View Issue page is equal to the given expected version.

If you expect multiple versions then you should separate them with a comma and space, eg "1.0, 1.1, 2.0". If you expect no affected versions, then give the String "None", or use assertAffectsVersionsNone().

Parameters:
expected - The expected Affects Version(s)
See Also:
getAffectsVersionsText(), assertFixVersions(String)

assertAffectsVersionsNone

public void assertAffectsVersionsNone()
Asserts that the value for the "Affects Version/s" field in this View Issue page is "None".

Alternative to calling assertAffectsVersions("None")

See Also:
assertAffectsVersions(String)

getAffectsVersionsText

public String getAffectsVersionsText()
Returns the Text for the "Affects Version/s" in this View Issue page.

Note that the text has whitespace collapsed, so it will return values like "1.0, 1.1, 2.0". If there are no affected versions set, then the value returned is whatever the page displays (currently "None").

Returns:
the Text for the "Affects Version/s" in this View Issue page.
See Also:
assertAffectsVersions(String)

assertFixVersions

public void assertFixVersions(String expected)
Asserts that the actual value for the "Fix Version/s" field in this View Issue page is equal to the given expected version.

If you expect multiple versions then you should separate them with a comma and space, eg "1.0, 1.1, 2.0". If you expect no fix versions, then give the String "None", or use assertFixVersionsNone().

Parameters:
expected - The expected version(s)
See Also:
getFixVersionsText(), assertAffectsVersions(String)

assertCustomFieldValue

public void assertCustomFieldValue(String fieldId,
                                   String expected)
Asserts the value for a custom field.

Parameters:
fieldId - the field id e.g. customfield_10000
expected - The expected value

assertFixVersionsNone

public void assertFixVersionsNone()
Asserts that the value for the "Fix Version/s" field in this View Issue page is "None".

Alternative to calling assertFixVersions("None")

See Also:
assertFixVersions(String)

getFixVersionsText

public String getFixVersionsText()

assertComponents

public void assertComponents(String expected)
Asserts that the actual value for the "Component/s" field in this View Issue page is equal to the given expected component.

If you expect multiple components then you should separate them with a comma and space, eg "1.0, 1.1, 2.0". If you expect no components, then give the String "None", or use assertComponentsNone().

Parameters:
expected - The expected component(s)

assertComponentsNone

public void assertComponentsNone()
See Also:
assertComponents(String)

getComponentsText

public String getComponentsText()

assertEnvironmentEquals

public void assertEnvironmentEquals(String expected)

assertTimeTrackingInfo

public void assertTimeTrackingInfo(String original,
                                   String remaining,
                                   String logged)
Asserts the time tracking info shown in the module on the View Issue screen. Note: time tracking values should be in short-hand format e.g. 2h, 4d 35m

Parameters:
original - the original estimate - the value that appears under "Estimated"
remaining - the remaining estimate - the value that appears under "Remaining"
logged - the time spent - the value that appears under "Logged"

assertComponentsAbsent

public void assertComponentsAbsent()

assertFixVersionAbsent

public void assertFixVersionAbsent()

assertAffectsVersionAbsent

public void assertAffectsVersionAbsent()

assertSummary

public void assertSummary(String summary)


Copyright © 2002-2014 Atlassian. All Rights Reserved.