/**
  * Test Pinbar Most Viewed
  *
  */
 public function testPinbarFavorites()
 {
     $login = new Login($this);
     $login->setUsername(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_LOGIN)->setPassword(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PASS)->submit()->openGroups();
     //Add Groups page to favorites
     $login->byXPath("//button[@class='btn favorite-button']")->click();
     //Open pinbar dropdown Favorites
     $login->byXPath("//div[@class='pin-menus dropdown dropdown-close-prevent']/i")->click();
     $login->waitForAjax();
     $login->assertElementPresent("//div[@class='tabbable tabs-left']");
     $login->byXPath("//div[@class='tabbable tabs-left']//a[contains(., 'Favorites')]")->click();
     $login->waitForAjax();
     //Check that page is added to favorites
     $login->assertElementPresent("//div[@id='favorite-content' and @class='tab-pane active']");
     $login->waitForAjax();
     $login->assertElementPresent("//li[@id='favorite-tab'][//span[contains(., 'Groups')]]", 'Not found in favorites section');
     //Remove Groups page from favorites
     $login->byXPath("//div[@id='favorite-content'][//span[contains(., 'Groups')]]//button[@class='close']")->click();
     $login->waitForAjax();
     //Check that page is deleted from favorites
     $login->assertElementNotPresent("//div[@id='favorites-content'][//span[contains(., 'Groups')]]", 'Not found in favorites section');
 }