Merge
[text_view_comments] To allow scrolling in Safari mobile, we set the content of text_view_comments frame in a jQuery UI layout.
[c_sync.js] So the automated scrolling operations in c_sync.js must be adjustable to the right part to scroll.
[c_sync.js] Also, if a comment have to be shown outside of the current viewport, we scroll the correct part to that viewport
and then set the comment top Y offset to juste what it needs to avoid the "Add comment" button after scrolling
operation.
[c_sync.js] If not in Safari mobile, we add an offset here to avoid comment to display under the "Add comment" button.
from django.test import TestCase
from django.test.client import Client
from django.core import management
from datetime import datetime
from cm.activity import *
from cm.models import *
from cm.security import *
class ActivityTest(TestCase):
fixtures = ['roles_generic','test_content']
def test_process_activities(self):
text = Text.objects.get(id=1)
activity = get_activity(text, user='all', reference_date=datetime(2009,02,01))
self.assertEqual(activity, [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])