com.atlassian.jira.webtest.selenium.harness.util
Class IssueNavigationImpl

java.lang.Object
  extended by com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
      extended by com.atlassian.jira.webtest.selenium.harness.util.IssueNavigationImpl
All Implemented Interfaces:
IssueNavigation

public class IssueNavigationImpl
extends AbstractSeleniumPageObject
implements IssueNavigation

Provides utility methods for issue navigation.

Since:
v4.2

Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
assertThat, client, context
 
Constructor Summary
IssueNavigationImpl(SeleniumContext ctx, Navigator navigator)
           
 
Method Summary
 void attachFile(String fieldName, String fileName, int size)
          Attach a file given the input field name, fileName and file size.
 void attachFileInExistingForm(String fieldName, String fileName, int size)
          Attach a file given the input field name, fileName and file size.
 void attachFileWithComment(String fieldName, String fileName, int size, String comment, String commentLevel)
          Attach a file given the input field name, fileName and file size.
 List<String> attachFileWithErrors(String fieldName, String fileName, int size)
          Attach a file given the input field name, fileName and file size.
 void editIssue(String issueKey)
          Go to the edit screen of the issue specified
 List<String> getAttachmentErrors()
          Return a list of the current attachment errors.
 IssueNavigation viewIssue(String issueKey)
          View an issue by key and return a handle to this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssueNavigationImpl

public IssueNavigationImpl(SeleniumContext ctx,
                           Navigator navigator)
Method Detail

viewIssue

public IssueNavigation viewIssue(String issueKey)
Description copied from interface: IssueNavigation
View an issue by key and return a handle to this object

Specified by:
viewIssue in interface IssueNavigation
Parameters:
issueKey - the key of the issue to view
Returns:
this

attachFile

public void attachFile(String fieldName,
                       String fileName,
                       int size)
Description copied from interface: IssueNavigation
Attach a file given the input field name, fileName and file size. The file name can be an absolute path to an existing file, in which case the size will be ignored and the file found at that path will simply be attached. If no file exists yet, a file containing 'x' will be generated of the correct size.

Specified by:
attachFile in interface IssueNavigation
Parameters:
fieldName - The input field name
fileName - The fileName or absolute pat to attach
size - the size of the file to generate

attachFileInExistingForm

public void attachFileInExistingForm(String fieldName,
                                     String fileName,
                                     int size)
Description copied from interface: IssueNavigation
Attach a file given the input field name, fileName and file size. The file name can be an absolute path to an existing file, in which case the size will be ignored and the file found at that path will simply be attached. If no file exists yet, a file containing 'x' will be generated of the correct size. This will not try to pop open the attach file dialog, but simply expect that we're already on a form with the attach file field.

Specified by:
attachFileInExistingForm in interface IssueNavigation
Parameters:
fieldName - The input field name
fileName - The fileName or absolute pat to attach
size - the size of the file to generate

attachFileWithErrors

public List<String> attachFileWithErrors(String fieldName,
                                         String fileName,
                                         int size)
Description copied from interface: IssueNavigation
Attach a file given the input field name, fileName and file size. Rather than successfully attaching a file, this method should be used to assert errors when uploading a file.

Specified by:
attachFileWithErrors in interface IssueNavigation
Parameters:
fieldName - The input field name
fileName - The fileName or absolute pat to attach
size - the size of the file to generate
Returns:
the errors in the attachment.

getAttachmentErrors

public List<String> getAttachmentErrors()
Description copied from interface: IssueNavigation
Return a list of the current attachment errors. Empty list will be returned if no errors.

Specified by:
getAttachmentErrors in interface IssueNavigation
Returns:
a list of the current attachment errors. Empty list will be returned if no errors.

attachFileWithComment

public void attachFileWithComment(String fieldName,
                                  String fileName,
                                  int size,
                                  String comment,
                                  String commentLevel)
Description copied from interface: IssueNavigation
Attach a file given the input field name, fileName and file size. The file name can be an absolute path to an existing file, in which case the size will be ignored and the file found at that path will simply be attached. If no file exists yet, a file containing 'x' will be generated of the correct size. This method will also add a comment & commentLevel.

Specified by:
attachFileWithComment in interface IssueNavigation
Parameters:
fieldName - The input field name
fileName - The fileName or absolute pat to attach
size - the size of the file to generate
comment - the comment body
commentLevel - the security level for the comment.

editIssue

public void editIssue(String issueKey)
Description copied from interface: IssueNavigation
Go to the edit screen of the issue specified

Specified by:
editIssue in interface IssueNavigation
Parameters:
issueKey - the issue to edit


Copyright © 2002-2013 Atlassian. All Rights Reserved.