diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py --- a/rhodecode/tests/functional/test_changelog.py +++ b/rhodecode/tests/functional/test_changelog.py @@ -15,11 +15,9 @@ class TestChangelogController(TestContro """name="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ """type="checkbox" value="1" />""" ) + response.mustcontain( - """154:""" - ) - response.mustcontain( - """5e204e7583b9""" + """r154:5e204e7583b9""" ) response.mustcontain("""Small update at simplevcs app""") @@ -31,16 +29,18 @@ class TestChangelogController(TestContro # """more details">3""" # ) + def test_index_pagination_hg(self): + self.log_user() #pagination - response = self.app.get(url(controller='changelog', action='index', + self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 1}) - response = self.app.get(url(controller='changelog', action='index', + self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 2}) - response = self.app.get(url(controller='changelog', action='index', + self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 3}) - response = self.app.get(url(controller='changelog', action='index', + self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 4}) - response = self.app.get(url(controller='changelog', action='index', + self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 5}) response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page': 6}) @@ -52,11 +52,9 @@ class TestChangelogController(TestContro """name="46ad32a4f974e45472a898c6b0acb600320579b1" """ """type="checkbox" value="1" />""" ) + response.mustcontain( - """64:""" - ) - response.mustcontain( - """46ad32a4f974""" + """r64:46ad32a4f974""" ) # response.mustcontain( @@ -72,3 +70,57 @@ class TestChangelogController(TestContro # """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" # """46ad32a4f974""" % HG_REPO # ) + + def test_index_git(self): + self.log_user() + response = self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO)) + + response.mustcontain('''id="chg_20" class="container tablerow1"''') + response.mustcontain( + """""" + ) + + response.mustcontain( + """r613:95f9a91d775b""" + ) + + response.mustcontain("""fixing stupid typo in context for mercurial""") + +# response.mustcontain( +# """
3
""" +# ) + + def test_index_pagination_git(self): + self.log_user() + #pagination + self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 1}) + self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 2}) + self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 3}) + self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 4}) + self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 5}) + response = self.app.get(url(controller='changelog', action='index', + repo_name=GIT_REPO), {'page': 6}) + + # Test response after pagination... + response.mustcontain( + """""" + ) + + response.mustcontain( + """r515:636ed213f2f1""" + )