Author: vmassol
Date: 2008-02-25 18:59:46 +0100 (Mon, 25 Feb 2008)
New Revision: 7934
Added:
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/VersionTest.java
Modified:
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
Log:
XWIKI-2134: Cannot rollback a document to its first revision
* Added functional test to ensure it doesn't happen again
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-25 15:58:56 UTC (rev 7933)
+++
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/AllTests.java
2008-02-25 17:59:46 UTC (rev 7934)
@@ -59,6 +59,7 @@
addTestCase(suite, UsersGroupsRightsManagementTest.class);
addTestCase(suite, SkinCustomizationsTest.class);
addTestCase(suite, XObjectsTest.class);
+ addTestCase(suite, VersionTest.class);
return new XWikiTestSetup(suite);
}
Added:
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/VersionTest.java
===================================================================
---
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/VersionTest.java
(rev 0)
+++
xwiki-products/xwiki-enterprise/trunk/distribution-test/selenium-tests/src/test/it/com/xpn/xwiki/it/selenium/VersionTest.java
2008-02-25 17:59:46 UTC (rev 7934)
@@ -0,0 +1,62 @@
+/*
+ * 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 versioning features of documents and attachments.
+ *
+ * @version $Id: $
+ */
+public class VersionTest extends AbstractXWikiTestCase
+{
+ public static Test suite()
+ {
+ XWikiTestSuite suite =
+ new XWikiTestSuite("Verify versioning features of documents and
attachments");
+ suite.addTestSuite(VersionTest.class, AlbatrossSkinExecutor.class);
+ return suite;
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ loginAsAdmin();
+ }
+
+ /**
+ * Verify we can rollback to the first version of a document that is
bundled in the default
+ * distribution.
+ */
+ public void testRollbackToFirstVersion() throws Exception
+ {
+ open("/xwiki/bin/edit/Main/WebHome?editor=wiki");
+ setFieldValue("content", "aaa");
+ clickEditSaveAndView();
+ open("/xwiki/bin/rollback/Main/WebHome?rev=1.1");
+ clickLinkWithLocator("//[EMAIL PROTECTED]'yes']");
+ assertTextPresent("Welcome to your wiki");
+ }
+}
\ No newline at end of file
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications