com.atlassian.jira.functest.framework.navigation
Class AbstractBulkChangeWizard

java.lang.Object
  extended by com.atlassian.jira.functest.framework.navigation.AbstractBulkChangeWizard
All Implemented Interfaces:
BulkChangeWizard
Direct Known Subclasses:
BulkChangeWizardImpl

public abstract class AbstractBulkChangeWizard
extends Object
implements BulkChangeWizard

Abstract implementation of the BulkChangeWizard. Defines the state and operations of the wizard. Specific details on how to drive the wizard are supplied by the implementations for func tests and selenium tests.

Since:
v4.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.functest.framework.navigation.BulkChangeWizard
BulkChangeWizard.BulkOperations, BulkChangeWizard.BulkOperationsCustom, BulkChangeWizard.BulkOperationsImpl, BulkChangeWizard.InputTypes, BulkChangeWizard.WizardState
 
Field Summary
protected static String BULK_EDIT_KEY
           
protected static String SAME_FOR_ALL
           
protected static String TARGET_PROJECT_ID
           
protected static String TARGET_PROJECT_ID_TEMPLATE
           
 
Constructor Summary
AbstractBulkChangeWizard()
           
 
Method Summary
 BulkChangeWizard cancel()
          Cancels the wizard.
 BulkChangeWizard checkActionForField(String fieldName)
          Check the "Action" checkbox for the chosen field.
protected abstract  void checkCheckbox(String fieldName)
           
protected abstract  void checkCheckbox(String checkboxName, String value)
           
 BulkChangeWizard checkRetainForField(String fieldName)
          Check the "Retain" checkbox for the chosen field.
protected abstract  void checkSameTargetForAllCheckbox()
           
protected abstract  void chooseCustomRadioButton(String radiogroupName, String radiobuttonValue)
           
 BulkChangeWizard chooseOperation(BulkChangeWizard.BulkOperations operation)
          Select the bulk operation to perform.
protected abstract  void chooseOperationRadioButton(BulkChangeWizard.BulkOperations operation)
           
 BulkChangeWizard chooseTargetContextForAll(String projectName)
          Chooses the target project for all issues to be moved to.
 BulkChangeWizard chooseTargetContextForEach(int numContextsToSelect, String projectName)
          Chooses the target project to be moved to for each of the issue types to be moved.
 BulkChangeWizard chooseWorkflowTransition(BulkChangeWizard.BulkOperations workflowTransition)
          Select the workflow transition to perform.
protected abstract  void clickOnConfirm()
           
protected abstract  void clickOnLinkId(String id)
           
protected abstract  void clickOnLinkWithText(String linkText)
           
protected abstract  void clickOnNext()
           
 BulkChangeWizard complete()
          Completes the wizard and performs the bulk operation.
 BulkChangeWizard finaliseFields()
          Completes the entering of fields in this screen.
 BulkChangeWizard.WizardState getState()
          Returns the current state of the wizard.
protected abstract  boolean pageContainsText(String text)
           
 BulkChangeWizard revertTo(BulkChangeWizard.WizardState state)
          Reverts the wizard to any given previous stage.
protected abstract  void selectAllIssueCheckboxes()
           
 BulkChangeWizard selectAllIssues()
          Selects all issues from the last search to operate on.
protected abstract  void selectEachTargetProject(int numContextsToSelect, String projectName)
           
protected abstract  void selectFirstTargetProject(String projectName)
           
 BulkChangeWizard setFieldValue(BulkChangeWizard.InputTypes inputType, String fieldName, String value)
          Set a value for a field.
 BulkChangeWizard setFieldValue(String fieldName, String value)
          Set a value for a field.
protected abstract  void setSelectElement(String fieldName, String value)
           
protected abstract  void setTextElement(String fieldName, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAME_FOR_ALL

protected static final String SAME_FOR_ALL
See Also:
Constant Field Values

BULK_EDIT_KEY

protected static final String BULK_EDIT_KEY
See Also:
Constant Field Values

TARGET_PROJECT_ID

protected static final String TARGET_PROJECT_ID
See Also:
Constant Field Values

TARGET_PROJECT_ID_TEMPLATE

protected static final String TARGET_PROJECT_ID_TEMPLATE
See Also:
Constant Field Values
Constructor Detail

AbstractBulkChangeWizard

public AbstractBulkChangeWizard()
Method Detail

selectAllIssues

public BulkChangeWizard selectAllIssues()
Description copied from interface: BulkChangeWizard
Selects all issues from the last search to operate on.

Wizard must be in BulkChangeWizard.WizardState.SELECT_ISSUES to perform this operation.

Once selected, the wizard will advance to BulkChangeWizard.WizardState.CHOOSE_OPERATION.

Specified by:
selectAllIssues in interface BulkChangeWizard
Returns:
the wizard

chooseOperation

public BulkChangeWizard chooseOperation(BulkChangeWizard.BulkOperations operation)
Description copied from interface: BulkChangeWizard
Select the bulk operation to perform.

Wizard must be in BulkChangeWizard.WizardState.CHOOSE_OPERATION to perform this operation.

Once selected, the wizard will advance to BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS.

Specified by:
chooseOperation in interface BulkChangeWizard
Parameters:
operation - the operation to perform
Returns:
the wizard

chooseWorkflowTransition

public BulkChangeWizard chooseWorkflowTransition(BulkChangeWizard.BulkOperations workflowTransition)
Description copied from interface: BulkChangeWizard
Select the workflow transition to perform.

Wizard must be in BulkChangeWizard.WizardState.CHOOSE_OPERATION to perform this operation.

Once selected, the wizard will advance

Specified by:
chooseWorkflowTransition in interface BulkChangeWizard
Returns:

chooseTargetContextForAll

public BulkChangeWizard chooseTargetContextForAll(String projectName)
Description copied from interface: BulkChangeWizard
Chooses the target project for all issues to be moved to. The target issue type will remain as the default selected item. This target context will apply to all issues being moved.

WARN: note that this only currently works when you are moving issues from Homosapien project, and when that is the only source project context offered on the page.

Wizard must be in BulkChangeWizard.BulkOperationsImpl.MOVE, BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS to perform this operation.

Once selected, the wizard will advance to BulkChangeWizard.WizardState.SET_FIELDS.

Specified by:
chooseTargetContextForAll in interface BulkChangeWizard
Parameters:
projectName - the name of the project to use in the target context e.g. monkey
Returns:
the wizard

chooseTargetContextForEach

public BulkChangeWizard chooseTargetContextForEach(int numContextsToSelect,
                                                   String projectName)
Description copied from interface: BulkChangeWizard
Chooses the target project to be moved to for each of the issue types to be moved. This target context will apply to all issues being moved, preserving issue types mapping.

WARN: note that this only currently works when you are moving issues from Homosapien project, and when that is the only source project context offered on the page.

Wizard must be in BulkChangeWizard.BulkOperationsImpl.MOVE, BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS to perform this operation.

Once selected, the wizard will advance to BulkChangeWizard.WizardState.SET_FIELDS.

Specified by:
chooseTargetContextForEach in interface BulkChangeWizard
Parameters:
numContextsToSelect - the expected number of contexts to be set.
projectName - the name of the project to use in the target context e.g. monkey
Returns:
the wizard

setFieldValue

public BulkChangeWizard setFieldValue(String fieldName,
                                      String value)
Description copied from interface: BulkChangeWizard
Set a value for a field. It is assumed that the field is settable via text input.

Wizard must be in BulkChangeWizard.WizardState.SET_FIELDS to perform this operation.

Note: wizard does not advance after this operation; multiple calls to this method can be made. Once finished, call BulkChangeWizard.finaliseFields().

Specified by:
setFieldValue in interface BulkChangeWizard
Parameters:
fieldName - the name of the field to set e.g. components, timetracking_originalestimate
value - the value to set e.g. 10000, 5h
Returns:
the wizard
See Also:
BulkChangeWizard.finaliseFields(), BulkChangeWizard.setFieldValue(com.atlassian.jira.functest.framework.navigation.BulkChangeWizard.InputTypes, String, String)

setFieldValue

public BulkChangeWizard setFieldValue(BulkChangeWizard.InputTypes inputType,
                                      String fieldName,
                                      String value)
Description copied from interface: BulkChangeWizard
Set a value for a field.

Wizard must be in BulkChangeWizard.WizardState.SET_FIELDS to perform this operation.

Note: wizard does not advance after this operation; multiple calls to this method can be made. Once finished, call BulkChangeWizard.finaliseFields().

Specified by:
setFieldValue in interface BulkChangeWizard
Parameters:
inputType - the type of control you are using to set the field value
fieldName - the name of the field to set e.g. components, timetracking_originalestimate
value - the value to set e.g. 10000, 5h
Returns:
the wizard
See Also:
BulkChangeWizard.finaliseFields()

checkRetainForField

public BulkChangeWizard checkRetainForField(String fieldName)
Description copied from interface: BulkChangeWizard
Check the "Retain" checkbox for the chosen field.

Wizard must be in BulkChangeWizard.BulkOperationsImpl.MOVE, BulkChangeWizard.WizardState.SET_FIELDS to perform this operation.

Note: wizard does not advance after this operation; multiple calls to this method can be made. Once finished, call BulkChangeWizard.finaliseFields().

Specified by:
checkRetainForField in interface BulkChangeWizard
Parameters:
fieldName - the name of the field
Returns:
the wizard

checkActionForField

public BulkChangeWizard checkActionForField(String fieldName)
Description copied from interface: BulkChangeWizard
Check the "Action" checkbox for the chosen field.

Wizard must be in BulkChangeWizard.BulkOperationsImpl.EDIT, BulkChangeWizard.WizardState.SET_FIELDS to perform this operation.

Note: wizard does not advance after this operation; multiple calls to this method can be made. Once finished, call BulkChangeWizard.finaliseFields().

Specified by:
checkActionForField in interface BulkChangeWizard
Parameters:
fieldName - the name of the field
Returns:
the wizard

finaliseFields

public BulkChangeWizard finaliseFields()
Description copied from interface: BulkChangeWizard
Completes the entering of fields in this screen.

Wizard must be in BulkChangeWizard.WizardState.SET_FIELDS to perform this operation.

If there are more field screens to complete, the wizard will remain in BulkChangeWizard.WizardState.SET_FIELDS. Otherwise, it will advance to BulkChangeWizard.WizardState.CONFIRMATION.

Specified by:
finaliseFields in interface BulkChangeWizard
Returns:
the wizard

complete

public BulkChangeWizard complete()
Description copied from interface: BulkChangeWizard
Completes the wizard and performs the bulk operation.

Wizard must be in BulkChangeWizard.WizardState.CONFIRMATION to perform this operation.

Once performed, the wizard will advance to BulkChangeWizard.WizardState.COMPLETE. There is no further state to advance to after this. This wizard instance should not be used again.

Specified by:
complete in interface BulkChangeWizard
Returns:
the wizard

revertTo

public BulkChangeWizard revertTo(BulkChangeWizard.WizardState state)
Description copied from interface: BulkChangeWizard
Reverts the wizard to any given previous stage.

Wizard must be in any state that is further than the requested state.

Once performed, wizard will revert to the desired state.

Specified by:
revertTo in interface BulkChangeWizard
Returns:
the wizard.

cancel

public BulkChangeWizard cancel()
Description copied from interface: BulkChangeWizard
Cancels the wizard. Simulates clicking on the cancel link.

Wizard must be in any state except BulkChangeWizard.WizardState.COMPLETE.

Once performed the wizard will set itself to state BulkChangeWizard.WizardState.COMPLETE.

Specified by:
cancel in interface BulkChangeWizard
Returns:
the wizard.
See Also:
BulkChangeWizard.complete()

clickOnNext

protected abstract void clickOnNext()

clickOnConfirm

protected abstract void clickOnConfirm()

clickOnLinkId

protected abstract void clickOnLinkId(String id)

clickOnLinkWithText

protected abstract void clickOnLinkWithText(String linkText)

selectAllIssueCheckboxes

protected abstract void selectAllIssueCheckboxes()

chooseOperationRadioButton

protected abstract void chooseOperationRadioButton(BulkChangeWizard.BulkOperations operation)

chooseCustomRadioButton

protected abstract void chooseCustomRadioButton(String radiogroupName,
                                                String radiobuttonValue)

selectFirstTargetProject

protected abstract void selectFirstTargetProject(String projectName)

selectEachTargetProject

protected abstract void selectEachTargetProject(int numContextsToSelect,
                                                String projectName)

checkSameTargetForAllCheckbox

protected abstract void checkSameTargetForAllCheckbox()

setTextElement

protected abstract void setTextElement(String fieldName,
                                       String value)

setSelectElement

protected abstract void setSelectElement(String fieldName,
                                         String value)

checkCheckbox

protected abstract void checkCheckbox(String fieldName)

checkCheckbox

protected abstract void checkCheckbox(String checkboxName,
                                      String value)

pageContainsText

protected abstract boolean pageContainsText(String text)

getState

public BulkChangeWizard.WizardState getState()
Description copied from interface: BulkChangeWizard
Returns the current state of the wizard.

Specified by:
getState in interface BulkChangeWizard
Returns:
the state of the wizard.


Copyright © 2002-2014 Atlassian. All Rights Reserved.