Author: vmassol
Date: 2008-02-13 17:14:25 +0100 (Wed, 13 Feb 2008)
New Revision: 7616

Added:
   
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/SkinCustomizationsTest.java
Modified:
   
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
   
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/RegisterTest.java
   
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/framework/AbstractXWikiTestCase.java
Log:
XSALBATROSS-11: Replacing style.css in the Administration doesn't work

* Added functional test to prove it works

Modified: 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
===================================================================
--- 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
  2008-02-13 15:52:19 UTC (rev 7615)
+++ 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
  2008-02-13 16:14:25 UTC (rev 7616)
@@ -57,6 +57,7 @@
         addTestCase(suite, BacklinksTest.class);
         addTestCase(suite, CacheTest.class);
         addTestCase(suite, UsersGroupsRightsManagementTest.class);
+        addTestCase(suite, SkinCustomizationsTest.class);
 
         return new XWikiTestSetup(suite);
     }

Modified: 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/RegisterTest.java
===================================================================
--- 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/RegisterTest.java
      2008-02-13 15:52:19 UTC (rev 7615)
+++ 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/RegisterTest.java
      2008-02-13 16:14:25 UTC (rev 7616)
@@ -28,8 +28,6 @@
 /**
  * Tries to register a new xwiki user
  *
- * @author hritcu
- *
  * @version $Id: $
  */
 public class RegisterTest extends AbstractXWikiTestCase {

Added: 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/SkinCustomizationsTest.java
===================================================================
--- 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/SkinCustomizationsTest.java
                            (rev 0)
+++ 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/SkinCustomizationsTest.java
    2008-02-13 16:14:25 UTC (rev 7616)
@@ -0,0 +1,66 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.xpn.xwiki.it.selenium;
+
+import com.xpn.xwiki.it.selenium.framework.AbstractXWikiTestCase;
+import com.xpn.xwiki.it.selenium.framework.AlbatrossSkinExecutor;
+import com.xpn.xwiki.it.selenium.framework.XWikiTestSuite;
+
+import junit.framework.Test;
+
+/**
+ * Verify the skin customization features available in the Administration 
(like changing
+ * the default CSS, etc).
+ *
+ * @version $Id: $
+ */
+public class SkinCustomizationsTest extends AbstractXWikiTestCase
+{
+    public static Test suite()
+    {
+        XWikiTestSuite suite = new XWikiTestSuite("Verify the skin 
customization features "
+            + "available in the Administration");
+        suite.addTestSuite(SkinCustomizationsTest.class, 
AlbatrossSkinExecutor.class);
+        return suite;
+    }
+
+    protected void setUp() throws Exception
+    {
+        super.setUp();
+        loginAsAdmin();
+    }
+
+    protected void tearDown() throws Exception
+    {
+        // Ensure that we reset the style
+        clickLinkWithLocator("headeradmin");
+        getSelenium().type("XWiki.XWikiPreferences_0_stylesheet", "style.css");
+        clickEditSaveAndView();
+    }
+
+    public void testChangeDefaultStyleCss() throws Exception
+    {
+        clickLinkWithLocator("headeradmin");
+        getSelenium().type("XWiki.XWikiPreferences_0_stylesheet", 
"somestyle.css");
+        clickEditSaveAndView();
+        assertTrue(getSelenium().isElementPresent(
+            "xpath=//head/[EMAIL 
PROTECTED]'/xwiki/bin/skin/skins/albatross/somestyle.css']"));
+    }
+}
\ No newline at end of file

Modified: 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/framework/AbstractXWikiTestCase.java
===================================================================
--- 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/framework/AbstractXWikiTestCase.java
   2008-02-13 15:52:19 UTC (rev 7615)
+++ 
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/framework/AbstractXWikiTestCase.java
   2008-02-13 16:14:25 UTC (rev 7616)
@@ -71,7 +71,7 @@
         this.selenium.start();
     }
 
-    public void tearDown() throws Exception
+    protected void tearDown() throws Exception
     {
         getSelenium().stop();
     }

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

Reply via email to