Merge lp:~sinzui/launchpad/answers-ui-fixes into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Approved by: Henning Eggers
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~sinzui/launchpad/answers-ui-fixes
Merge into: lp:launchpad
Diff against target: 585 lines (+110/-59)
17 files modified
lib/lp/answers/browser/configure.zcml (+11/-0)
lib/lp/answers/browser/faq.py (+12/-7)
lib/lp/answers/browser/question.py (+11/-4)
lib/lp/answers/browser/tests/test_breadcrumbs.py (+28/-0)
lib/lp/answers/stories/faq-add.txt (+1/-1)
lib/lp/answers/stories/faq-browse-and-search.txt (+1/-1)
lib/lp/answers/stories/faq-edit.txt (+1/-1)
lib/lp/answers/stories/project-add-question.txt (+8/-8)
lib/lp/answers/stories/question-add-in-other-languages.txt (+6/-6)
lib/lp/answers/stories/question-add.txt (+5/-5)
lib/lp/answers/stories/question-answer-contact.txt (+2/-2)
lib/lp/answers/stories/question-browse-and-search.txt (+5/-5)
lib/lp/answers/stories/question-message.txt (+3/-3)
lib/lp/answers/stories/question-obfuscation.txt (+5/-5)
lib/lp/answers/stories/question-overview.txt (+1/-1)
lib/lp/answers/stories/this-is-a-faq.txt (+7/-7)
lib/lp/bugs/stories/bugs/xx-bug-create-question.txt (+3/-3)
To merge this branch: bzr merge lp:~sinzui/launchpad/answers-ui-fixes
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Approve
Review via email: mp+14278@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :
Download full text (4.4 KiB)

This is my branch to fix faq and question 3.0 bugs.

    lp:~sinzui/launchpad/faqs-ui-fixes
    Diff size: 562
    Launchpad bug: https://bugs.launchpad.net/bugs/435743
                   https://bugs.launchpad.net/bugs/435973
                   https://bugs.launchpad.net/bugs/434715
    Test command: /bin/test -vvc -t answers.*(browser|stories)
    Pre-implementation: no one
    Target release: 3.1.11

= Convert faq layouts to 3.0 =

Bug 435743 [Bread crumb missing for question and FAQ]
    The last segment of the breadcrumb is missing.

Bug 435973 [FAQ page headings are too verbose]
    The heading should be the FAQ title, but it contains the project and
    id that is expected to appear in the breadcrumbs

Bug 434715 [Button for asking a question is labeled "Add"]
    Change the action from Add to Post Question,

== Rules ==

Bug 435743 [Bread crumb missing for question and FAQ]
    * The FAQ is missing a Breadcrumb adapter; add one:
      FAQ #1234

Bug 435973 [FAQ page headings are too verbose]
    * The heading should be the FAQ title, no more.

Bug 434715 [Button for asking a question is labeled "Add"]
    Change the action from Add to Post Question.

== QA ==

Bug 435743 [Bread crumb missing for question and FAQ]
    Visit an FAQ and verify the breadcrumbs are:
    <project> : questions : faqs : FAQ #<id>

Bug 435973 [FAQ page headings are too verbose]
    Visit an FAQ and verify that the FAQ title is the entire heading

Bug 434715 [Button for asking a question is labeled "Add"]
    Verify the action to create a question is Post Question,

== Lint ==

Linting changed files:
  lib/lp/answers/browser/configure.zcml
  lib/lp/answers/browser/faq.py
  lib/lp/answers/browser/question.py
  lib/lp/answers/browser/tests/test_breadcrumbs.py
  lib/lp/answers/stories/faq-add.txt
  lib/lp/answers/stories/faq-browse-and-search.txt
  lib/lp/answers/stories/faq-edit.txt
  lib/lp/answers/stories/project-add-question.txt
  lib/lp/answers/stories/question-add-in-other-languages.txt
  lib/lp/answers/stories/question-add.txt
  lib/lp/answers/stories/question-answer-contact.txt
  lib/lp/answers/stories/question-browse-and-search.txt
  lib/lp/answers/stories/question-message.txt
  lib/lp/answers/stories/question-obfuscation.txt
  lib/lp/answers/stories/question-overview.txt
  lib/lp/answers/stories/this-is-a-faq.txt

== Test ==

    * lib/lp/answers/browser/tests/test_breadcrumbs.py
      * Added tests for FAQ and Question Breadcrumbs
    * lib/lp/answers/stories/faq-add.txt
      * Updated tests to verify FAQ titles.
    * lib/lp/answers/stories/faq-browse-and-search.txt
      * Updated tests to verify FAQ titles.
    * lib/lp/answers/stories/faq-edit.txt
      * Updated tests to verify FAQ titles.
    * lib/lp/answers/stories/project-add-question.txt
      * Updated tests to verify the create action is Post Question.
      * Updated tests to verify Question titles.
    * lib/lp/answers/stories/question-add-in-other-languages.txt
      * Updated tests to verify the create action is Post Question.
      * Updated tests to verify Question titles.
    * lib/lp/answers/stories/question-add.txt
      * Updated tests to verify the create action is Post Qu...

Read more...

Revision history for this message
Henning Eggers (henninge) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 01.11.2009 06:30, Curtis Hovey schrieb:
> Curtis Hovey has proposed merging lp:~sinzui/launchpad/answers-ui-fixes into lp:launchpad/devel.
> This is my branch to fix faq and question 3.0 bugs.

Wonderful! Thank you for doing this, including the tedious work of
fixing all tests. Thank you. I am just curious, why you changed some
page title tests to leave out the greater context, like this:

> - Questions : Ubuntu
> + Question #11 : ...

since you did this in other places:

> - Questions : Ubuntu
> + FAQ #4 : Questions : Ubuntu

No big deal, but it actually seems more work to me to remove the context
and I just wonder if you did it consciously.

One more thing:

> === modified file 'lib/lp/answers/browser/tests/test_breadcrumbs.py'
> --- lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-09-22 18:45:02 +0000
> +++ lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-11-01 05:30:29 +0000
> @@ -9,6 +9,8 @@
> from canonical.launchpad.webapp.tests.breadcrumbs import (
> BaseBreadcrumbTestCase)
>
> +from lp.testing import login_person
> +
>
> class TestQuestionTargetProjectAndPersonBreadcrumbOnAnswersVHost(
> BaseBreadcrumbTestCase):
> @@ -55,5 +57,31 @@
> self.assertEquals(last_crumb.text, 'Questions')
>
>
> +class TestAnswersBreadcrumb(BaseBreadcrumbTestCase):
> + """Test Breadcrumbs for answer module objects."""
> +
> + def setUp(self):
> + super(TestAnswersBreadcrumb, self).setUp()
> + self.product = self.factory.makeProduct(name="mellon")
> + login_person(self.product.owner)
> + self.question = self.factory.makeQuestion(
> + target=self.product, title='Seeds are hard to chew')
> + self.question_url = canonical_url(self.question, rootsite='answers')

self.question and self.question_url are not needed in all tests, are
they? I think they should be local to test_question.

> + self.faq = self.factory.makeFAQ(target=self.product, title='Seedless')
> + self.faq_url = canonical_url(self.faq, rootsite='answers')

Same goes for self.faq and self.faq_url

> +
> + def test_question(self):

question = ...
question_url = ...

(You get my point ... ;-)

> + crumbs = self._getBreadcrumbs(
> + self.question_url, [self.root, self.product, self.question])
> + last_crumb = crumbs[-1]
> + self.assertEquals(last_crumb.text, 'Question #%d' % self.question.id)
> +
> + def test_faq(self):
> + crumbs = self._getBreadcrumbs(
> + self.faq_url, [self.root, self.product, self.faq])
> + last_crumb = crumbs[-1]
> + self.assertEquals(last_crumb.text, 'FAQ #%d' % self.faq.id)
> +
> +
> def test_suite():
> return unittest.TestLoader().loadTestsFromName(__name__)

 review approve code
 merge approved

Cheers,
Henning
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrux6QACgkQBT3oW1L17iiQQwCg3MatFcXV44ulMsjsmf10Ihwx
AfsAoMHKgRGxivRfTfQij6B397j4/uIR
=dWuq
-----END PGP SIGNATURE-----

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

On Mon, 2009-11-02 at 11:51 +0000, Henning Eggers wrote:
> Review: Approve code
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 01.11.2009 06:30, Curtis Hovey schrieb:
> > Curtis Hovey has proposed merging lp:~sinzui/launchpad/answers-ui-fixes into lp:launchpad/devel.
> > This is my branch to fix faq and question 3.0 bugs.
>
> Wonderful! Thank you for doing this, including the tedious work of
> fixing all tests. Thank you. I am just curious, why you changed some
> page title tests to leave out the greater context, like this:
>
> > - Questions : Ubuntu
> > + Question #11 : ...
>
> since you did this in other places:
>
> > - Questions : Ubuntu
> > + FAQ #4 : Questions : Ubuntu
>
> No big deal, but it actually seems more work to me to remove the context
> and I just wonder if you did it consciously.

I wanted to know all "add question" or "retarget question" titles
because the pillar is not always the same as it was.

I ellipsised the other titles that user is viewing because the
breadcrumb/title rules are well tested. These will not break if a
retargeting test is inserted.

> One more thing:
>
> > === modified file 'lib/lp/answers/browser/tests/test_breadcrumbs.py'
> > --- lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-09-22 18:45:02 +0000
> > +++ lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-11-01 05:30:29 +0000
...
> > +class TestAnswersBreadcrumb(BaseBreadcrumbTestCase):
> > + """Test Breadcrumbs for answer module objects."""
> > +
> > + def setUp(self):
> > + super(TestAnswersBreadcrumb, self).setUp()
> > + self.product = self.factory.makeProduct(name="mellon")
> > + login_person(self.product.owner)
> > + self.question = self.factory.makeQuestion(
> > + target=self.product, title='Seeds are hard to chew')
> > + self.question_url = canonical_url(self.question, rootsite='answers')
>
> self.question and self.question_url are not needed in all tests, are
> they? I think they should be local to test_question.

I moved them.

--
__Curtis C. Hovey_________
http://launchpad.net/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/answers/browser/configure.zcml'
2--- lib/lp/answers/browser/configure.zcml 2009-09-18 20:03:54 +0000
3+++ lib/lp/answers/browser/configure.zcml 2009-11-07 04:51:13 +0000
4@@ -136,6 +136,12 @@
5 rootsite="answers"
6 />
7
8+ <adapter
9+ provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
10+ for="lp.answers.interfaces.question.IQuestion"
11+ factory="lp.answers.browser.question.QuestionBreadcrumb"
12+ permission="zope.Public"/>
13+
14 <browser:pages
15 for="lp.answers.interfaces.question.IQuestion"
16 permission="zope.Public"
17@@ -343,6 +349,11 @@
18 permission="launchpad.Edit"
19 template="../../app/templates/generic-edit.pt"
20 />
21+ <adapter
22+ provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
23+ for="lp.answers.interfaces.faq.IFAQ"
24+ factory="lp.answers.browser.faq.FAQBreadcrumb"
25+ permission="zope.Public"/>
26
27 <browser:defaultView
28 for="canonical.launchpad.interfaces.IPerson"
29
30=== modified file 'lib/lp/answers/browser/faq.py'
31--- lib/lp/answers/browser/faq.py 2009-09-18 20:03:54 +0000
32+++ lib/lp/answers/browser/faq.py 2009-11-07 04:51:13 +0000
33@@ -6,6 +6,7 @@
34 __metaclass__ = type
35
36 __all__ = [
37+ 'FAQBreadcrumb',
38 'FAQNavigationMenu',
39 'FAQEditView',
40 'FAQView',
41@@ -15,6 +16,7 @@
42 from canonical.launchpad.webapp import (
43 action, NavigationMenu, canonical_url, enabled_with_permission,
44 LaunchpadView, LaunchpadEditFormView, Link)
45+from canonical.launchpad.webapp.breadcrumb import Breadcrumb
46
47 from lp.answers.browser.faqcollection import FAQCollectionMenu
48 from lp.answers.interfaces.faq import IFAQ
49@@ -44,19 +46,22 @@
50 return Link(url, 'List all FAQs', icon='info')
51
52
53+class FAQBreadcrumb(Breadcrumb):
54+ """Builds a breadcrumb for an `IFAQ`."""
55+
56+ @property
57+ def text(self):
58+ return 'FAQ #%d' % self.context.id
59+
60+
61 class FAQView(LaunchpadView):
62 """View for the FAQ index."""
63
64 __used_for__ = IFAQ
65
66 @property
67- def page_title(self):
68- return '%s FAQ #%d: "%s"' % (
69- self.context.target.displayname,
70- self.context.id,
71- self.context.title)
72-
73- label = page_title
74+ def label(self):
75+ return self.context.title
76
77
78 class FAQEditView(LaunchpadEditFormView):
79
80=== modified file 'lib/lp/answers/browser/question.py'
81--- lib/lp/answers/browser/question.py 2009-10-05 15:32:50 +0000
82+++ lib/lp/answers/browser/question.py 2009-11-07 04:51:13 +0000
83@@ -8,6 +8,7 @@
84 __all__ = [
85 'SearchAllQuestionsView',
86 'QuestionAddView',
87+ 'QuestionBreadcrumb',
88 'QuestionChangeStatusView',
89 'QuestionConfirmAnswerView',
90 'QuestionCreateFAQView',
91@@ -65,6 +66,7 @@
92 LaunchpadFormView, LaunchpadEditFormView, custom_widget, redirection,
93 safe_action, NavigationMenu)
94 from canonical.launchpad.webapp.authorization import check_permission
95+from canonical.launchpad.webapp.breadcrumb import Breadcrumb
96 from canonical.launchpad.webapp.interfaces import IAlwaysSubmittedWidget
97 from canonical.launchpad.webapp.menu import structured
98 from canonical.widgets import LaunchpadRadioWidget, TokensTextWidget
99@@ -191,6 +193,14 @@
100 return redirection(canonical_url(question), status=301)
101
102
103+class QuestionBreadcrumb(Breadcrumb):
104+ """Builds a breadcrumb for an `IQuestion`."""
105+
106+ @property
107+ def text(self):
108+ return 'Question #%d' % self.context.id
109+
110+
111 class QuestionSetView(LaunchpadFormView):
112 """View for the Answer Tracker index page."""
113
114@@ -592,10 +602,7 @@
115 return self.search_template()
116 return self.continue_action.success(data)
117
118- # XXX flacoste 2006-07-26: We use the method here instead of
119- # using the method name 'handleAddError' because of Zope issue 573
120- # which is fixed in 3.3.0b1 and 3.2.1
121- @action(_('Add'), failure=handleAddError)
122+ @action(_('Post Question'), name='add', failure='handleAddError')
123 def add_action(self, action, data):
124 """Add a Question to an `IQuestionTarget`."""
125 if self.shouldWarnAboutUnsupportedLanguage():
126
127=== modified file 'lib/lp/answers/browser/tests/test_breadcrumbs.py'
128--- lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-09-22 18:45:02 +0000
129+++ lib/lp/answers/browser/tests/test_breadcrumbs.py 2009-11-07 04:51:13 +0000
130@@ -9,6 +9,8 @@
131 from canonical.launchpad.webapp.tests.breadcrumbs import (
132 BaseBreadcrumbTestCase)
133
134+from lp.testing import login_person
135+
136
137 class TestQuestionTargetProjectAndPersonBreadcrumbOnAnswersVHost(
138 BaseBreadcrumbTestCase):
139@@ -55,5 +57,31 @@
140 self.assertEquals(last_crumb.text, 'Questions')
141
142
143+class TestAnswersBreadcrumb(BaseBreadcrumbTestCase):
144+ """Test Breadcrumbs for answer module objects."""
145+
146+ def setUp(self):
147+ super(TestAnswersBreadcrumb, self).setUp()
148+ self.product = self.factory.makeProduct(name="mellon")
149+ login_person(self.product.owner)
150+
151+ def test_question(self):
152+ self.question = self.factory.makeQuestion(
153+ target=self.product, title='Seeds are hard to chew')
154+ self.question_url = canonical_url(self.question, rootsite='answers')
155+ crumbs = self._getBreadcrumbs(
156+ self.question_url, [self.root, self.product, self.question])
157+ last_crumb = crumbs[-1]
158+ self.assertEquals(last_crumb.text, 'Question #%d' % self.question.id)
159+
160+ def test_faq(self):
161+ self.faq = self.factory.makeFAQ(target=self.product, title='Seedless')
162+ self.faq_url = canonical_url(self.faq, rootsite='answers')
163+ crumbs = self._getBreadcrumbs(
164+ self.faq_url, [self.root, self.product, self.faq])
165+ last_crumb = crumbs[-1]
166+ self.assertEquals(last_crumb.text, 'FAQ #%d' % self.faq.id)
167+
168+
169 def test_suite():
170 return unittest.TestLoader().loadTestsFromName(__name__)
171
172=== modified file 'lib/lp/answers/stories/faq-add.txt'
173--- lib/lp/answers/stories/faq-add.txt 2009-09-23 14:40:53 +0000
174+++ lib/lp/answers/stories/faq-add.txt 2009-11-07 04:51:13 +0000
175@@ -67,7 +67,7 @@
176 >>> owner_browser.url
177 'http://answers.launchpad.dev/firefox/+faq/...'
178 >>> print owner_browser.title
179- Questions : Mozilla Firefox
180+ FAQ #12 : Questions : Mozilla Firefox
181
182 >>> content = find_main_content(owner_browser.contents)
183 >>> extract_text(content.find('div', {'id' : 'faq-keywords'}))
184
185=== modified file 'lib/lp/answers/stories/faq-browse-and-search.txt'
186--- lib/lp/answers/stories/faq-browse-and-search.txt 2009-09-23 14:40:53 +0000
187+++ lib/lp/answers/stories/faq-browse-and-search.txt 2009-11-07 04:51:13 +0000
188@@ -70,7 +70,7 @@
189
190 >>> browser.getLink('How can I play MP3/Divx').click()
191 >>> print backslashreplace(browser.title)
192- Questions : Ubuntu
193+ FAQ #6 : Questions : Ubuntu
194 >>> print browser.url
195 http://answers.launchpad.dev/ubuntu/+faq/6
196
197
198=== modified file 'lib/lp/answers/stories/faq-edit.txt'
199--- lib/lp/answers/stories/faq-edit.txt 2009-09-23 14:40:53 +0000
200+++ lib/lp/answers/stories/faq-edit.txt 2009-11-07 04:51:12 +0000
201@@ -11,7 +11,7 @@
202 >>> from canonical.launchpad.helpers import backslashreplace
203 >>> anon_browser.open('http://answers.launchpad.dev/firefox/+faq/7')
204 >>> print backslashreplace(anon_browser.title)
205- Questions : Mozilla Firefox
206+ FAQ #7 : Questions : Mozilla Firefox
207
208 >>> anon_browser.getLink('Edit FAQ')
209 Traceback (most recent call last):
210
211=== modified file 'lib/lp/answers/stories/project-add-question.txt'
212--- lib/lp/answers/stories/project-add-question.txt 2009-09-23 14:40:53 +0000
213+++ lib/lp/answers/stories/project-add-question.txt 2009-11-07 04:51:13 +0000
214@@ -85,7 +85,7 @@
215 as he revises the summary after reading the similar questions.
216
217 >>> user_browser.getControl('Summary').value = ''
218- >>> user_browser.getControl('Add').click()
219+ >>> user_browser.getControl('Post Question').click()
220
221 An error message in the page informs the user that the summary is
222 missing:
223@@ -114,13 +114,13 @@
224 entered.
225
226 The user then elaborates upon his question by entering a description
227-of the problem. He submits the form using the 'Add' button.
228+of the problem. He submits the form using the 'Post Question' button.
229
230 >>> user_browser.getControl('Description').value = (
231 ... "I received an HTML message containing an inlined SVG\n"
232 ... "representation of a chessboard. It didn't displayed properly.\n"
233 ... "Is there a way to configure Thunderbird to display SVG properly?\n")
234- >>> user_browser.getControl('Add').click()
235+ >>> user_browser.getControl('Post Question').click()
236
237 No Privileged Person is taken to page displaying his question. From
238 this point on, the user's interaction with the question follows to
239@@ -129,7 +129,7 @@
240 >>> user_browser.url
241 '.../thunderbird/+question/...'
242 >>> print user_browser.title
243- Questions : Mozilla Thunderbird
244+ Question #... : Questions : Mozilla Thunderbird
245
246
247 == Supported Language behaviour ==
248@@ -275,7 +275,7 @@
249 supported by Dafydd, but No Privileges Person will never know that.
250 Let's stop here. The rest of this scenario is just adding a question
251 as described above--filling in a description and submitting the data
252-with the 'Add' button.
253+with the 'Post Question' button.
254
255 ==== Supported languages are displayed after the submitting a product ====
256
257@@ -311,7 +311,7 @@
258
259 No Privileges Person sets the language to Japanese, changes his
260 question summary, writes a description, and submits the form with the
261-'Add' button.
262+'Post Question' button.
263
264 >>> print user_browser.getControl('Project').displayValue
265 ['Mozilla Thunderbird']
266@@ -320,7 +320,7 @@
267 ... 'Pretend this is written in Japanese')
268 >>> user_browser.getControl('Description').value = (
269 ... "Something in kanji and hiragana.")
270- >>> user_browser.getControl('Add').click()
271+ >>> user_browser.getControl('Post Question').click()
272
273 The user is taken to page displaying his question. Changing the
274 language or the summary did not search for similar questions
275@@ -329,4 +329,4 @@
276 >>> user_browser.url
277 '.../thunderbird/+question/...'
278 >>> print user_browser.title
279- Questions : Mozilla Thunderbird
280+ Question #... : Questions : Mozilla Thunderbird
281
282=== modified file 'lib/lp/answers/stories/question-add-in-other-languages.txt'
283--- lib/lp/answers/stories/question-add-in-other-languages.txt 2009-09-23 14:40:53 +0000
284+++ lib/lp/answers/stories/question-add-in-other-languages.txt 2009-11-07 04:51:13 +0000
285@@ -74,11 +74,11 @@
286 ... u'carrega corretamente e mostra a minha versao do java. No '
287 ... u'entanto, mover o mouse na pagina faz com que o firefox quebre.'
288 ... ).encode('utf-8')
289- >>> browser.getControl('Add').click()
290+ >>> browser.getControl('Post Question').click()
291 >>> browser.url
292 '.../ubuntu/+question/...'
293 >>> print browser.title
294- Questions : Ubuntu
295+ Question #... : Questions : Ubuntu
296
297 The page reports the question language both in the content and in the
298 markup. Search engine robots and browsers will use the lang and dir
299@@ -117,7 +117,7 @@
300 >>> browser.getControl('Summary').value = 'Gofyn cymorth'
301 >>> browser.getControl('Description').value = (
302 ... 'Ghai damweiniol gair.')
303- >>> browser.getControl('Add').click()
304+ >>> browser.getControl('Post Question').click()
305
306 >>> browser.url
307 'http://launchpad.dev/ubuntu/+addquestion'
308@@ -138,7 +138,7 @@
309 ... u'\u52a9\u3051\u306e\u8981\u6c42'.encode('utf-8'))
310 >>> browser.getControl('Description').value = (
311 ... u'\u3042\u308b\u4efb\u610f\u5358\u8a9e\u3002'.encode('utf-8'))
312- >>> browser.getControl('Add').click()
313+ >>> browser.getControl('Post Question').click()
314
315 >>> for tag in find_tags_by_class(browser.contents, 'warning message'):
316 ... print tag.renderContents()
317@@ -151,9 +151,9 @@
318 If even after the warning he decides to go ahead, we have to accept the
319 new question.
320
321- >>> browser.getControl('Add').click()
322+ >>> browser.getControl('Post Question').click()
323 >>> browser.url
324 '.../ubuntu/+question/...'
325 >>> print browser.title.decode('utf-8')
326- Questions : Ubuntu
327+ Question #... : Questions : Ubuntu
328 >>> portlet = find_tag_by_id(browser.contents, 'portlet-details')
329
330=== modified file 'lib/lp/answers/stories/question-add.txt'
331--- lib/lp/answers/stories/question-add.txt 2009-09-24 16:07:49 +0000
332+++ lib/lp/answers/stories/question-add.txt 2009-11-07 04:51:13 +0000
333@@ -123,7 +123,7 @@
334
335 If the user doesn't provide details, he'll get an error message:
336
337- >>> user_browser.getControl('Add').click()
338+ >>> user_browser.getControl('Post Question').click()
339 >>> for message in get_feedback_messages(user_browser.contents):
340 ... print message
341 There is 1 error.
342@@ -133,7 +133,7 @@
343 first step:
344
345 >>> user_browser.getControl('Summary').value = ''
346- >>> user_browser.getControl('Add').click()
347+ >>> user_browser.getControl('Post Question').click()
348 >>> for message in get_feedback_messages(user_browser.contents):
349 ... print message
350 There are 2 errors.
351@@ -151,11 +151,11 @@
352 ... "http://java.com/en/download/help/testvm.xml, the page loads ok and\n"
353 ... "shows my java version. But if I move the mouse on the page, firefox\n"
354 ... "crashes.\n")
355- >>> user_browser.getControl('Add').click()
356+ >>> user_browser.getControl('Post Question').click()
357 >>> user_browser.url
358 '.../ubuntu/+source/mozilla-firefox/+question/...'
359- >>> user_browser.title
360- 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
361+ >>> print user_browser.title
362+ Question #... : Questions : ...mozilla-firefox... package : Ubuntu
363
364 >>> print extract_text(
365 ... find_tag_by_id(user_browser.contents, 'registration'))
366
367=== modified file 'lib/lp/answers/stories/question-answer-contact.txt'
368--- lib/lp/answers/stories/question-answer-contact.txt 2009-09-23 14:40:53 +0000
369+++ lib/lp/answers/stories/question-answer-contact.txt 2009-11-07 04:51:13 +0000
370@@ -193,7 +193,7 @@
371
372 >>> browser.getLink('Play DVDs in Totem').click()
373 >>> print extract_text(browser.title)
374- Questions : Ubuntu
375+ Question #10 : ...
376
377 >>> print extract_text(find_tag_by_id(browser.contents, 'question-lang'))
378 Language: English
379@@ -210,7 +210,7 @@
380
381 >>> browser.open('http://answers.launchpad.dev/ubuntu/+question/12')
382 >>> print browser.title
383- Questions : Ubuntu
384+ Question #12 : ...
385
386 >>> print extract_text(find_tag_by_id(browser.contents, 'question-lang'))
387 Language: Spanish
388
389=== modified file 'lib/lp/answers/stories/question-browse-and-search.txt'
390--- lib/lp/answers/stories/question-browse-and-search.txt 2009-09-28 09:11:17 +0000
391+++ lib/lp/answers/stories/question-browse-and-search.txt 2009-11-07 04:51:13 +0000
392@@ -116,7 +116,7 @@
393
394 >>> browser.getLink('Slow system').click()
395 >>> print browser.title
396- Questions : Ubuntu
397+ Question #7 : ...
398 >>> soup = find_main_content(browser.contents)
399 >>> soup('div', 'report')
400 [<div class="report"><p>I get really poor hard drive performance.</p></div>]
401@@ -139,7 +139,7 @@
402 >>> from canonical.launchpad.helpers import backslashreplace
403 >>> locators = find_tags_by_class(browser.contents, 'main')
404 >>> print backslashreplace(browser.title)
405- Questions : \u201cmozilla-firefox\u201d package : Ubuntu
406+ Question #9 : ...
407
408 While reading the Ubuntu forums for a solution to his problem,
409 Average Joe finds some unlinked text that refers to how to
410@@ -151,7 +151,7 @@
411 >>> browser.getControl(name='field.search_text').value = ' #6 '
412 >>> browser.getControl('Find Answers').click()
413 >>> print backslashreplace(browser.title)
414- Questions : Mozilla Firefox
415+ Question #6 : ...
416
417 The Answer Tracker cannot identify Question ids within text. Average
418 Joe finds a reference to question 8 in a blog. He copies 'question 8'
419@@ -216,8 +216,8 @@
420 He clicks on the link to read the question description.
421
422 >>> browser.getLink('Firefox is slow').click()
423- >>> browser.title
424- 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
425+ >>> print browser.title
426+ Question #3 : ...
427
428 The user must choose at least one status when searching questions. An
429 error is displayed when the user forgets to select a status.
430
431=== modified file 'lib/lp/answers/stories/question-message.txt'
432--- lib/lp/answers/stories/question-message.txt 2009-09-28 09:11:17 +0000
433+++ lib/lp/answers/stories/question-message.txt 2009-11-07 04:51:13 +0000
434@@ -12,7 +12,7 @@
435
436 >>> user_browser.open('http://answers.launchpad.dev/ubuntu/+question/11')
437 >>> print user_browser.title.decode('utf-8')
438- Questions : Ubuntu
439+ Question #11 : ...
440
441 >>> user_browser.getControl('Message').value = (
442 ... "Top quoting is bad netiquette.\n"
443@@ -37,7 +37,7 @@
444 authenticated already, He will see 'human@somewhere.org'
445
446 >>> print user_browser.title.decode('utf-8')
447- Questions : Ubuntu
448+ Question #11 : ...
449 >>> text = find_tags_by_class(
450 ... user_browser.contents, 'boardCommentBody')[-1]
451 >>> print extract_text(text.findAll('p')[-1])
452@@ -52,7 +52,7 @@
453
454 >>> anon_browser.open('http://answers.launchpad.dev/ubuntu/+question/11')
455 >>> print anon_browser.title
456- Questions : Ubuntu
457+ Question #11 : ...
458
459 >>> text = find_tags_by_class(
460 ... anon_browser.contents, 'boardCommentBody')[-1]
461
462=== modified file 'lib/lp/answers/stories/question-obfuscation.txt'
463--- lib/lp/answers/stories/question-obfuscation.txt 2009-09-28 09:11:17 +0000
464+++ lib/lp/answers/stories/question-obfuscation.txt 2009-11-07 04:51:13 +0000
465@@ -54,7 +54,7 @@
466 >>> user_browser.getControl('Link to FAQ').click()
467 >>> user_browser.getLink('How can I make VOIP calls?').click()
468 >>> print user_browser.title
469- Questions : Ubuntu
470+ FAQ #4 : Questions : Ubuntu
471
472 >>> portlet = find_portlet(user_browser.contents, 'Related questions')
473 >>> portlet.a['title']
474@@ -74,9 +74,9 @@
475 >>> user_browser.getControl('Continue').click()
476 >>> user_browser.getControl('Description').value = (
477 ... 'The clicking mailto:user@domain.com crashes the browser.')
478- >>> user_browser.getControl('Add').click()
479- >>> user_browser.title
480- 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
481+ >>> user_browser.getControl('Post Question').click()
482+ >>> print user_browser.title
483+ Question #... : ...
484
485 >>> user_browser.open('http://answers.launchpad.dev/')
486 >>> question_portlet = find_tag_by_id(
487@@ -144,7 +144,7 @@
488
489 >>> anon_browser.getLink('How can I make VOIP calls?').click()
490 >>> print anon_browser.title
491- Questions : Ubuntu
492+ FAQ #4 : Questions : Ubuntu
493
494 >>> portlet = find_portlet(anon_browser.contents, 'Related questions')
495 >>> portlet.a['title']
496
497=== modified file 'lib/lp/answers/stories/question-overview.txt'
498--- lib/lp/answers/stories/question-overview.txt 2009-09-23 14:40:53 +0000
499+++ lib/lp/answers/stories/question-overview.txt 2009-11-07 04:51:12 +0000
500@@ -53,7 +53,7 @@
501
502 >>> browser.getLink('Problem showing the SVG demo on W3C site').click()
503 >>> print browser.title
504- Questions : Mozilla Firefox
505+ Question #2 : ...
506 >>> print find_main_content(browser.contents).first('h1').renderContents()
507 Problem showing the SVG demo on W3C site
508
509
510=== modified file 'lib/lp/answers/stories/this-is-a-faq.txt'
511--- lib/lp/answers/stories/this-is-a-faq.txt 2009-10-05 15:32:50 +0000
512+++ lib/lp/answers/stories/this-is-a-faq.txt 2009-11-07 04:51:13 +0000
513@@ -21,7 +21,7 @@
514 >>> user_browser.open(
515 ... 'http://answers.launchpad.dev/firefox/+question/2')
516 >>> print backslashreplace(user_browser.title)
517- Questions : Mozilla Firefox
518+ Question #2 : ...
519
520 >>> user_browser.getLink('Link to a FAQ').click()
521 >>> print backslashreplace(user_browser.title)
522@@ -279,7 +279,7 @@
523 >>> print owner_browser.url
524 http://answers.launchpad.dev/firefox/+faq/...
525 >>> print backslashreplace(owner_browser.title)
526- Questions : Mozilla Firefox
527+ FAQ #12 : Questions : Mozilla Firefox
528
529 The FAQ keywords and content appears just below:
530
531@@ -320,7 +320,7 @@
532 >>> user_browser.open(
533 ... 'http://answers.launchpad.dev/ubuntu/+question/11')
534 >>> print user_browser.title
535- Questions : Ubuntu
536+ Question #11 : ...
537 >>> user_browser.getLink('Link to a FAQ').click()
538 >>> print user_browser.title
539 Is question #11 a FAQ...
540@@ -328,8 +328,8 @@
541 >>> user_browser.open(
542 ... 'http://answers.launchpad.dev/ubuntu/+source/mozilla-firefox'
543 ... '/+question/8')
544- >>> user_browser.title
545- 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
546+ >>> print user_browser.title
547+ Question #8 : ...
548 >>> user_browser.getLink('Link to a FAQ').click()
549 >>> user_browser.title
550 'Is question #8 a FAQ...
551@@ -365,8 +365,8 @@
552 added to the question, and his message was added to the question's
553 discussion.
554
555- >>> user_browser.title
556- 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
557+ >>> print user_browser.title
558+ Question #9 : ...
559 >>> print_question_status(user_browser)
560 Solved...
561
562
563=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-create-question.txt'
564--- lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2009-09-24 17:25:40 +0000
565+++ lib/lp/bugs/stories/bugs/xx-bug-create-question.txt 2009-11-07 04:51:13 +0000
566@@ -102,8 +102,8 @@
567 No Privileges Person case see that the question was created from a
568 bug. He uses the link to Related bug to return to the bug.
569
570- >>> user_browser.title
571- 'Questions : \xe2\x80\x9clinux-source-2.6.15\xe2\x80\x9d package : Ubuntu'
572+ >>> print user_browser.title
573+ Question #... : Questions : ...linux-source-2.6.15... package : Ubuntu
574
575 >>> print extract_text(
576 ... find_tag_by_id(user_browser.contents, 'original-bug'))
577@@ -239,7 +239,7 @@
578 ... 'Copy, Cut and Delete operations should work on '
579 ... 'selections').click()
580 >>> print user_browser.title
581- Questions : Jokosher
582+ Question #... : Questions : Jokosher
583
584 >>> print extract_text(
585 ... find_tag_by_id(user_browser.contents, 'registration'))