Show More
@@ -1,64 +1,66 b'' | |||||
1 | from rhodecode.tests import * |
|
1 | from rhodecode.tests import * | |
2 |
|
2 | |||
3 |
|
3 | |||
4 | class TestChangelogController(TestController): |
|
4 | class TestChangelogController(TestController): | |
5 |
|
5 | |||
6 | def test_index_hg(self): |
|
6 | def test_index_hg(self): | |
7 | self.log_user() |
|
7 | self.log_user() | |
8 | response = self.app.get(url(controller='changelog', action='index', |
|
8 | response = self.app.get(url(controller='changelog', action='index', | |
9 | repo_name=HG_REPO)) |
|
9 | repo_name=HG_REPO)) | |
10 |
|
10 | |||
11 | response.mustcontain("""<div id="chg_20" class="container tablerow1">""") |
|
11 | response.mustcontain("""<div id="chg_20" class="container tablerow1">""") | |
12 | response.mustcontain( |
|
12 | response.mustcontain( | |
13 | """<input class="changeset_range" id="5e204e7583b9" """ |
|
13 | """<input class="changeset_range" id="5e204e7583b9" """ | |
14 | """name="5e204e7583b9" type="checkbox" value="1" />""" |
|
14 | """name="5e204e7583b9" type="checkbox" value="1" />""" | |
15 | ) |
|
15 | ) | |
16 | response.mustcontain( |
|
16 | response.mustcontain( | |
17 | """<span class="changeset_id">154:""" |
|
17 | """<span class="changeset_id">154:""" | |
18 | """<span class="changeset_hash">5e204e7583b9</span></span>""" |
|
18 | """<span class="changeset_hash">5e204e7583b9</span></span>""" | |
19 | ) |
|
19 | ) | |
20 |
|
20 | |||
21 | response.mustcontain("""Small update at simplevcs app""") |
|
21 | response.mustcontain("""Small update at simplevcs app""") | |
22 |
|
22 | |||
23 | response.mustcontain( |
|
23 | response.mustcontain( | |
24 | """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ |
|
24 | """<div id="5e204e7583b9c8e7b93a020bd036564b1e731dae" """ | |
25 | """style="float:right;" class="changed_total tooltip" """ |
|
25 | """style="float:right;" class="changed_total tooltip" """ | |
26 | """title="Affected number of files, click to show """ |
|
26 | """title="Affected number of files, click to show """ | |
27 | """more details">3</div>""" |
|
27 | """more details">3</div>""" | |
28 | ) |
|
28 | ) | |
29 |
|
29 | |||
30 | #pagination |
|
30 | #pagination | |
31 | response = self.app.get(url(controller='changelog', action='index', |
|
31 | response = self.app.get(url(controller='changelog', action='index', | |
32 | repo_name=HG_REPO), {'page':1}) |
|
32 | repo_name=HG_REPO), {'page':1}) | |
33 | response = self.app.get(url(controller='changelog', action='index', |
|
33 | response = self.app.get(url(controller='changelog', action='index', | |
34 | repo_name=HG_REPO), {'page':2}) |
|
34 | repo_name=HG_REPO), {'page':2}) | |
35 | response = self.app.get(url(controller='changelog', action='index', |
|
35 | response = self.app.get(url(controller='changelog', action='index', | |
36 | repo_name=HG_REPO), {'page':3}) |
|
36 | repo_name=HG_REPO), {'page':3}) | |
37 | response = self.app.get(url(controller='changelog', action='index', |
|
37 | response = self.app.get(url(controller='changelog', action='index', | |
38 | repo_name=HG_REPO), {'page':4}) |
|
38 | repo_name=HG_REPO), {'page':4}) | |
39 | response = self.app.get(url(controller='changelog', action='index', |
|
39 | response = self.app.get(url(controller='changelog', action='index', | |
40 | repo_name=HG_REPO), {'page':5}) |
|
40 | repo_name=HG_REPO), {'page':5}) | |
41 | response = self.app.get(url(controller='changelog', action='index', |
|
41 | response = self.app.get(url(controller='changelog', action='index', | |
42 | repo_name=HG_REPO), {'page':6}) |
|
42 | repo_name=HG_REPO), {'page':6}) | |
43 |
|
43 | |||
44 | # Test response after pagination... |
|
44 | # Test response after pagination... | |
45 | response.mustcontain( |
|
45 | response.mustcontain( | |
46 | """<input class="changeset_range" id="46ad32a4f974" """ |
|
46 | """<input class="changeset_range" id="46ad32a4f974" """ | |
47 | """name="46ad32a4f974" type="checkbox" value="1" />""" |
|
47 | """name="46ad32a4f974" type="checkbox" value="1" />""" | |
48 | ) |
|
48 | ) | |
49 | response.mustcontain( |
|
49 | response.mustcontain( | |
50 | """<span class="changeset_id">64:""" |
|
50 | """<span class="changeset_id">64:""" | |
51 | """<span class="changeset_hash">46ad32a4f974</span></span>""" |
|
51 | """<span class="changeset_hash">46ad32a4f974</span></span>""" | |
52 | ) |
|
52 | ) | |
53 |
|
53 | |||
54 | response.mustcontain( |
|
54 | response.mustcontain( | |
55 | """<div id="46ad32a4f974e45472a898c6b0acb600320579b1" """ |
|
55 | """<div id="46ad32a4f974e45472a898c6b0acb600320579b1" """ | |
56 | """style="float:right;" class="changed_total tooltip" """ |
|
56 | """style="float:right;" class="changed_total tooltip" """ | |
57 | """title="Affected number of files, click to show """ |
|
57 | """title="Affected number of files, click to show """ | |
58 | """more details">21</div>""" |
|
58 | """more details">21</div>""" | |
59 | ) |
|
59 | ) | |
60 |
|
60 | |||
61 | response.mustcontain("""<div class="message"><a href="/%s/changeset/""" |
|
61 | response.mustcontain( | |
62 | """46ad32a4f974e45472a898c6b0acb600320579b1">""" |
|
62 | """<a href="/%s/changeset/""" | |
63 | """Merge with 2e6a2bf9356ca56df08807f4ad86d48""" |
|
63 | """46ad32a4f974e45472a898c6b0acb600320579b1" """ | |
64 | """0da72a8f4</a></div>""" % HG_REPO) |
|
64 | """title="Merge with 2e6a2bf9356ca56df08807f4ad86d480da72a8f4">""" | |
|
65 | """46ad32a4f974</a>""" % HG_REPO | |||
|
66 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now