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

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 138
Merged at revision: 121
Proposed branch: lp:~elopio/ubuntuone-testing/open-pp-second-bottom
Merge into: lp:ubuntuone-testing
Prerequisite: lp:~elopio/ubuntuone-testing/open-tos-second-bottom
Diff against target: 67 lines (+43/-2)
3 files modified
ubuntuone/web/tests/sst/privacypolicy/u1webpp125_openprivacypolicyfromfooter.py (+1/-2)
ubuntuone/web/tests/sst/privacypolicy/u1webpp127_openprivacypolicyfromsecondbottommenu.py (+24/-0)
ubuntuone/web/tests/sst/shared/actions/privacy_policy.py (+18/-0)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/open-pp-second-bottom
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+119955@code.launchpad.net

Commit message

Added the test to open the privacy policy from the second bottom menu.

Description of the change

Added the test to open the privacy policy from the second bottom menu.

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

easy peasy

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

Subscribers

People subscribed via source and target branches