com.ibm.team.fvt.tests.clm.pages.rm
Class RmWebShowArtifactPage

java.lang.Object
  extended by com.ibm.team.fvt.tests.web.WebPage
      extended by com.ibm.team.fvt.tests.clm.pages.ClmWebPage
          extended by com.ibm.team.fvt.tests.clm.pages.rm.RmWebPage
              extended by com.ibm.team.fvt.tests.clm.pages.rm.RmWebProjectAreaPage
                  extended by com.ibm.team.fvt.tests.clm.pages.rm.RmWebListPage
                      extended by com.ibm.team.fvt.tests.clm.pages.rm.RmWebShowArtifactPage
All Implemented Interfaces:
ClmWebPageConstants
Direct Known Subclasses:
RmWebShowCollectionPage, RmWebShowEditableArtifactPage, RmWebShowModulePage

public abstract class RmWebShowArtifactPage
extends RmWebListPage

Abstract class to manage RM page showing an artifact.

Following actions are accessible in this page:

Following functionalities are also defined or specialized by this page:


Field Summary
static java.lang.String IMPLEMENTED_BY
           
static java.lang.String TRACKED_BY
           
static java.lang.String VALIDATED_BY
           
 
Fields inherited from class com.ibm.team.fvt.tests.clm.pages.rm.RmWebListPage
PAST_WEEK, TODAY, YESTERDAY
 
Fields inherited from class com.ibm.team.fvt.tests.web.WebPage
NO_DATA
 
Fields inherited from interface com.ibm.team.fvt.tests.clm.pages.ClmWebPageConstants
ADMINISTRATION_HOME_MENU_GROUP, JAZZ_TEAM_SERVER_HOME_MENU_ITEM, LIFECYCLE_PROJECT_ADMIN_MENU_ITEM, USER_NOT_AUTHORIZED_MESSAGE_ID, USER_NOT_AUTHORIZED_MESSAGE_LOCATOR
 
Constructor Summary
RmWebShowArtifactPage(java.lang.String url, ClmConfig config, com.ibm.team.fvt.tests.config.User user, java.lang.String... data)
          Abstract class to manage common actions to any RM application web page which is displaying project area information.
 
Method Summary
 boolean addComment(java.lang.String subject)
          Adds a comment to the artifact with the given subject, unless it already exists.
 boolean addComment(java.lang.String subject, boolean force)
          Adds a comment to the artifact with the given subject.
 com.ibm.team.fvt.tests.web.WebBrowserElement addLinkToArtifact(java.lang.String artifactName, java.lang.String linkType, boolean create)
          Adds a link to an existing RM artifact or to a newly-created RM artifact.
 com.ibm.team.fvt.tests.web.WebBrowserElement addLinkToArtifact(java.lang.String artifactName, java.lang.String linkType, boolean create, boolean safe)
          Adds a link to an existing RM artifact or to a newly-created RM artifact.
 boolean canBeModified()
          Determines if artifact is able to be edited by current user
 void clickOnDoneButton()
          Clicks on the Done button
 RmWebReviewPage createReview(java.lang.String reviewName, java.lang.String description, boolean isFormal)
          Create a review for this collection
 void delete()
          Deletes the artifact managed by this page by clicking the 'Delete' button from the toolbar.
 boolean deleteComment(java.lang.String subject)
          Deletes all comments in the artifact that have the given subject
 java.lang.String getArtifactID()
          Return the artifact ID.
 java.lang.String getArtifactName()
          Return the artifact name.
 com.ibm.team.fvt.tests.web.WebBrowserElement getLinksItemElement(java.lang.String artifact, java.lang.String linkType)
          Return the 'Links' section menu item matching the given artifact name for the current artifact.
 java.util.List<java.lang.String> getTags()
          Return the list of the tags for the currently viewed artifact.
 java.lang.String getTitle()
          Return the title of the artifact which is the concatenation of its number and its name.
 boolean isArtifactLocked()
          Determines if artifact is currently locked
 void lockArtifact()
          Clicks the lock button for the current artifact
 RmWebShowRequirementHistoryPage openHistory()
          Opens the history for this artifact by clicking the 'Open History' button from the toolbar.
 boolean overrideArtifactlock()
          Attempts overrides lock for current artifact
 void resolveComment(java.lang.String subject)
          Resolves all comments in the artifact that have the given subject
 void selectTags(java.lang.String... tags)
          Selects the given tags to add to the artifact managed by this page by clicking the 'Select Tags' icon button which is above the toolbar.
 void unlockArtifact()
          Clicks the unlock button for the current artifact
 
Methods inherited from class com.ibm.team.fvt.tests.clm.pages.rm.RmWebListPage
addColumns, checkResourceLinkElements, checkResourceLinkElements, clearAllFilters, clickOnCollection, clickOnModule, clickOnRequirement, editArtifactColumn, exists, exists, getArtifactsDisplayedCount, getArtifactsTotalCount, getResourceID, lockArtifact, refreshList, unlockArtifact
 
Methods inherited from class com.ibm.team.fvt.tests.clm.pages.rm.RmWebProjectAreaPage
getProjectAreaName, getProjectAreaTitle, gotoArtifactsPage, gotoCollectionPage, gotoCollectionsPage, gotoModulePage, gotoModulesPage, gotoRequirementPage, searchForArtifact
 
Methods inherited from class com.ibm.team.fvt.tests.clm.pages.rm.RmWebPage
getAdminUIPopupMenu, getAllProjectAreasPage, getHelpPopupMenu, getSidebarSectionItemsCount, getUserPopupMenu
 
Methods inherited from class com.ibm.team.fvt.tests.clm.pages.ClmWebPage
checkRichHover, clickHomeMenuItem, getBannerTitle, getCcmApplication, getConfig, getDmApplication, getJtsApplication, getLpaApplication, getMiniDashboard, getQmApplication, getRmApplication, getUser, gotoCcmProjectPage, gotoCcmProjectPage, gotoDmProjectPage, gotoDmProjectPage, gotoJtsAdminHomePage, gotoLpaAllProjectsPage, gotoQmProjectPage, gotoQmProjectPage, gotoRmProjectPage, gotoRmProjectPage, logout, openAdminUIMenu, openHelpMenu, openHomeMenu, openMenu, openMenu, openToolbarMenu, openUserProfileMenu, refresh, save, waitWhileBusy
 
Methods inherited from class com.ibm.team.fvt.tests.web.WebPage
changeUser, checkHoverTitle, checkRichHover, get, getBrowser, getLocation, getPage, getPage, getPageUsingBrowser, goBack, openPage, openPage, openPageUsingBrowser, openPageUsingHoverTitle, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, richHoverOverLink, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IMPLEMENTED_BY

public static final java.lang.String IMPLEMENTED_BY
See Also:
Constant Field Values

TRACKED_BY

public static final java.lang.String TRACKED_BY
See Also:
Constant Field Values

VALIDATED_BY

public static final java.lang.String VALIDATED_BY
See Also:
Constant Field Values
Constructor Detail

RmWebShowArtifactPage

public RmWebShowArtifactPage(java.lang.String url,
                             ClmConfig config,
                             com.ibm.team.fvt.tests.config.User user,
                             java.lang.String... data)
Abstract class to manage common actions to any RM application web page which is displaying project area information.

Following functionalities are also defined or specialized by this page:

Method Detail

addComment

public boolean addComment(java.lang.String subject)
Adds a comment to the artifact with the given subject, unless it already exists.

This is equivalent to addComment(String, false).

Parameters:
subject - The comment subject
Returns:
true if a comment was added, false otherwise

addComment

public boolean addComment(java.lang.String subject,
                          boolean force)
Adds a comment to the artifact with the given subject.

In case there's already one or several comments with the same subject, the comment is added only if the given force parameter is set to true.

Parameters:
subject - The comment subject
force - Tells whether the comment should still be added if it already exists
Returns:
true if a comment was added, false otherwise

addLinkToArtifact

public com.ibm.team.fvt.tests.web.WebBrowserElement addLinkToArtifact(java.lang.String artifactName,
                                                                      java.lang.String linkType,
                                                                      boolean create)
                                                               throws ClmServerMessageError
Adds a link to an existing RM artifact or to a newly-created RM artifact.

Note that the link is only between RM artifacts. It is not intended to be used to link to a non-RM artifact.

Also, the artifact is searched by name only. Searching using the different filter types is not currently supported.

Note that it's a safe operation, when the link already exists, nothing is done and no error is thrown.

Parameters:
artifactName - The name of the artifact to be linked.
linkType - The name of the link type for the new link
create - Boolean indicating whether or not to create a new artifact to link.
Returns:
The link element of the added artifact link as a WebBrowserElement.
Throws:
ClmServerMessageError - In case there's an error while adding the link, typically when the link already exists.

addLinkToArtifact

public com.ibm.team.fvt.tests.web.WebBrowserElement addLinkToArtifact(java.lang.String artifactName,
                                                                      java.lang.String linkType,
                                                                      boolean create,
                                                                      boolean safe)
                                                               throws ClmServerMessageError
Adds a link to an existing RM artifact or to a newly-created RM artifact.

Note that the link is only between RM artifacts. It is not intended to be used to link to a non-RM artifact.

Also, the artifact is searched by name only. Searching using the different filter types is not currently supported.

Parameters:
artifactName - The name of the artifact to be linked.
linkType - The name of the link type for the new link
create - Boolean indicating whether or not to create a new artifact to link.
safe - Tells whether the creation/addition should be done safely or not (ie. tolerate that the link already exists instead of throwing an error)
Returns:
The link element of the added artifact link as a WebBrowserElement.
Throws:
ClmServerMessageError - In case there's an error while adding the link, typically when the link already exists.

canBeModified

public boolean canBeModified()
Determines if artifact is able to be edited by current user

Returns:
boolean - true if user can edit artifact

clickOnDoneButton

public void clickOnDoneButton()

Clicks on the Done button


createReview

public RmWebReviewPage createReview(java.lang.String reviewName,
                                    java.lang.String description,
                                    boolean isFormal)
Create a review for this collection

Parameters:
reviewName - The name of the review
description - The description of the review
isFormal - A formal review if "true", else an informal review
Returns:
The RM review page

delete

public void delete()
Deletes the artifact managed by this page by clicking the 'Delete' button from the toolbar.


deleteComment

public boolean deleteComment(java.lang.String subject)
                      throws com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError
Deletes all comments in the artifact that have the given subject

Parameters:
subject - The comment subject
Returns:
true if a deletion occurred, false otherwise (ie comment not found)
Throws:
com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError - if a comment could not be deleted

getArtifactID

public java.lang.String getArtifactID()
Return the artifact ID.

Returns:
The artifact ID as a String.

getArtifactName

public java.lang.String getArtifactName()
Return the artifact name.

Returns:
The artifact name as a String.

getLinksItemElement

public com.ibm.team.fvt.tests.web.WebBrowserElement getLinksItemElement(java.lang.String artifact,
                                                                        java.lang.String linkType)
Return the 'Links' section menu item matching the given artifact name for the current artifact.

Parameters:
artifact - The name of the artifact that the collection is supposed to be linked to
linkType - The type of link for the searched item. If null then the search will occur in all section items.
Returns:
The found link web element or null if the collection does not have such a link

getTags

public java.util.List<java.lang.String> getTags()
Return the list of the tags for the currently viewed artifact.

Returns:
The tags list as a List of String. If no tags have been associated, then an empty list is returned.

getTitle

public java.lang.String getTitle()
Return the title of the artifact which is the concatenation of its number and its name.

Overrides:
getTitle in class ClmWebPage
Returns:
The artifact title as a String.

isArtifactLocked

public boolean isArtifactLocked()
Determines if artifact is currently locked

Returns:
boolean - true locked, false if unlocked

lockArtifact

public void lockArtifact()
Clicks the lock button for the current artifact

Artifact must be in appropriate unlocked state before attempting to lock


openHistory

public RmWebShowRequirementHistoryPage openHistory()
Opens the history for this artifact by clicking the 'Open History' button from the toolbar.


overrideArtifactlock

public boolean overrideArtifactlock()
Attempts overrides lock for current artifact

Returns:
true if user was able to override, false if unable to override.

resolveComment

public void resolveComment(java.lang.String subject)
Resolves all comments in the artifact that have the given subject

Parameters:
subject - The comment subject
Throws:
com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError - if no comment was found with the given subject

selectTags

public void selectTags(java.lang.String... tags)
Selects the given tags to add to the artifact managed by this page by clicking the 'Select Tags' icon button which is above the toolbar.

Parameters:
tags - List of Strings representing the tags to select

unlockArtifact

public void unlockArtifact()
Clicks the unlock button for the current artifact

Artifact must be in appropriate locked state before attempting to unlock

Note: This method will only work if current user holds lock. overrideArtifactlock() should be used to override other users locks.