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 voidcheckCheckbox(String fieldName) protected voidcheckCheckbox(String checkboxName, String value) checkRetainForField(String fieldName) Check the "Retain" checkbox for the chosen field.protected voidprotected voidchooseCustomRadioButton(String radiogroupName, String radiobuttonValue) chooseOperation(BulkChangeWizard.BulkOperations operation) Select the bulk operation to perform.protected voidchooseTargetContextForAll(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 voidprotected voidclickOnLinkId(String id) protected voidclickOnLinkWithText(String linkText) protected voidcomplete()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 booleanpageContainsText(String text) Reverts the wizard to any given previous stage.protected voidSelects all issues from the last search to operate on.protected voidselectEachTargetProject(int numContextsToSelect, String projectName) protected voidselectFirstTargetProject(String projectName) protected voidselectIssueType(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 voidsetSelectElement(String fieldName, String value) protected voidsetTextElement(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:BulkChangeWizardSelects all issues from the last search to operate on. Wizard must be inBulkChangeWizard.WizardState.SELECT_ISSUESto perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.CHOOSE_OPERATION.- Specified by:
selectAllIssuesin interfaceBulkChangeWizard- Returns:
- the wizard
-
chooseTargetContextForAll
Description copied from interface:BulkChangeWizardChooses 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_CONTEXTSto perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS.- Specified by:
chooseTargetContextForAllin 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:BulkChangeWizardChooses 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_CONTEXTSto perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS.- Specified by:
chooseTargetContextForAllin 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:BulkChangeWizardChooses 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_CONTEXTSto perform this operation. Once selected, the wizard will advance toBulkChangeWizard.WizardState.SET_FIELDS.- Specified by:
chooseTargetContextForEachin 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:BulkChangeWizardSet a value for a field. It is assumed that the field is settable via text input. Wizard must be inBulkChangeWizard.WizardState.SET_FIELDSto 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:
setFieldValuein interfaceBulkChangeWizard- Parameters:
fieldName- the name of the field to set e.g.components,timetracking_originalestimatevalue- the value to set e.g.10000,5h- Returns:
- the wizard
- See Also:
-
checkRetainForField
Description copied from interface:BulkChangeWizardCheck the "Retain" checkbox for the chosen field. Wizard must be inBulkChangeWizard.BulkOperationsImpl.MOVE,BulkChangeWizard.WizardState.SET_FIELDSto 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:
checkRetainForFieldin interfaceBulkChangeWizard- Parameters:
fieldName- the name of the field- Returns:
- the wizard
-
checkActionForField
Description copied from interface:BulkChangeWizardCheck the "Action" checkbox for the chosen field. Wizard must be inBulkChangeWizard.BulkOperationsImpl.EDIT,BulkChangeWizard.WizardState.SET_FIELDSto 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:
checkActionForFieldin interfaceBulkChangeWizard- Parameters:
fieldName- the name of the field- Returns:
- the wizard
-
finaliseFields
Description copied from interface:BulkChangeWizardCompletes the entering of fields in this screen. Wizard must be inBulkChangeWizard.WizardState.SET_FIELDSto 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:
finaliseFieldsin interfaceBulkChangeWizard- Returns:
- the wizard
-
complete
Description copied from interface:BulkChangeWizardCompletes the wizard and performs the bulk operation. Wizard must be inBulkChangeWizard.WizardState.CONFIRMATIONto 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:
completein interfaceBulkChangeWizard- Returns:
- the wizard
-
waitForBulkChangeCompletion
Description copied from interface:BulkChangeWizardWaits until the bulk changes are completed.Wizard must be in
BulkChangeWizard.WizardState.COMPLETEstate to perform this operation.This operation doesn't change the wizard state.
- Specified by:
waitForBulkChangeCompletionin interfaceBulkChangeWizard- Returns:
- the wizard
-
cancel
Description copied from interface:BulkChangeWizardCancels 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:
cancelin interfaceBulkChangeWizard- Returns:
- the wizard.
- See Also:
-
getState
Description copied from interface:BulkChangeWizardReturns the current state of the wizard.- Specified by:
getStatein 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
-