Merge lp:~elopio/ubuntuone-testing/removenotes into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Rick McBride
Approved revision: 81
Merged at revision: 81
Proposed branch: lp:~elopio/ubuntuone-testing/removenotes
Merge into: lp:ubuntuone-testing
Diff against target: 182 lines (+0/-158)
3 files modified
ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py (+0/-2)
ubuntuone/web/tests/sst/shared/actions/notes.py (+0/-129)
ubuntuone/web/tests/sst/smoketest/notespage.py (+0/-27)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/removenotes
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+97771@code.launchpad.net

Commit message

Removed the remaining notes tests and actions.

Description of the change

Removed the remaining notes tests and actions.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
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/navigation/u1webn001_maintabs.py'
2--- ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py 2011-12-09 18:26:08 +0000
3+++ ubuntuone/web/tests/sst/navigation/u1webn001_maintabs.py 2012-03-15 23:17:19 +0000
4@@ -23,12 +23,10 @@
5 import actions.setup as setup_actions
6 import actions.dashboard as dashboard_actions
7 import actions.files as files_actions
8-import actions.notes as notes_actions
9 import actions.contacts as contacts_actions
10
11 setup_actions.setup()
12 dashboard_actions.assert_page_title()
13 files_actions.open()
14-notes_actions.open()
15 contacts_actions.open()
16 dashboard_actions.open()
17
18=== removed file 'ubuntuone/web/tests/sst/shared/actions/notes.py'
19--- ubuntuone/web/tests/sst/shared/actions/notes.py 2012-02-02 00:51:29 +0000
20+++ ubuntuone/web/tests/sst/shared/actions/notes.py 1970-01-01 00:00:00 +0000
21@@ -1,129 +0,0 @@
22-# -*- coding: utf-8 -*-
23-
24-# Copyright 2011 Canonical Ltd.
25-#
26-# This program is free software: you can redistribute it and/or modify it
27-# under the terms of the GNU General Public License version 3, as published
28-# by the Free Software Foundation.
29-#
30-# This program is distributed in the hope that it will be useful, but
31-# WITHOUT ANY WARRANTY; without even the implied warranties of
32-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
33-# PURPOSE. See the GNU General Public License for more details.
34-#
35-# You should have received a copy of the GNU General Public License along
36-# with this program. If not, see <http://www.gnu.org/licenses/>.
37-
38-"""Actions for the Notes page of the Ubuntu One website."""
39-
40-from sst.actions import *
41-from loading import *
42-from selenium.webdriver.common import keys
43-
44-
45-def open():
46- """Open the notes page and check its title with an assert."""
47- click_link(_get_notes_link(), wait=False)
48- switch_to_window()
49- assert_page_title()
50-
51-
52-def _get_notes_link():
53- return get_element_by_css('#main-nav .notes')
54-
55-
56-def assert_page_title():
57- """Assert that the title of the page is the expected."""
58- assert_title(u'Ubuntu One : Notes')
59-
60-
61-def assert_note_exists(title):
62- get_element(tag='li', text=title)
63-
64-
65-def select_note(title):
66- click_link(_get_note_link(title))
67- wait_for_action_to_complete()
68-
69-
70-def _get_note_link(title):
71- return get_element(tag='a', css_class='note_link', text=title)
72-
73-
74-def assert_note(title, body):
75- if title:
76- displayed_title = _get_note_title()
77- assert displayed_title == title, \
78- 'Title is %(displayed)s, but it should be %(expected)s.' % \
79- {'displayed':displayed_title, 'expected':title}
80- if body:
81- displayed_body = _get_note_body()
82- assert displayed_body == body, \
83- 'Body is %(displayed)s, but it should be %(expected)s.' % \
84- {'displayed':displayed_body, 'expected':body}
85-
86-
87-def _get_note_title():
88- return get_element_by_css('#notes-main > h2').text
89-
90-
91-def _get_note_body():
92- return get_element_by_css('#notes-main > .note-view').text
93-
94-
95-def add_note(title, body):
96- """Click the button to add note."""
97- _click_add_note()
98- _fill(title, body)
99- _save()
100-
101-
102-def _click_add_note():
103- link_add = get_element(css_class='add-button')
104- click_link(link_add)
105- wait_for_action_to_complete()
106-
107-
108-def _fill(title, body):
109- if title:
110- write_textfield('id_title', title)
111- if body:
112- switch_to_frame('id_body_editor')
113- body_element = get_element(tag='body')
114- body_element.send_keys(keys.Keys().CONTROL, 'a')
115- body_element.send_keys(keys.Keys().DELETE)
116- body_element.send_keys(body)
117- switch_to_frame()
118-
119-
120-def _save():
121- link_save = get_elements(css_class='save-button')[0]
122- click_element(link_save)
123- wait_for_action_to_complete()
124-
125-
126-def edit_note(edited_title, edited_body):
127- """Click the button to edit note."""
128- _click_edit_note()
129- _fill(edited_title, edited_body)
130- _save()
131-
132-
133-def _click_edit_note():
134- link_edit = get_elements(css_class='edit-button')[0]
135- click_link(link_edit)
136- wait_for_action_to_complete()
137-
138-
139-def delete_note(title):
140- """Delete the note"""
141- select_note(title)
142- delete_button = get_element_by_css('li.selected > a.delete-button')
143- click_element(delete_button, wait=False)
144- accept_alert()
145- wait_for_action_to_complete()
146-
147-
148-def assert_note_was_deleted(title):
149- fails(assert_note_exists, title)
150- assert_text('notes-main', '"%s" has been deleted' % title)
151
152=== removed file 'ubuntuone/web/tests/sst/smoketest/notespage.py'
153--- ubuntuone/web/tests/sst/smoketest/notespage.py 2011-12-09 18:19:11 +0000
154+++ ubuntuone/web/tests/sst/smoketest/notespage.py 1970-01-01 00:00:00 +0000
155@@ -1,27 +0,0 @@
156-# -*- coding: utf-8 -*-
157-
158-# Authors:
159-# Rick McBride <rick.mcbride@canonical.com>
160-#
161-# Copyright 2011 Canonical Ltd.
162-#
163-# This program is free software: you can redistribute it and/or modify it
164-# under the terms of the GNU General Public License version 3, as published
165-# by the Free Software Foundation.
166-#
167-# This program is distributed in the hope that it will be useful, but
168-# WITHOUT ANY WARRANTY; without even the implied warranties of
169-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
170-# PURPOSE. See the GNU General Public License for more details.
171-#
172-# You should have received a copy of the GNU General Public License along
173-# with this program. If not, see <http://www.gnu.org/licenses/>.
174-
175-'''Check existence of notes Page.'''
176-from sst.actions import *
177-import actions.setup as setup_actions
178-
179-setup_actions.setup(new_user=False)
180-go_to("/notes/")
181-setup_actions.wait_for(assert_title, u"Ubuntu One : Notes")
182-exists_element(css_class='add-button', text='Add note')

Subscribers

People subscribed via source and target branches