public abstract class

AbstractBulkChangeWizard

extends Object
implements BulkChangeWizard
java.lang.Object
   ↳ com.atlassian.jira.functest.framework.navigation.AbstractBulkChangeWizard
Known Direct Subclasses

Class Overview

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.

Summary

Constants
String BULK_EDIT_KEY
String SAME_FOR_ALL
String TARGET_PROJECT_ID
String TARGET_PROJECT_ID_TEMPLATE
Public Constructors
AbstractBulkChangeWizard()
Public Methods
BulkChangeWizard cancel()
Cancels the wizard.
BulkChangeWizard checkActionForField(String fieldName)
Check the "Action" checkbox for the chosen field.
BulkChangeWizard checkRetainForField(String fieldName)
Check the "Retain" checkbox for the chosen field.
BulkChangeWizard chooseOperation(BulkChangeWizard.BulkOperations operation)
Select the bulk operation to perform.
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.
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.
BulkChangeWizard revertTo(BulkChangeWizard.WizardState state)
Reverts the wizard to any given previous stage.
BulkChangeWizard selectAllIssues()
Selects all issues from the last search to operate on.
BulkChangeWizard setFieldValue(String fieldName, String value)
Set a value for a field.
BulkChangeWizard setFieldValue(BulkChangeWizard.InputTypes inputType, String fieldName, String value)
Set a value for a field.
Protected Methods
abstract void checkCheckbox(String checkboxName, String value)
abstract void checkCheckbox(String fieldName)
abstract void checkSameTargetForAllCheckbox()
abstract void chooseCustomRadioButton(String radiogroupName, String radiobuttonValue)
abstract void chooseOperationRadioButton(BulkChangeWizard.BulkOperations operation)
abstract void clickOnConfirm()
abstract void clickOnLinkId(String id)
abstract void clickOnLinkWithText(String linkText)
abstract void clickOnNext()
abstract boolean pageContainsText(String text)
abstract void selectAllIssueCheckboxes()
abstract void selectEachTargetProject(int numContextsToSelect, String projectName)
abstract void selectFirstTargetProject(String projectName)
abstract void setSelectElement(String fieldName, String value)
abstract void setTextElement(String fieldName, String value)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.functest.framework.navigation.BulkChangeWizard

Constants

protected static final String BULK_EDIT_KEY

Constant Value: "10000_1_"

protected static final String SAME_FOR_ALL

Constant Value: "sameAsBulkEditBean"

protected static final String TARGET_PROJECT_ID

Constant Value: "10000_1_pid"

protected static final String TARGET_PROJECT_ID_TEMPLATE

Constant Value: "10000_%d_pid"

Public Constructors

public AbstractBulkChangeWizard ()

Public Methods

public BulkChangeWizard cancel ()

Cancels the wizard. Simulates clicking on the cancel link.

Wizard must be in any state except COMPLETE.

Once performed the wizard will set itself to state COMPLETE.

Returns
  • the wizard.

public BulkChangeWizard checkActionForField (String fieldName)

Check the "Action" checkbox for the chosen field.

Wizard must be in EDIT, 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 finaliseFields().

Parameters
fieldName the name of the field
Returns
  • the wizard

public BulkChangeWizard checkRetainForField (String fieldName)

Check the "Retain" checkbox for the chosen field.

Wizard must be in MOVE, 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 finaliseFields().

Parameters
fieldName the name of the field
Returns
  • the wizard

public BulkChangeWizard chooseOperation (BulkChangeWizard.BulkOperations operation)

Select the bulk operation to perform.

Wizard must be in CHOOSE_OPERATION to perform this operation.

Once selected, the wizard will advance to CHOOSE_TARGET_CONTEXTS.

Parameters
operation the operation to perform
Returns
  • the wizard

public BulkChangeWizard chooseTargetContextForAll (String projectName)

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 MOVE, CHOOSE_TARGET_CONTEXTS to perform this operation.

Once selected, the wizard will advance to SET_FIELDS.

Parameters
projectName the name of the project to use in the target context e.g. monkey
Returns
  • the wizard

public BulkChangeWizard chooseTargetContextForEach (int numContextsToSelect, String projectName)

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 MOVE, CHOOSE_TARGET_CONTEXTS to perform this operation.

Once selected, the wizard will advance to SET_FIELDS.

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

public BulkChangeWizard chooseWorkflowTransition (BulkChangeWizard.BulkOperations workflowTransition)

Select the workflow transition to perform.

Wizard must be in CHOOSE_OPERATION to perform this operation.

Once selected, the wizard will advance

public BulkChangeWizard complete ()

Completes the wizard and performs the bulk operation.

Wizard must be in CONFIRMATION to perform this operation.

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

Returns
  • the wizard

public BulkChangeWizard finaliseFields ()

Completes the entering of fields in this screen.

Wizard must be in SET_FIELDS to perform this operation.

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

Returns
  • the wizard

public BulkChangeWizard.WizardState getState ()

Returns the current state of the wizard.

Returns
  • the state of the wizard.

public BulkChangeWizard revertTo (BulkChangeWizard.WizardState state)

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.

Returns
  • the wizard.

public BulkChangeWizard selectAllIssues ()

Selects all issues from the last search to operate on.

Wizard must be in SELECT_ISSUES to perform this operation.

Once selected, the wizard will advance to CHOOSE_OPERATION.

Returns
  • the wizard

public BulkChangeWizard setFieldValue (String fieldName, String value)

Set a value for a field. It is assumed that the field is settable via text input.

Wizard must be in 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 finaliseFields().

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

public BulkChangeWizard setFieldValue (BulkChangeWizard.InputTypes inputType, String fieldName, String value)

Set a value for a field.

Wizard must be in 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 finaliseFields().

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

Protected Methods

protected abstract void checkCheckbox (String checkboxName, String value)

protected abstract void checkCheckbox (String fieldName)

protected abstract void checkSameTargetForAllCheckbox ()

protected abstract void chooseCustomRadioButton (String radiogroupName, String radiobuttonValue)

protected abstract void chooseOperationRadioButton (BulkChangeWizard.BulkOperations operation)

protected abstract void clickOnConfirm ()

protected abstract void clickOnLinkId (String id)

protected abstract void clickOnLinkWithText (String linkText)

protected abstract void clickOnNext ()

protected abstract boolean pageContainsText (String text)

protected abstract void selectAllIssueCheckboxes ()

protected abstract void selectEachTargetProject (int numContextsToSelect, String projectName)

protected abstract void selectFirstTargetProject (String projectName)

protected abstract void setSelectElement (String fieldName, String value)

protected abstract void setTextElement (String fieldName, String value)