org.alfresco.webdrone.share.dashlet
Class SiteContentDashlet

java.lang.Object
  extended by org.alfresco.webdrone.Page
      extended by org.alfresco.webdrone.share.SharePage
          extended by org.alfresco.webdrone.share.dashlet.SiteContentDashlet
All Implemented Interfaces:
HtmlPage, Render, Dashlet

public class SiteContentDashlet
extends SharePage
implements Dashlet

Site content dashlet object, holds all element of the HTML relating to site content dashlet.

Since:
1.0
Author:
Michael Suzuki

Field Summary
protected  org.openqa.selenium.WebElement dashlet
           
 
Fields inherited from class org.alfresco.webdrone.share.SharePage
dojoSupport, WAIT_TIME_3000
 
Fields inherited from class org.alfresco.webdrone.Page
drone, maxPageLoadingTime, version
 
Constructor Summary
protected SiteContentDashlet(WebDrone drone)
          Constructor.
 
Method Summary
 void clickDetailView()
          Mimics action of Clicking the Details View Button.
 void clickFilterButtton()
          Retrieves the Site content FilterButton based on the given cssSelector and clicks on it.
 void clickHelpButton()
           
 void clickSimpleView()
          Mimics action of Clicking the Simple View Button.
 void closeHelpBallon()
          Retrieves the closeButton for Help balloon window based on the given cssSelector and clicks on it.
 List<String> getContentsDetails()
          To get the Empty Site Content Dashlet Details.
 SiteContentFilter getCurrentFilter()
          Get the Filter applied on site content dashlet.
 String getDashletTitle()
          Gets the title on the dashlet panel.
 List<DetailedViewInformation> getDetailedViewInformation()
          Get the List of Detailed View Information.
 String getEmptyContentHeading()
          Heading text from site content dashlet.
 List<org.openqa.selenium.WebElement> getFilters()
          The filters of the Site content those are diplayed in filters dropdown.
 String getHelpBalloon()
          This method gets the Help balloon messages and merge the message into string.
protected  ShareLink getLink(String cssLocation, String title)
          Retries the ShareLink object that matches the title.
protected  List<ShareLink> getList(String csslocator)
          Populates the data seen in dashlet.
 List<SimpleViewInformation> getSimpleViewInformation()
          Get the List of Simple View Information.
 List<ShareLink> getSiteContents()
          The content of the site that is displayed on site content dashlet.
 boolean isBalloonDisplayed()
          Finds whether help balloon is displayed on this page.
 boolean isDetailButtonDisplayed()
          Retrieves the link based on the given cssSelector.
protected  boolean isEmpty(String css)
          Checks if dashlet is empty by verifying that dashlet div class empty is not displayed.
 boolean isHelpButtonDisplayed()
          Find whether Help Button is displayed on this dashlet.
 boolean isSimpleButtonDisplayed()
          Retrieves the link based on the given cssSelector.
protected  boolean isVisibleResults()
          Check if results table is populated.
 SiteContentDashlet render()
          Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.
 SiteContentDashlet render(long time)
          Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.
 SiteContentDashlet render(RenderTime timer)
          Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.
protected  boolean renderBasic(RenderTime timer, String css)
           
 SiteContentDashlet renderDetailViewWithContent()
           
 SiteContentDashlet renderDetailViewWithContent(RenderTime timer)
           
 SiteContentDashlet renderSimpleViewWithContent()
           
 SiteContentDashlet renderSimpleViewWithContent(RenderTime timer)
           
 ShareLink select(String name)
          Retrieves the link that match the content name.
 SiteDashboardPage selectFilter(SiteContentFilter filter)
          Select the given SiteContentFilter on Site Content Dashlet.
 void selectHelpButton()
          Retrieves the link based on the given cssSelector.
 
Methods inherited from class org.alfresco.webdrone.share.SharePage
basicRender, canResume, canResume, disbaleFileUploadFlash, elementRender, findButton, getCopyRight, getLogin, getNav, getPageTitle, getSearch, isJSMessageDisplayed, isLoggedIn, isLogoPresent, isTitlePresent, panelExists
 
Methods inherited from class org.alfresco.webdrone.Page
close, getDrone, getScreenShot, getTitle, isBrowserTitle, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dashlet

protected org.openqa.selenium.WebElement dashlet
Constructor Detail

SiteContentDashlet

protected SiteContentDashlet(WebDrone drone)
Constructor.

Method Detail

render

public SiteContentDashlet render()
Description copied from interface: Dashlet
Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.

Specified by:
render in interface Render
Specified by:
render in interface Dashlet
Returns:
Dashlet object response

render

public SiteContentDashlet render(long time)
Description copied from interface: Dashlet
Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.

Specified by:
render in interface Render
Specified by:
render in interface Dashlet
Parameters:
time - long
Returns:
Dashlet object response

getSiteContents

public List<ShareLink> getSiteContents()
The content of the site that is displayed on site content dashlet.

Returns:
List site links

select

public ShareLink select(String name)
Retrieves the link that match the content name.

Parameters:
name - identifier
Returns:
ShareLink that matches members name

render

public SiteContentDashlet render(RenderTime timer)
Description copied from interface: Dashlet
Dashlet renderer verifies the page has rendered by checking java script page loaded status is complete.

Specified by:
render in interface Render
Specified by:
render in interface Dashlet
Parameters:
timer - RenderTime
Returns:
Dashlet object response

renderSimpleViewWithContent

public SiteContentDashlet renderSimpleViewWithContent()

renderSimpleViewWithContent

public SiteContentDashlet renderSimpleViewWithContent(RenderTime timer)

renderDetailViewWithContent

public SiteContentDashlet renderDetailViewWithContent()

renderDetailViewWithContent

public SiteContentDashlet renderDetailViewWithContent(RenderTime timer)

isDetailButtonDisplayed

public boolean isDetailButtonDisplayed()
Retrieves the link based on the given cssSelector.

Returns:
boolean

isSimpleButtonDisplayed

public boolean isSimpleButtonDisplayed()
Retrieves the link based on the given cssSelector.

Returns:
boolean

selectHelpButton

public void selectHelpButton()
Retrieves the link based on the given cssSelector.


isHelpButtonDisplayed

public boolean isHelpButtonDisplayed()
Find whether Help Button is displayed on this dashlet.

Returns:
boolean True if displayed else false.

clickHelpButton

public void clickHelpButton()

isBalloonDisplayed

public boolean isBalloonDisplayed()
Finds whether help balloon is displayed on this page.

Returns:
True if the balloon displayed else false.

getHelpBalloon

public String getHelpBalloon()
This method gets the Help balloon messages and merge the message into string.

Returns:
String

closeHelpBallon

public void closeHelpBallon()
Retrieves the closeButton for Help balloon window based on the given cssSelector and clicks on it.


clickFilterButtton

public void clickFilterButtton()
Retrieves the Site content FilterButton based on the given cssSelector and clicks on it.


getFilters

public List<org.openqa.selenium.WebElement> getFilters()
The filters of the Site content those are diplayed in filters dropdown.

Returns:
> site links

selectFilter

public SiteDashboardPage selectFilter(SiteContentFilter filter)
Select the given SiteContentFilter on Site Content Dashlet.

Parameters:
filter - - The SiteContentFilter to be selected
Returns:
SiteDashboardPage

getCurrentFilter

public SiteContentFilter getCurrentFilter()
Get the Filter applied on site content dashlet.

Returns:
SiteContentFilter

getEmptyContentHeading

public String getEmptyContentHeading()
Heading text from site content dashlet.

Returns:
Heading Text.

getContentsDetails

public List<String> getContentsDetails()
To get the Empty Site Content Dashlet Details.

Returns:
List String - Content Details.

clickSimpleView

public void clickSimpleView()
Mimics action of Clicking the Simple View Button.


getSimpleViewInformation

public List<SimpleViewInformation> getSimpleViewInformation()
Get the List of Simple View Information. Select Simple View Button on Site Content Dashlet. Read Content information and return the list.

Returns:
List of SimpleViewInformation.

clickDetailView

public void clickDetailView()
Mimics action of Clicking the Details View Button.


getDetailedViewInformation

public List<DetailedViewInformation> getDetailedViewInformation()
Get the List of Detailed View Information. Select Detailed View Button on Site Content Dashlet. Read Content information and return the list.

Returns:
List of DetailedViewInformation.

getDashletTitle

public String getDashletTitle()
Gets the title on the dashlet panel.

Returns:
String dashlet title

isEmpty

protected boolean isEmpty(String css)
Checks if dashlet is empty by verifying that dashlet div class empty is not displayed.

Parameters:
dashlet - css locator
Returns:
true if empty

isVisibleResults

protected boolean isVisibleResults()
Check if results table is populated.

Returns:
true when results are displayed

getList

protected List<ShareLink> getList(String csslocator)
Populates the data seen in dashlet.


renderBasic

protected boolean renderBasic(RenderTime timer,
                              String css)

getLink

protected ShareLink getLink(String cssLocation,
                            String title)
Retries the ShareLink object that matches the title.

Parameters:
cssLocation - String css selector description
title - String identifier to match
Returns:
ShareLink link that matches the title


Copyright © 2013. All Rights Reserved.