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.SpacesTab
           
static class DashboardSeleniumHelper.UpdatesTab
           
 
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.SpacesTab spacesTab, DashboardSeleniumHelper.UpdatesTab updatesTab)
          Instantiate a new dashboard helper and navigate to the specified spaces tab
 
Method Summary
 void clickFavouriteButtonForSpace(Space space)
           
 void clickFavouriteButtonForSpace(String spaceKey)
           
 void clickSpacesListTab(DashboardSeleniumHelper.SpacesTab tab)
          Click on a space tab.
 void clickUpdatesTab(DashboardSeleniumHelper.UpdatesTab tab)
          Click on an updates tab.
 boolean currentSpacesTabContains(Space space)
           
 DashboardSeleniumHelper.SpacesTab getSelectedSpacesTab()
           
 DashboardSeleniumHelper.UpdatesTab getSelectedUpdatesTab()
           
 void gotoDashboard()
          Navigate to the dashboard page
 void gotoDashboard(DashboardSeleniumHelper.SpacesTab spacesTab, DashboardSeleniumHelper.UpdatesTab updatesTab)
          Navigate to the specified spaces tab on the dashboard with a page reload.
 int numUpdatesInSpacesTab(DashboardSeleniumHelper.SpacesTab tab)
          The number of updates in the specified 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.SpacesTab tab)
           
 boolean tabIsVisible(DashboardSeleniumHelper.UpdatesTab 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.SpacesTab spacesTab,
                               DashboardSeleniumHelper.UpdatesTab updatesTab)
Instantiate a new dashboard helper and navigate to the specified spaces tab

Parameters:
client - Selenium client
spacesTab - Spaces tab to navigate to
updatesTab - Updates 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.SpacesTab spacesTab,
                          DashboardSeleniumHelper.UpdatesTab updatesTab)
Navigate to the specified spaces tab on the dashboard with a page reload. If you want to click on a tab, use clickSpacesListTab(com.atlassian.confluence.selenium.client.DashboardSeleniumHelper.SpacesTab) instead.

Parameters:
spacesTab - Spaces tab to navigate to
updatesTab - Updates tab to navigate 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

clickSpacesListTab

public void clickSpacesListTab(DashboardSeleniumHelper.SpacesTab 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

clickUpdatesTab

public void clickUpdatesTab(DashboardSeleniumHelper.UpdatesTab tab)
Click on an updates 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.SpacesTab tab)

tabIsVisible

public boolean tabIsVisible(DashboardSeleniumHelper.UpdatesTab tab)

numUpdatesInSpacesTab

public int numUpdatesInSpacesTab(DashboardSeleniumHelper.SpacesTab tab)
The number of updates in the specified tab. For example, "Category (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()

getSelectedSpacesTab

public DashboardSeleniumHelper.SpacesTab getSelectedSpacesTab()

getSelectedUpdatesTab

public DashboardSeleniumHelper.UpdatesTab getSelectedUpdatesTab()

recentUpdatesContainsPage

public boolean recentUpdatesContainsPage(Page page)

currentSpacesTabContains

public boolean currentSpacesTabContains(Space space)


Copyright © 2003-2011 Atlassian. All Rights Reserved.