Merge lp:~toykeeper/ubuntuone-testing/referrals-section-in-faq into lp:~elopio/+junk/referrals-create-account

Proposed by Selene ToyKeeper
Status: Rejected
Rejected by: Leonardo Arias Fonseca
Proposed branch: lp:~toykeeper/ubuntuone-testing/referrals-section-in-faq
Merge into: lp:~elopio/+junk/referrals-create-account
Diff against target: 58 lines (+44/-0)
2 files modified
ubuntuone/web/tests/sst/referrals/u1webref122_referralsinfaq.py (+30/-0)
ubuntuone/web/tests/sst/shared/actions/newdashboard.py (+14/-0)
To merge this branch: bzr merge lp:~toykeeper/ubuntuone-testing/referrals-section-in-faq
Reviewer Review Type Date Requested Status
Leonardo Arias Fonseca Approve
Review via email: mp+118827@code.launchpad.net

Commit message

Implemented test u1webref-122:
- Go to the new to the new dashboard.
  (The website will show the new Dashboard page, with the Get more storage free! section.)
- In the Get more storage free! section, click the Read More > link.
  (The website will show the FAQs page, on the Referrals section.)

(works, except for checking the browser's scroll position)

Description of the change

Implemented test u1webref-122.

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

Thanks!

review: Approve
Revision history for this message
Leonardo Arias Fonseca (elopio) wrote :

The tests are now inside the ubuntuone-servers project.

Unmerged revisions

121. By Selene ToyKeeper

removed extra code

120. By Selene ToyKeeper

Implemented test u1webref-122:
- Go to the new to the new dashboard.
  (The website will show the new Dashboard page, with the Get more storage free! section.)
- In the Get more storage free! section, click the Read More > link.
  (The website will show the FAQs page, on the Referrals section.)

(works, except for checking the browser's scroll position)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'ubuntuone/web/tests/sst/referrals/u1webref122_referralsinfaq.py'
2--- ubuntuone/web/tests/sst/referrals/u1webref122_referralsinfaq.py 1970-01-01 00:00:00 +0000
3+++ ubuntuone/web/tests/sst/referrals/u1webref122_referralsinfaq.py 2012-08-08 20:51:19 +0000
4@@ -0,0 +1,30 @@
5+# -*- coding: utf-8 -*-
6+
7+# Copyright 2012 Canonical Ltd.
8+#
9+# This program is free software: you can redistribute it and/or modify it
10+# under the terms of the GNU General Public License version 3, as published
11+# by the Free Software Foundation.
12+#
13+# This program is distributed in the hope that it will be useful, but
14+# WITHOUT ANY WARRANTY; without even the implied warranties of
15+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16+# PURPOSE. See the GNU General Public License for more details.
17+#
18+# You should have received a copy of the GNU General Public License along
19+# with this program. If not, see <http://www.gnu.org/licenses/>.
20+
21+"""Test case u1webref-122 FAQ links to Referrals section.
22+Verify the new dashboard has a 'Get more storage free!' bit
23+with a 'Read more' link which goes to the Referrals section of the FAQ.
24+"""
25+
26+from sst.actions import *
27+import actions.setup as setup_actions
28+import actions.newdashboard as newdashboard_actions
29+
30+setup_actions.setup()
31+newdashboard_actions.open()
32+newdashboard_actions.assert_more_storage_free()
33+newdashboard_actions.click_read_more()
34+newdashboard_actions.assert_referrals_header()
35
36=== modified file 'ubuntuone/web/tests/sst/shared/actions/newdashboard.py'
37--- ubuntuone/web/tests/sst/shared/actions/newdashboard.py 2012-08-07 17:06:37 +0000
38+++ ubuntuone/web/tests/sst/shared/actions/newdashboard.py 2012-08-08 20:51:19 +0000
39@@ -27,6 +27,20 @@
40 def assert_page_title():
41 assert_title(PAGE_TITLE)
42
43+def assert_more_storage_free():
44+ title_element = get_element_by_css('.referrals > h2')
45+ expected_title = 'Get more storage free!'
46+ assert(title_element.text.startswith(expected_title))
47+
48+def click_read_more():
49+ faq_link = get_element_by_css('.referrals > h2 > a')
50+ assert(faq_link.text.startswith('Read More'))
51+ click_link(faq_link)
52+
53+def assert_referrals_header():
54+ title_element = get_element_by_css('#account_referrals')
55+ expected_title = 'Referrals'
56+ assert(title_element.text.startswith(expected_title))
57
58 # Referrals.
59

Subscribers

People subscribed via source and target branches