com.atlassian.confluence.selenium.client
Class DashboardSeleniumHelper

java.lang.Object
  extended by com.atlassian.confluence.selenium.client.DashboardSeleniumHelper

public class DashboardSeleniumHelper
extends Object

Dashboard Selenium testing logic.


Nested Class Summary
static class DashboardSeleniumHelper.Tab
           
 
Constructor Summary
DashboardSeleniumHelper(com.atlassian.selenium.SeleniumClient client)
          Instantiate a new dashboard helper and navigate to the dashboard page
DashboardSeleniumHelper(com.atlassian.selenium.SeleniumClient client, DashboardSeleniumHelper.Tab tab)
          Instantiate a new dashboard helper and navigate to the specified spaces tab
 
Method Summary
 void clickFavouriteButtonForSpace(Space space)
           
 void clickFavouriteButtonForSpace(String spaceKey)
           
 void clickTab(DashboardSeleniumHelper.Tab tab)
          Click on a space tab.
 boolean currentSpacesTabContains(Space space)
           
 String getRecentlyUpdatedHeading()
           
 void gotoDashboard()
          Navigate to the dashboard page
 void gotoDashboard(DashboardSeleniumHelper.Tab tab)
          Navigate to the specified spaces tab on the dashboard with a page reload.
 int numUpdatesInTab(DashboardSeleniumHelper.Tab tab)
          The number of updates in the specified tab.
 boolean recentlyUpdatedHeadingMatchesTab(DashboardSeleniumHelper.Tab tab)
           
 boolean recentlyUpdatedIsEmpty()
           
 boolean recentUpdatesContainsPage(Page page)
           
 boolean spaceIsFavourited(Space space)
          Space is favourited is not the same as !spaceIsNotFavourited because that does not check if the hidden add favourite button exists
 boolean spaceIsFavourited(String spaceKey)
          Space is favourited is not the same as !spaceIsNotFavourited because that does not check if the hidden add favourite button exists
 boolean spaceIsNotFavourited(Space space)
          Space is not favourited is not the same as !spaceIsFavourited because that does not check if the hidden remove favourite button exists
 boolean spaceIsNotFavourited(String spaceKey)
          Space is not favourited is not the same as !spaceIsFavourited because that does not check if the hidden remove favourite button exists
 boolean tabIsVisible(DashboardSeleniumHelper.Tab tab)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashboardSeleniumHelper

public DashboardSeleniumHelper(com.atlassian.selenium.SeleniumClient client,
                               DashboardSeleniumHelper.Tab tab)
Instantiate a new dashboard helper and navigate to the specified spaces tab

Parameters:
client - Selenium client
tab - Spaces tab to navigate to

DashboardSeleniumHelper

public DashboardSeleniumHelper(com.atlassian.selenium.SeleniumClient client)
Instantiate a new dashboard helper and navigate to the dashboard page

Parameters:
client - Selenium client
Method Detail

gotoDashboard

public void gotoDashboard(DashboardSeleniumHelper.Tab tab)
Navigate to the specified spaces tab on the dashboard with a page reload. If you want to click on a tab, use clickTab(com.atlassian.confluence.selenium.client.DashboardSeleniumHelper.Tab) instead.

Parameters:
tab - The tab to go to

gotoDashboard

public void gotoDashboard()
Navigate to the dashboard page


spaceIsFavourited

public boolean spaceIsFavourited(Space space)
Space is favourited is not the same as !spaceIsNotFavourited because that does not check if the hidden add favourite button exists

Parameters:
space - The space key of the space to check
Returns:
True if the add favourite link is visible and remove favourite link is present but not visible

spaceIsFavourited

public boolean spaceIsFavourited(String spaceKey)
Space is favourited is not the same as !spaceIsNotFavourited because that does not check if the hidden add favourite button exists

Parameters:
spaceKey - The space key of the space to check
Returns:
True if the add favourite link is visible and remove favourite link is present but not visible

spaceIsNotFavourited

public boolean spaceIsNotFavourited(Space space)
Space is not favourited is not the same as !spaceIsFavourited because that does not check if the hidden remove favourite button exists

Parameters:
space - The space key of the space to check
Returns:
True if the remove favourite link is visible and add favourite link is present but not visible

spaceIsNotFavourited

public boolean spaceIsNotFavourited(String spaceKey)
Space is not favourited is not the same as !spaceIsFavourited because that does not check if the hidden remove favourite button exists

Parameters:
spaceKey - The space key of the space to check
Returns:
True if the remove favourite link is visible and add favourite link is present but not visible

clickTab

public void clickTab(DashboardSeleniumHelper.Tab tab)
Click on a space tab. This is different from gotoDashboard(tab) because it actually performs a mouse click.

Parameters:
tab - The tab to click on

tabIsVisible

public boolean tabIsVisible(DashboardSeleniumHelper.Tab tab)

numUpdatesInTab

public int numUpdatesInTab(DashboardSeleniumHelper.Tab tab)
The number of updates in the specified tab. For example, "Team (7)" will return 7.

Parameters:
tab - The tab to get the number of updates for
Returns:
The number of updates in that tab

clickFavouriteButtonForSpace

public void clickFavouriteButtonForSpace(Space space)

clickFavouriteButtonForSpace

public void clickFavouriteButtonForSpace(String spaceKey)

recentlyUpdatedIsEmpty

public boolean recentlyUpdatedIsEmpty()

getRecentlyUpdatedHeading

public String getRecentlyUpdatedHeading()

recentlyUpdatedHeadingMatchesTab

public boolean recentlyUpdatedHeadingMatchesTab(DashboardSeleniumHelper.Tab tab)

recentUpdatesContainsPage

public boolean recentUpdatesContainsPage(Page page)

currentSpacesTabContains

public boolean currentSpacesTabContains(Space space)


Copyright © 2003-2010 Atlassian. All Rights Reserved.