Changeset - ef0613584ced
[Not reviewed]
beta
0 4 0
Marcin Kuzminski - 14 years ago 2011-12-18 03:41:52
marcin@python-works.com
test fixes
4 files changed with 21 insertions and 22 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -67,45 +67,45 @@
 
  %endif      
 
  </div>
 
</div>  
 
</%def>
 
 
 
<%def name="comments(changeset)">
 
 
<div class="comments">
 
    <div class="comments-number">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
 
    
 
    %for path, lines in c.inline_comments:
 
        <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${h.FID(changeset.raw_id,path)}">
 
        % for line,comments in lines.iteritems():
 
            <div class="inline-comment-placeholder-line" line="${line}" target_id="${h.safeid(h.safe_unicode(path))}"> 
 
            %for co in comments:
 
                ${comment_block(co)}
 
            %endfor
 
            </div>
 
        %endfor
 
        </div>
 
    %endfor        
 
    
 
    %for co in c.comments:
 
        ${comment.comment_block(co)}
 
        ${comment_block(co)}
 
    %endfor
 
    %if c.rhodecode_user.username != 'default':
 
    <div class="comment-form">
 
        ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=changeset.raw_id))}
 
        <strong>${_('Leave a comment')}</strong>
 
        <div class="clearfix">
 
            <div class="comment-help">
 
                ${_('Comments parsed using')} <a href="${h.url('rst_help')}">RST</a> ${_('syntax')}
 
                ${_('with')} <span style="color:#003367" class="tooltip" title="${_('Use @username inside this text to send notification to this RhodeCode user')}">@mention</span> ${_('support')}
 
            </div>
 
                ${h.textarea('text')}
 
        </div>
 
        <div class="comment-button">
 
        ${h.submit('save', _('Comment'), class_='ui-button')}
 
        </div>
 
        ${h.end_form()}
 
    </div>
 
    %endif
 
</div>
 
</%def>
rhodecode/tests/functional/test_branches.py
Show inline comments
 
from rhodecode.tests import *
 

	
 
class TestBranchesController(TestController):
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='branches',
 
                                    action='index', repo_name=HG_REPO))
 

	
 
        self.assertTrue("""<a href="/%s/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">default</a>""" % HG_REPO in response.body)
 
        self.assertTrue("""<a href="/%s/changeset/97e8b885c04894463c51898e14387d80c30ed1ee">git</a>""" % HG_REPO in response.body)
 
        self.assertTrue("""<a href="/%s/changeset/2e6a2bf9356ca56df08807f4ad86d480da72a8f4">web</a>""" % HG_REPO in response.body)
 
        response.mustcontain("""<a href="/%s/files/27cd5cce30c96924232dffcd24178a07ffeb5dfc/">default</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/97e8b885c04894463c51898e14387d80c30ed1ee/">git</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/2e6a2bf9356ca56df08807f4ad86d480da72a8f4/">web</a>""" % HG_REPO)
 

	
 

	
 

	
 

	
 

	
 

	
rhodecode/tests/functional/test_home.py
Show inline comments
 
from rhodecode.tests import *
 

	
 

	
 
class TestHomeController(TestController):
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='home', action='index'))
 
        #if global permission is set
 
        self.assertTrue('ADD NEW REPOSITORY' in response.body)
 
        self.assertTrue('href="/%s/summary"' % HG_REPO in response.body)
 
        # Test response...
 
        response.mustcontain('ADD REPOSITORY')
 
        response.mustcontain('href="/%s/summary"' % HG_REPO)
 

	
 
        self.assertTrue("""<img class="icon" title="Mercurial repository" """
 
        response.mustcontain("""<img class="icon" title="Mercurial repository" """
 
                        """alt="Mercurial repository" src="/images/icons/hg"""
 
                        """icon.png"/>""" in response.body)
 
        self.assertTrue("""<img class="icon" title="public repository" """
 
                        """icon.png"/>""")
 
        response.mustcontain("""<img class="icon" title="public repository" """
 
                        """alt="public repository" src="/images/icons/lock_"""
 
                        """open.png"/>""" in response.body)
 
        
 
        self.assertTrue("""<a title="Marcin Kuzminski &lt;marcin@python-works.com&gt;
 
merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>"""
 
                            in response.body)
 
                        """open.png"/>""")
 

	
 
        response.mustcontain(
 
"""<a title="Marcin Kuzminski &lt;marcin@python-works.com&gt;:\n
 
merge" class="tooltip" href="/vcs_test_hg/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">r173:27cd5cce30c9</a>""")
rhodecode/tests/functional/test_tags.py
Show inline comments
 
from rhodecode.tests import *
 

	
 
class TestTagsController(TestController):
 

	
 
    def test_index(self):
 
        self.log_user()
 
        response = self.app.get(url(controller='tags', action='index', repo_name=HG_REPO))
 
        assert """<a href="/%s/changeset/27cd5cce30c96924232dffcd24178a07ffeb5dfc">tip</a>""" % HG_REPO in response.body, 'wrong info about tip tag'
 
        assert """<a href="/%s/changeset/fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200">0.1.4</a>""" % HG_REPO in response.body, 'wrong info about 0.1.4 tag'
 
        assert """<a href="/%s/changeset/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">0.1.3</a>""" % HG_REPO in response.body, 'wrong info about 0.1.3 tag'
 
        assert """<a href="/%s/changeset/a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720">0.1.2</a>""" % HG_REPO in response.body, 'wrong info about 0.1.2 tag'
 
        assert """<a href="/%s/changeset/eb3a60fc964309c1a318b8dfe26aa2d1586c85ae">0.1.1</a>""" % HG_REPO in response.body, 'wrong info about 0.1.1 tag'
 
        # Test response...
 
        response.mustcontain("""<a href="/%s/files/27cd5cce30c96924232dffcd24178a07ffeb5dfc/">tip</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/fd4bdb5e9b2a29b4393a4ac6caef48c17ee1a200/">0.1.4</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf/">0.1.3</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/a7e60bff65d57ac3a1a1ce3b12a70f8a9e8a7720/">0.1.2</a>""" % HG_REPO)
 
        response.mustcontain("""<a href="/%s/files/eb3a60fc964309c1a318b8dfe26aa2d1586c85ae/">0.1.1</a>""" % HG_REPO)
 

	
0 comments (0 inline, 0 general)