On Jan 27, 2010, at 11:38 AM, cjdelisle (SVN) wrote:

> Author: cjdelisle
> Date: 2010-01-27 11:38:03 +0100 (Wed, 27 Jan 2010)
> New Revision: 26429
> 
> Modified:
>   
> enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/WatchListTest.java
> Log:
> XAWATCHLIST-97: Selenium test failing after upgrade from old 
> XWiki.WatchListManager - Removed all references to XWiki.WatchListManager.
> 
> Modified: 
> enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/WatchListTest.java
> ===================================================================
> --- 
> enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/WatchListTest.java
>         2010-01-27 09:18:49 UTC (rev 26428)
> +++ 
> enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/WatchListTest.java
>         2010-01-27 10:38:03 UTC (rev 26429)
> @@ -56,13 +56,6 @@
>     {
>         // Stop GreenMail test server
>         this.greenMail.stop();
> -
> -        // Restore XWiki.WatchListManager from the trash since it's been 
> deleted by the tests below.
> -        open("XWiki", "WatchListManager");
> -        if (isElementPresent("link=Restore")) {
> -            clickLinkWithLocator("link=Restore");
> -            assertTextPresent("Watchlist for Administrator");
> -        }
>     }
> 
>     public void testWatchThisPageAndWholeSpace() throws Exception
> @@ -93,9 +86,6 @@
>         open("XWiki", "WatchListMessage", "edit", "editor=object");
>         assertTextPresent("Mail 0:");
> 
> -        // Test if the watchlist manager document exists
> -        assertTrue("Page XWiki.WatchListManager doesn't exist", 
> isExistingPage("XWiki", "WatchListManager"));
> -
>         // Watch Test.TestWatchThisPage
>         createPage("Test", "TestWatchThisPage", "TestWatchThisPage selenium");
>         clickLinkWithText("Watch", false);
> @@ -109,9 +99,15 @@
>         assertTextPresent("TestWatchThisPage");
>         assertTextPresent("TestWatchWholeSpace");
> 
> +        // Click on the inline edit button
> +        clickLinkWithLocator("xpath=//a...@id='tmEditInline']");
> +
> +        // Click the watchlist button because it forgets that we are at the 
> watchlist, no new page loads so we don't wait.
> +        clickLinkWithLocator("xpath=//l...@id='watchlistTab']/a", false);
> +
>         // Ensure the frequency set is every hour so that Hourly job we've 
> modified is used
> -        getSelenium().select("XWiki.WatchListClass_0_interval", 
> "label=Scheduler.WatchListDailyNotifier");
> -        clickLinkWithXPath("//inp...@value='Save']", true);
> +        getSelenium().select("XWiki.WatchListClass_0_interval", 
> "value=Scheduler.WatchListDailyNotifier");
> +        clickEditSaveAndView();
> 
>         // Trigger the notification
>         open("Scheduler", "WebHome");
> @@ -130,10 +126,5 @@
>         
> clickLinkWithXPath("//d...@id='xobject_XWiki.XWikiPreferences_0_title']", 
> false);
>         setFieldValue("XWiki.XWikiPreferences_0_smtp_port", "25");
>         clickEditSaveAndView();
> -
> -        // XWIKI-2125
> -        // Verify that the Watchlist menu entry is not present if 
> XWiki.WatchListManager does not exists
> -        deletePage("XWiki", "WatchListManager");
> -        assertTextNotPresent("Manage your watchlist");

Not very urgent right now but we may want to not have a watchlist tab in the 
user profile if the watchlist sheet page doesn't exist.

In the future I think this will be an Interface Extension in the user profile 
so that apps can contribute new tabs and the watchlist will be a separate app.

Thanks
-Vincent

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to