Commits

Olemis Lang  committed 3e6755f

BH Multiproduct #387 : Global timeline and global attachments

  • Participants
  • Parent commits d6e18d1
  • Branches t387_test_functional

Comments (0)

Files changed (4)

 t387/t387_r1485255_functional_test_infra.diff
 t387/t387_r1495238_attach_btn_value.diff
 t577/t577_r1496958_newticket_id.diff
+t387/t387_r149918_global_timeline.diff
+t387/t387_r149918_global_attachments.diff
 t387/t387_r1495238_functional_test.2.diff

File t387/t387_r1495238_functional_test.2.diff

 # HG changeset patch
-# Parent d404667f80fa2eb56f5bc4db0889b208d9e095bb
+# Parent 173d619460b32b034b63f80f4ea97803e855c098
 BH Multiproduct #387 : Bloodhound functional test cases (cont.)
 
-diff -r d404667f80fa bloodhound_multiproduct/tests/functional/__init__.py
---- a/bloodhound_multiproduct/tests/functional/__init__.py	Mon Jul 01 23:35:39 2013 -0500
-+++ b/bloodhound_multiproduct/tests/functional/__init__.py	Tue Jul 02 15:47:49 2013 -0500
+diff -r 173d619460b3 bloodhound_multiproduct/tests/functional/__init__.py
+--- a/bloodhound_multiproduct/tests/functional/__init__.py	Wed Jul 03 20:17:09 2013 -0500
++++ b/bloodhound_multiproduct/tests/functional/__init__.py	Wed Jul 03 21:00:13 2013 -0500
 @@ -333,7 +333,13 @@
  
      - Preferences link removed in Bloodhound UI
          tc.notfind(internal_error)
          tc.formvalue('create_report', 'action', 'new') # select new report form
          tc.submit()
-@@ -462,6 +468,32 @@
- 
-         return name
- 
-+    def create_wiki_page(self, page, content=None):
-+        """Creates the specified wiki page, with random content if none is
-+        provided.
-+        """
-+        if content == None:
-+            content = random_page()
-+        page_url = self.url + "/wiki/" + page
-+        tc.go(page_url)
-+        tc.url(page_url)
-+        tc.find("The page %s does not exist." % page)
-+        tc.formvalue('modifypage', 'action', 'edit')
-+        tc.submit()
-+        tc.url(page_url + r'\?action=edit')
-+
-+        tc.formvalue('edit', 'text', content)
-+        tc.submit('save')
-+        tc.url(page_url+'$')
-+
-+        # verify the event shows up in the timeline
-+        self.go_to_timeline()
-+        tc.formvalue('prefs', 'wiki', True)
-+        tc.submit()
-+
-+        # [BLOODHOUND] No label 'Page CamelCase created'
-+        tc.find("Your changes have been saved in version 1")
-+
-     def go_to_query(self):
-         """Surf to the custom query page.
-         """
-@@ -473,6 +505,12 @@
+@@ -473,6 +479,12 @@
          tc.follow('Custom Query')
          tc.url(self.url + '/query')
  
      # Bloodhound functional tester extensions
  
      def go_to_newticket(self):
-@@ -513,10 +551,32 @@
+@@ -513,10 +525,32 @@
  
          return self.ticketcount
  
  
  
  class BloodhoundGlobalEnvFunctionalTester(BloodhoundFunctionalTester):
-@@ -609,6 +669,13 @@
+@@ -609,6 +643,13 @@
          with self.in_defaut_product(self):
              return superobj.create_version(name, releasetime)
  
  
  #----------------
  # Product-aware functional setup
-@@ -680,8 +747,9 @@
+@@ -680,8 +721,9 @@
  for mdl in (trac.ticket.tests.functional, trac.admin.tests.functional):
      for attr in dir(mdl):
          attr = getattr(mdl, attr)
              attr.BH_IN_DEFAULT_PRODUCT = True
  del attr, mdl
  
-@@ -697,8 +765,14 @@
+@@ -697,8 +739,14 @@
      suite.addTest(testcases.ErrorPageValidation())
      suite.addTest(testcases.RegressionTestTicket3663())
  
  
      # import trac.ticket.tests
      # trac.ticket.tests.functionalSuite(suite)
-@@ -710,12 +784,6 @@
+@@ -710,12 +758,6 @@
      import tests.functional.prefs
      tests.functional.prefs.functionalSuite(suite)
  
      # The db tests should be last since the backup test occurs there.
      import trac.db.tests
      trac.db.tests.functionalSuite(suite)
-diff -r d404667f80fa bloodhound_multiproduct/tests/functional/ticket.py
---- a/bloodhound_multiproduct/tests/functional/ticket.py	Mon Jul 01 23:35:39 2013 -0500
-+++ b/bloodhound_multiproduct/tests/functional/ticket.py	Tue Jul 02 15:47:49 2013 -0500
+diff -r 173d619460b3 bloodhound_multiproduct/tests/functional/ticket.py
+--- a/bloodhound_multiproduct/tests/functional/ticket.py	Wed Jul 03 20:17:09 2013 -0500
++++ b/bloodhound_multiproduct/tests/functional/ticket.py	Wed Jul 03 21:00:13 2013 -0500
 @@ -24,6 +24,8 @@
  
  from trac.ticket.tests.functional import *

File t387/t387_r149918_global_attachments.diff

+# HG changeset patch
+# Parent 8f92727b161f98cb2c83a36142902711961480fe
+BH Multiproduct #387 : Global vs default product attachments
+
+diff -r 8f92727b161f bloodhound_multiproduct/multiproduct/hooks.py
+--- a/bloodhound_multiproduct/multiproduct/hooks.py	Wed Jul 03 19:58:45 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/hooks.py	Wed Jul 03 20:17:09 2013 -0500
+@@ -30,7 +30,10 @@
+ from trac.web.main import RequestWithSession
+ 
+ PRODUCT_RE = re.compile(r'^/products(?:/(?P<pid>[^/]*)(?P<pathinfo>.*))?')
+-REDIRECT_DEFAULT_RE = re.compile(r'^/(?P<section>milestone|roadmap|query|report|newticket|ticket|qct|(raw-|zip-)?attachment|diff|batchmodify|search)(?P<pathinfo>.*)')
++REDIRECT_DEFAULT_RE = re.compile(r'^/(?P<section>milestone|roadmap|query|report|'
++                                  'newticket|ticket|qct|diff|batchmodify|search|'
++                                  '(raw-|zip-)?attachment/(ticket|milestone))'
++                                  '(?P<pathinfo>.*)')
+ 
+ 
+ class MultiProductEnvironmentFactory(EnvironmentFactoryBase):

File t387/t387_r149918_global_timeline.diff

+# HG changeset patch
+# Parent 6a1fe4739c7656d6edcdddada40b707c0310f966
+BH Multiproduct #387 : Global /timeline
+
+diff -r 6a1fe4739c76 bloodhound_multiproduct/multiproduct/hooks.py
+--- a/bloodhound_multiproduct/multiproduct/hooks.py	Wed Jul 03 12:38:07 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/hooks.py	Wed Jul 03 17:51:37 2013 -0500
+@@ -30,7 +30,7 @@
+ from trac.web.main import RequestWithSession
+ 
+ PRODUCT_RE = re.compile(r'^/products(?:/(?P<pid>[^/]*)(?P<pathinfo>.*))?')
+-REDIRECT_DEFAULT_RE = re.compile(r'^/(?P<section>milestone|roadmap|query|report|newticket|ticket|qct|timeline|(raw-|zip-)?attachment|diff|batchmodify|search)(?P<pathinfo>.*)')
++REDIRECT_DEFAULT_RE = re.compile(r'^/(?P<section>milestone|roadmap|query|report|newticket|ticket|qct|(raw-|zip-)?attachment|diff|batchmodify|search)(?P<pathinfo>.*)')
+ 
+ 
+ class MultiProductEnvironmentFactory(EnvironmentFactoryBase):