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

java.lang.Object
  extended by com.atlassian.jira.functest.framework.AbstractFuncTestUtil
      extended by com.atlassian.jira.functest.framework.assertions.LinkAssertionsImpl
All Implemented Interfaces:
LinkAssertions, FuncTestLogger

public class LinkAssertionsImpl
extends AbstractFuncTestUtil
implements LinkAssertions

Default implementation of the LinkAssertions interface.

Since:
v3.13

Field Summary
 
Fields inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
environmentData, FS, locators, logger, logIndentLevel, tester
 
Constructor Summary
LinkAssertionsImpl(net.sourceforge.jwebunit.WebTester tester, com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
           
 
Method Summary
 void assertLinkAtNodeContains(String xpath, String containsUrl)
          Assert that a link at specified xpath is present and location contains the given url.
 void assertLinkAtNodeEndsWith(String xpath, String endsWith)
          Assert that a link at specified xpath is present and location ends with given url.
 void assertLinkIdLocationEndsWith(String linkId, String endsWith)
          Assert that the passed link's destination ends with a the passed value.
 void assertLinkIdLocationMatchesRegex(String linkId, String regex)
          Assert that the passed link's destination matches the passed regex.
 void assertLinkIdQueryStringContainsJqlQuery(String linkId, String expectedJqlQuery)
           
 void assertLinkLocationEndsWith(String linkText, String endsWith)
          Assert that the passed link's destination ends with a the passed value.
 void assertLinkLocationEndsWith(com.meterware.httpunit.WebLink link, String endsWith)
          Assert that the passed link's destination ends with the passed value.
 void assertLinkNotPresentWithExactText(String xpath, String text)
          Assert that a link with the specified text is not present within the region of the given locator.
 void assertLinkPresentWithExactText(String xpath, String text)
          Assert that a link with the specified text is present within the region of the given locator.
 void assertLinkQueryStringContainsJqlQuery(com.meterware.httpunit.WebLink link, String expectedJqlQuery)
           
 void assertLinkTextQueryStringContainsJqlQuery(String xpath, String linkText, String expectedJqlQuery)
           
 
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

LinkAssertionsImpl

public LinkAssertionsImpl(net.sourceforge.jwebunit.WebTester tester,
                          com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
Method Detail

assertLinkLocationEndsWith

public void assertLinkLocationEndsWith(String linkText,
                                       String endsWith)
Description copied from interface: LinkAssertions
Assert that the passed link's destination ends with a the passed value.

Specified by:
assertLinkLocationEndsWith in interface LinkAssertions
Parameters:
linkText - the text of the link to test.
endsWith - the expected end of the link's destination.

assertLinkLocationEndsWith

public void assertLinkLocationEndsWith(com.meterware.httpunit.WebLink link,
                                       String endsWith)
Description copied from interface: LinkAssertions
Assert that the passed link's destination ends with the passed value.

Specified by:
assertLinkLocationEndsWith in interface LinkAssertions
Parameters:
link - the link to test.
endsWith - the expected end of the link's destination.

assertLinkAtNodeEndsWith

public void assertLinkAtNodeEndsWith(String xpath,
                                     String endsWith)
Description copied from interface: LinkAssertions
Assert that a link at specified xpath is present and location ends with given url. Note: consider using LinkAssertions.assertLinkAtNodeContains(String, String) instead as it is less sensitive to breakages caused by the addition of parameters such as XSRF token.

Specified by:
assertLinkAtNodeEndsWith in interface LinkAssertions
Parameters:
xpath - the XPath query to specify the anchor element. The xpath expression should end with an A element
endsWith - the expected end of the link's destination.

assertLinkAtNodeContains

public void assertLinkAtNodeContains(String xpath,
                                     String containsUrl)
Description copied from interface: LinkAssertions
Assert that a link at specified xpath is present and location contains the given url.

Specified by:
assertLinkAtNodeContains in interface LinkAssertions
Parameters:
xpath - the XPath query to specify the anchor element. The xpath expression should end with an A element
containsUrl - the expected url to be contained in the link's destination.

assertLinkIdQueryStringContainsJqlQuery

public void assertLinkIdQueryStringContainsJqlQuery(String linkId,
                                                    String expectedJqlQuery)
Specified by:
assertLinkIdQueryStringContainsJqlQuery in interface LinkAssertions

assertLinkTextQueryStringContainsJqlQuery

public void assertLinkTextQueryStringContainsJqlQuery(String xpath,
                                                      String linkText,
                                                      String expectedJqlQuery)
Specified by:
assertLinkTextQueryStringContainsJqlQuery in interface LinkAssertions

assertLinkQueryStringContainsJqlQuery

public void assertLinkQueryStringContainsJqlQuery(com.meterware.httpunit.WebLink link,
                                                  String expectedJqlQuery)
Specified by:
assertLinkQueryStringContainsJqlQuery in interface LinkAssertions

assertLinkIdLocationEndsWith

public void assertLinkIdLocationEndsWith(String linkId,
                                         String endsWith)
Description copied from interface: LinkAssertions
Assert that the passed link's destination ends with a the passed value.

Specified by:
assertLinkIdLocationEndsWith in interface LinkAssertions
Parameters:
linkId - the id to the link to check.
endsWith - the expected end of the link's destination.

assertLinkIdLocationMatchesRegex

public void assertLinkIdLocationMatchesRegex(String linkId,
                                             String regex)
Description copied from interface: LinkAssertions
Assert that the passed link's destination matches the passed regex.

Specified by:
assertLinkIdLocationMatchesRegex in interface LinkAssertions
Parameters:
linkId - the id to the link to check.
regex - the regular expression to use in the test.

assertLinkPresentWithExactText

public void assertLinkPresentWithExactText(String xpath,
                                           String text)
Description copied from interface: LinkAssertions
Assert that a link with the specified text is present within the region of the given locator.

Specified by:
assertLinkPresentWithExactText in interface LinkAssertions
Parameters:
xpath - the XPath query to narrow down the search. Should not contain the A element being searched for.
text - the exact text within the link.

assertLinkNotPresentWithExactText

public void assertLinkNotPresentWithExactText(String xpath,
                                              String text)
Description copied from interface: LinkAssertions
Assert that a link with the specified text is not present within the region of the given locator.

Specified by:
assertLinkNotPresentWithExactText in interface LinkAssertions
Parameters:
xpath - the XPath query to narrow down the search. Should not contain the A element being searched for.
text - the text within the link.


Copyright © 2002-2011 Atlassian. All Rights Reserved.