Merge lp:~elopio/ubuntuone-testing/open-tos-second-bottom into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 136
Merged at revision: 120
Proposed branch: lp:~elopio/ubuntuone-testing/open-tos-second-bottom
Merge into: lp:ubuntuone-testing
Prerequisite: lp:~elopio/ubuntuone-testing/open-pp-from-footer
Diff against target: 69 lines (+44/-2)
3 files modified
ubuntuone/web/tests/sst/shared/actions/terms_of_service.py (+19/-0)
ubuntuone/web/tests/sst/termsofservice/u1webtos124_opentermsofservicepagefromfooter.py (+1/-2)
ubuntuone/web/tests/sst/termsofservice/u1webtos126_opentermsofservicepagefromsecondbottommenu.py (+24/-0)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/open-tos-second-bottom
Reviewer Review Type Date Requested Status
Vincent Ladeuil (community) Approve
Review via email: mp+119953@code.launchpad.net

Commit message

Added the test to open the Terms of service page from the second bottom menu.

Description of the change

Added the test to open the Terms of service page from the second bottom menu.
A little refactoring on the other Terms of Service test.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/shared/actions/terms_of_service.py'
2--- ubuntuone/web/tests/sst/shared/actions/terms_of_service.py 2012-08-16 14:30:41 +0000
3+++ ubuntuone/web/tests/sst/shared/actions/terms_of_service.py 2012-08-16 14:30:41 +0000
4@@ -24,6 +24,25 @@
5 return get_element_by_css('.copyright-privacy a[href="/terms/"]')
6
7
8+def click_terms_of_service_second_bottom_menu_link():
9+ click_link(_get_terms_of_service_second_bottom_menu_link())
10+
11+
12+def _get_terms_of_service_second_bottom_menu_link():
13+ return get_element_by_css('.sec h3 a[href="/terms/"]')
14+
15+
16+def assert_page():
17+ assert_page_url()
18+ assert_page_title()
19+ assert_page_heading1()
20+
21+
22+def assert_page_url():
23+ base_url = get_base_url()
24+ assert_url(base_url + 'terms/')
25+
26+
27 def assert_page_title():
28 assert_title(u'Ubuntu One : Terms and Conditions')
29
30
31=== renamed file 'ubuntuone/web/tests/sst/termsofservice/u1webtos_opentermsofservicepagefromfooter.py' => 'ubuntuone/web/tests/sst/termsofservice/u1webtos124_opentermsofservicepagefromfooter.py'
32--- ubuntuone/web/tests/sst/termsofservice/u1webtos_opentermsofservicepagefromfooter.py 2012-08-16 14:30:41 +0000
33+++ ubuntuone/web/tests/sst/termsofservice/u1webtos124_opentermsofservicepagefromfooter.py 2012-08-16 14:30:41 +0000
34@@ -20,5 +20,4 @@
35
36 setup_actions.setup(login_or_sign_up=False)
37 terms_of_service_actions.click_terms_of_service_footer_link()
38-terms_of_service_actions.assert_page_title()
39-terms_of_service_actions.assert_page_heading1()
40+terms_of_service_actions.assert_page()
41
42=== added file 'ubuntuone/web/tests/sst/termsofservice/u1webtos126_opentermsofservicepagefromsecondbottommenu.py'
43--- ubuntuone/web/tests/sst/termsofservice/u1webtos126_opentermsofservicepagefromsecondbottommenu.py 1970-01-01 00:00:00 +0000
44+++ ubuntuone/web/tests/sst/termsofservice/u1webtos126_opentermsofservicepagefromsecondbottommenu.py 2012-08-16 14:30:41 +0000
45@@ -0,0 +1,24 @@
46+# -*- coding: utf-8 -*-
47+
48+# Copyright 2012 Canonical Ltd.
49+#
50+# This program is free software: you can redistribute it and/or modify it
51+# under the terms of the GNU General Public License version 3, as published
52+# by the Free Software Foundation.
53+#
54+# This program is distributed in the hope that it will be useful, but
55+# WITHOUT ANY WARRANTY; without even the implied warranties of
56+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
57+# PURPOSE. See the GNU General Public License for more details.
58+#
59+# You should have received a copy of the GNU General Public License along
60+# with this program. If not, see <http://www.gnu.org/licenses/>.
61+
62+from actions import (
63+ setup,
64+ terms_of_service,
65+ )
66+
67+setup.setup(login_or_sign_up=False)
68+terms_of_service.click_terms_of_service_second_bottom_menu_link()
69+terms_of_service.assert_page()

Subscribers

People subscribed via source and target branches