Class BulkChangeWizardImpl
java.lang.Object
com.atlassian.jira.functest.framework.navigation.BulkChangeWizardImpl
- All Implemented Interfaces:
BulkChangeWizard
Implementation of the Bulk Change Wizard for Functional Tests. Works with basic cases of Bulk Move and Bulk Edit, but
it needs improvement to work for other things!
Stateful. Not injected into test classes.
- 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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBulkChangeWizardImpl
(net.sourceforge.jwebunit.WebTester tester, JIRAEnvironmentData environmentData) -
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancels the wizard.checkActionForField
(String fieldName) Check the "Action" checkbox for the chosen field.protected void
checkCheckbox
(String fieldName) protected void
checkCheckbox
(String checkboxName, String value) checkRetainForField
(String fieldName) Check the "Retain" checkbox for the chosen field.protected void
protected void
chooseCustomRadioButton
(String radiogroupName, String radiobuttonValue) chooseOperation
(BulkChangeWizard.BulkOperations operation) Select the bulk operation to perform.protected void
chooseTargetContextForAll
(String projectName) Chooses the target project for all issues to be moved to.chooseTargetContextForAll
(String projectName, String issueType) Chooses the target project and issue type for all issues to be moved to.chooseTargetContextForEach
(int numContextsToSelect, String projectName) Chooses the target project to be moved to for each of the issue types to be moved.chooseWorkflowTransition
(BulkChangeWizard.BulkOperations workflowTransition) Select the workflow transition to perform.protected void
protected void
clickOnLinkId
(String id) protected void
clickOnLinkWithText
(String linkText) protected void
complete()
Completes the wizard and performs the bulk operation.Completes the entering of fields in this screen.getState()
Returns the current state of the wizard.protected boolean
pageContainsText
(String text) Reverts the wizard to any given previous stage.protected void
Selects all issues from the last search to operate on.protected void
selectEachTargetProject
(int numContextsToSelect, String projectName) protected void
selectFirstTargetProject
(String projectName) protected void
selectIssueType
(String issueType) setFieldValue
(BulkChangeWizard.InputTypes inputType, String fieldName, String value) Set a value for a field.setFieldValue
(String fieldName, String value) Set a value for a field.protected void
setSelectElement
(String fieldName, String value) protected void
setTextElement
(String fieldName, String value) Waits until the bulk changes are completed.
-
Field Details
-
BULK_EDIT_KEY
- See Also:
-
TARGET_PROJECT_ID
- See Also:
-
ISSUE_TYPE_SELECT
- See Also:
-
TARGET_PROJECT_ID_TEMPLATE
- See Also:
-
-
Constructor Details
-
BulkChangeWizardImpl
public BulkChangeWizardImpl(net.sourceforge.jwebunit.WebTester tester, JIRAEnvironmentData environmentData)
-
-
Method Details
-
selectAllIssues
Description copied from interface:BulkChangeWizard
Selects all issues from the last search to operate on. Wizard must be inBulkChangeWizard.WizardState.SELECT_ISSUES
to perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.CHOOSE_OPERATION
.- Specified by:
selectAllIssues
in interfaceBulkChangeWizard
- Returns:
- the wizard
-
chooseTargetContextForAll
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 inBulkChangeWizard.BulkOperationsImpl.MOVE
,BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS
to perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS
.- Specified by:
chooseTargetContextForAll
in interfaceBulkChangeWizard
- Parameters:
projectName
- the name of the project to use in the target context e.g.monkey
- Returns:
- the wizard
-
chooseTargetContextForAll
Description copied from interface:BulkChangeWizard
Chooses the target project and issue type 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 inBulkChangeWizard.BulkOperationsImpl.MOVE
,BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS
to perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS
.- Specified by:
chooseTargetContextForAll
in interfaceBulkChangeWizard
- Parameters:
projectName
- the name of the project to use in the target context e.g.monkey
- Returns:
- the wizard
-
chooseTargetContextForEach
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 inBulkChangeWizard.BulkOperationsImpl.MOVE
,BulkChangeWizard.WizardState.CHOOSE_TARGET_CONTEXTS
to perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS
.- Specified by:
chooseTargetContextForEach
in interfaceBulkChangeWizard
- 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
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 inBulkChangeWizard.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, callBulkChangeWizard.finaliseFields()
.- Specified by:
setFieldValue
in interfaceBulkChangeWizard
- 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:
-
checkRetainForField
Description copied from interface:BulkChangeWizard
Check the "Retain" checkbox for the chosen field. Wizard must be inBulkChangeWizard.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, callBulkChangeWizard.finaliseFields()
.- Specified by:
checkRetainForField
in interfaceBulkChangeWizard
- Parameters:
fieldName
- the name of the field- Returns:
- the wizard
-
checkActionForField
Description copied from interface:BulkChangeWizard
Check the "Action" checkbox for the chosen field. Wizard must be inBulkChangeWizard.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, callBulkChangeWizard.finaliseFields()
.- Specified by:
checkActionForField
in interfaceBulkChangeWizard
- Parameters:
fieldName
- the name of the field- Returns:
- the wizard
-
finaliseFields
Description copied from interface:BulkChangeWizard
Completes the entering of fields in this screen. Wizard must be inBulkChangeWizard.WizardState.SET_FIELDS
to perform this operation. If there are more field screens to complete, the wizard will remain inBulkChangeWizard.WizardState.SET_FIELDS
. Otherwise, it will advance toBulkChangeWizard.WizardState.CONFIRMATION
.- Specified by:
finaliseFields
in interfaceBulkChangeWizard
- Returns:
- the wizard
-
complete
Description copied from interface:BulkChangeWizard
Completes the wizard and performs the bulk operation. Wizard must be inBulkChangeWizard.WizardState.CONFIRMATION
to perform this operation. Once performed, the wizard will advance toBulkChangeWizard.WizardState.COMPLETE
. There is no further state to advance to after this. This wizard instance should not be used again.- Specified by:
complete
in interfaceBulkChangeWizard
- Returns:
- the wizard
-
waitForBulkChangeCompletion
Description copied from interface:BulkChangeWizard
Waits until the bulk changes are completed.Wizard must be in
BulkChangeWizard.WizardState.COMPLETE
state to perform this operation.This operation doesn't change the wizard state.
- Specified by:
waitForBulkChangeCompletion
in interfaceBulkChangeWizard
- Returns:
- the wizard
-
cancel
Description copied from interface:BulkChangeWizard
Cancels the wizard. Simulates clicking on the cancel link. Wizard must be in any state exceptBulkChangeWizard.WizardState.COMPLETE
. Once performed the wizard will set itself to stateBulkChangeWizard.WizardState.COMPLETE
.- Specified by:
cancel
in interfaceBulkChangeWizard
- Returns:
- the wizard.
- See Also:
-
getState
Description copied from interface:BulkChangeWizard
Returns the current state of the wizard.- Specified by:
getState
in interfaceBulkChangeWizard
- Returns:
- the state of the wizard.
-
clickOnNext
protected void clickOnNext() -
clickOnConfirm
protected void clickOnConfirm() -
selectAllIssueCheckboxes
protected void selectAllIssueCheckboxes() -
chooseCustomRadioButton
-
selectFirstTargetProject
-
selectIssueType
-
selectEachTargetProject
-
checkSameTargetForAllCheckbox
protected void checkSameTargetForAllCheckbox() -
setTextElement
-
setSelectElement
-
checkCheckbox
-
checkCheckbox
-
pageContainsText
-
clickOnLinkId
-
clickOnLinkWithText
-