com.atlassian.jira.webtest.selenium.framework.dialogs
Class AbstractIssueDialog<T extends AbstractIssueDialog<T>>

java.lang.Object
  extended by com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
      extended by com.atlassian.jira.webtest.selenium.framework.dialogs.AbstractDialog<T>
          extended by com.atlassian.jira.webtest.selenium.framework.dialogs.AbstractSubmittableDialog<T>
              extended by com.atlassian.jira.webtest.selenium.framework.dialogs.AbstractIssueDialog<T>
All Implemented Interfaces:
Cancelable<SubmittableDialog>, LocalizablePageObject, PageObject, Submittable<SubmittableDialog>, Dialog, IssueActionDialog, SubmittableDialog
Direct Known Subclasses:
AddCommentDialog, AttachFileDialog, EditLabelsDialog, GenericDialog, LinkIssueDialog, LogWorkDialog, WorkflowTransitionDialog

public abstract class AbstractIssueDialog<T extends AbstractIssueDialog<T>>
extends AbstractSubmittableDialog<T>
implements IssueActionDialog

Base class for utility classes representing JIRA issue action dialogs.

Since:
v4.2

Field Summary
protected  ActionsDialog actionsDialog
           
protected static String DIALOG_CONTENT_READY_SELECTOR
           
protected  IssueNavigator issueNavigator
           
protected  ViewIssue viewIssue
           
protected static String VISIBLE_DIALOG_CONTENT_SELECTOR
           
 
Fields inherited from class com.atlassian.jira.webtest.selenium.framework.core.AbstractSeleniumPageObject
assertThat, client, context
 
Constructor Summary
AbstractIssueDialog(LegacyIssueOperation issueOperation, Class<T> targetType, ActionType afterSubmit, SeleniumContext ctx)
           
 
Method Summary
 String actionName()
          Gets name of the dialog in the Actions Dialog list.
 void assertNotOpen()
          Assert that no dialog is currently open on the page.
 void assertReady()
           
 String cancelTriggerLocator()
          Cancel button locator within the dialog.
 boolean isOpenable()
          Test if the dialog can be opened at the current location.
 LegacyIssueOperation issueOperation()
          Returns issue operation associated with this particular dialog.
 Dialog open()
          Open this dialog if possible.
 T openFromIssueNav(int issueId)
          Open the dialog from the Issue Navigator for given issueId.
 T openFromViewIssue()
          Open the dialog from View Issue.
 T submit()
          Submit AUI dialog using its default submit button.
 String submitTriggerLocator()
          Submit button locator within the dialog.
protected  String visibleDialogContentsLocator()
          jQuery locator of the main dialog component (when visible).
 
Methods inherited from class com.atlassian.jira.webtest.selenium.framework.dialogs.AbstractSubmittableDialog
afterSubmit, cancel, closeByEscape, submit, submit
 
Methods inherited from class com.atlassian.jira.webtest.selenium.framework.dialogs.AbstractDialog
assertReady, asTargetType, dialogContentsReadyLocator, inDialog, isClosed, isOpen, locator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.webtest.selenium.framework.dialogs.Dialog
inDialog, isClosed, isOpen
 
Methods inherited from interface com.atlassian.jira.webtest.selenium.framework.core.PageObject
assertReady
 
Methods inherited from interface com.atlassian.jira.webtest.selenium.framework.core.LocalizablePageObject
locator
 

Field Detail

VISIBLE_DIALOG_CONTENT_SELECTOR

protected static final String VISIBLE_DIALOG_CONTENT_SELECTOR

DIALOG_CONTENT_READY_SELECTOR

protected static final String DIALOG_CONTENT_READY_SELECTOR

issueNavigator

protected final IssueNavigator issueNavigator

viewIssue

protected final ViewIssue viewIssue

actionsDialog

protected final ActionsDialog actionsDialog
Constructor Detail

AbstractIssueDialog

public AbstractIssueDialog(LegacyIssueOperation issueOperation,
                           Class<T> targetType,
                           ActionType afterSubmit,
                           SeleniumContext ctx)
Method Detail

submitTriggerLocator

public String submitTriggerLocator()
Description copied from interface: SubmittableDialog
Submit button locator within the dialog.

Specified by:
submitTriggerLocator in interface SubmittableDialog
Returns:
submit button locator

cancelTriggerLocator

public String cancelTriggerLocator()
Description copied from interface: SubmittableDialog
Cancel button locator within the dialog.

Specified by:
cancelTriggerLocator in interface SubmittableDialog
Returns:
cancel button locator

visibleDialogContentsLocator

protected String visibleDialogContentsLocator()
Description copied from class: AbstractDialog
jQuery locator of the main dialog component (when visible).

Specified by:
visibleDialogContentsLocator in class AbstractDialog<T extends AbstractIssueDialog<T>>
Returns:
jQuery locator

issueOperation

public final LegacyIssueOperation issueOperation()
Description copied from interface: IssueActionDialog
Returns issue operation associated with this particular dialog.

Specified by:
issueOperation in interface IssueActionDialog
Returns:
issue operation performed by this dialog

actionName

public final String actionName()
Description copied from interface: IssueActionDialog
Gets name of the dialog in the Actions Dialog list.

Specified by:
actionName in interface IssueActionDialog
Returns:
name of the action performed by this dialog

isOpenable

public final boolean isOpenable()
Description copied from interface: Dialog
Test if the dialog can be opened at the current location.

Specified by:
isOpenable in interface Dialog
Returns:
true, if opening of the dialog is currently possible

assertReady

public final void assertReady()

assertNotOpen

public final void assertNotOpen()
Assert that no dialog is currently open on the page.


openFromViewIssue

public T openFromViewIssue()
Description copied from interface: IssueActionDialog
Open the dialog from View Issue.

Specified by:
openFromViewIssue in interface IssueActionDialog
Returns:
this dialog instance

openFromIssueNav

public T openFromIssueNav(int issueId)
Description copied from interface: IssueActionDialog
Open the dialog from the Issue Navigator for given issueId.

Specified by:
openFromIssueNav in interface IssueActionDialog
Parameters:
issueId - issue ID
Returns:
this dialog instance

submit

public final T submit()
Submit AUI dialog using its default submit button. Wait for the web action triggered by the submit (page load, AJAX etc.)

Returns:
this dialog instance

open

public final Dialog open()
Open this dialog if possible.

Specified by:
open in interface Dialog
Returns:
this dialog instance


Copyright © 2002-2012 Atlassian. All Rights Reserved.