Author: rjollos
Date: Fri Nov 15 04:11:03 2013
New Revision: 1542167

URL: http://svn.apache.org/r1542167
Log:
0.8dev: Populate new products with InterTrac and InterWiki pages. Refs #598.

Patch by Olemis Lang.

Added:
    bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py   
(with props)
Modified:
    bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py
    bloodhound/trunk/bloodhound_multiproduct/tests/functional/__init__.py

Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py?rev=1542167&r1=1542166&r2=1542167&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py (original)
+++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/api.py Fri Nov 15 
04:11:03 2013
@@ -585,7 +585,7 @@ class MultiProductSystem(Component):
 
         # Import default pages in product wiki
         wikiadmin = WikiAdmin(ProductEnvironment(self.env, product.prefix))
-        pages = ('TitleIndex', 'RecentChanges')
+        pages = ('TitleIndex', 'RecentChanges', 'InterTrac', 'InterWiki')
         for page in pages:
             filename = resource_filename('trac.wiki', 'default-pages/' + page)
             wikiadmin.import_page(filename, page)

Modified: bloodhound/trunk/bloodhound_multiproduct/tests/functional/__init__.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/tests/functional/__init__.py?rev=1542167&r1=1542166&r2=1542167&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/tests/functional/__init__.py 
(original)
+++ bloodhound/trunk/bloodhound_multiproduct/tests/functional/__init__.py Fri 
Nov 15 04:11:03 2013
@@ -1056,6 +1056,9 @@ def trac_functionalSuite(suite):
     import tests.functional.prefs
     tests.functional.prefs.functionalSuite(suite)
 
+    import tests.functional.product
+    tests.functional.product.functionalSuite(suite)
+
     # The db tests should be last since the backup test occurs there.
     import trac.db.tests
     trac.db.tests.functionalSuite(suite)

Added: bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py
URL: 
http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py?rev=1542167&view=auto
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py (added)
+++ bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py Fri 
Nov 15 04:11:03 2013
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+from trac.tests.functional import FunctionalTwillTestCaseSetup
+from trac.tests.functional.tester import tc
+
+#----------------
+# Functional test cases for products
+#----------------
+
+class TestNewProduct(FunctionalTwillTestCaseSetup):
+    def runTest(self):
+        """Setup new product"""
+        prefix = self._tester.create_product()
+        base_url = self._testenv.get_env_href(prefix=prefix)
+        tc.url(base_url())
+
+        tc.follow('Index')
+        tc.find('Index by Title')
+        tc.find('<a[^>]*>Index by Date')
+        pages = ('TitleIndex', 'RecentChanges', 'InterTrac', 'InterWiki')
+        for page in pages:
+            tc.find('<a[^>]*>%s' % (page,))
+
+        tc.follow('Index by Date')
+        tc.find('Index by Date')
+        tc.find('<a[^>]*>Index by Title')
+
+
+def functionalSuite(suite=None):
+    if not suite:
+        import tests.functional
+        suite = tests.functional.functionalSuite()
+
+    suite.addTest(TestNewProduct())
+    return suite
+
+if __name__ == '__main__':
+    import unittest
+    unittest.main(defaultTest='functionalSuite')

Propchange: bloodhound/trunk/bloodhound_multiproduct/tests/functional/product.py
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to