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