You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2018/07/22 19:45:32 UTC

[2/4] allura git commit: [#8219] Personal Dashboard - Test Tickets section and fix issue in tickets.html

[#8219] Personal Dashboard - Test Tickets section and fix issue in tickets.html


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/3548605b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3548605b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3548605b

Branch: refs/heads/master
Commit: 3548605b7609ce97c6091f84b15c22c9450be3a0
Parents: a7ddd0c
Author: deshanigtk <de...@cse.mrt.ac.lk>
Authored: Tue Jul 17 22:48:57 2018 +0530
Committer: deshanigtk <de...@cse.mrt.ac.lk>
Committed: Tue Jul 17 22:48:57 2018 +0530

----------------------------------------------------------------------
 .../templates/sections/tickets.html                |  1 -
 .../tests/functional/test_personal_dashboard.py    | 17 +++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/3548605b/Allura/allura/ext/personal_dashboard/templates/sections/tickets.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/personal_dashboard/templates/sections/tickets.html b/Allura/allura/ext/personal_dashboard/templates/sections/tickets.html
index f45cbc7..6484af0 100644
--- a/Allura/allura/ext/personal_dashboard/templates/sections/tickets.html
+++ b/Allura/allura/ext/personal_dashboard/templates/sections/tickets.html
@@ -33,7 +33,6 @@
     {% if count %}
     {{ page_size.display(page=page, count=count, limit=limit) }}
         <table>
-            <tbody>
             <thead>
             <tr>
                 <th data-sort="ticket_num_i">#</th>

http://git-wip-us.apache.org/repos/asf/allura/blob/3548605b/Allura/allura/tests/functional/test_personal_dashboard.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_personal_dashboard.py b/Allura/allura/tests/functional/test_personal_dashboard.py
index 46912c1..37d78ff 100644
--- a/Allura/allura/tests/functional/test_personal_dashboard.py
+++ b/Allura/allura/tests/functional/test_personal_dashboard.py
@@ -23,7 +23,6 @@ from allura import model as M
 from allura.lib.widgets.user_profile import SectionsUtil
 from allura.tests import TestController
 from allura.tests import decorators as td
-from ming.orm.ormsession import ThreadLocalORMSession
 
 from forgetracker.tests.functional.test_root import TrackerTestController
 
@@ -64,7 +63,13 @@ class TestPersonalDashboard(TestController):
                 assert_not_in('Section f', r.body)
 
 
-class TestTicketsSection(TestController):
+class TestTicketsSection(TrackerTestController):
+
+    @td.with_tracker
+    def setup_with_tools(self):
+        self.project = M.Project.query.get(shortname='test2')
+        self.tracker = self.project.app_instance('bugs')
+        self.new_ticket(summary='foo', _milestone='1.0', assigned_to='test-admin')
 
     def _find_new_ticket_form(self, resp):
         def cond(f):
@@ -95,12 +100,8 @@ class TestTicketsSection(TestController):
         assert resp.status_int != 200, resp
         return resp
 
-    @td.with_tool('test/sub1', 'Tickets', 'tickets')
+    @td.with_tool('test2', 'Tickets', 'tickets')
     def test_tickets_section(self):
-        self.new_ticket(summary="my ticket", _milestone='1.0', mount_point="/sub1/tickets/")
-        ThreadLocalORMSession.flush_all()
-        M.MonQTask.run_ready()
-        ThreadLocalORMSession.flush_all()
         response = self.app.get('/dashboard')
         ticket_rows = response.html.find('tbody')
-        assert_in('my ticket', str(ticket_rows))
+        assert_in('foo', str(ticket_rows))