Hi Michael, thanks for your review. Let me just quickly comment on your suggestions in the code. Am 24.09.2009 17:11, Michael Nelson schrieb: >> === modified file 'lib/lp/answers/stories/question-add.txt' >> --- lib/lp/answers/stories/question-add.txt 2009-09-23 14:40:53 +0000 >> +++ lib/lp/answers/stories/question-add.txt 2009-09-24 14:18:35 +0000 >> @@ -157,9 +157,9 @@ >> >>> user_browser.title >> 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu' >> >> - >>> contents = find_main_content(user_browser.contents) >> - >>> contents.findChild('div', id='question-details') >> + >>> print find_tag_by_id(user_browser.contents, 'registration') >> Open<... Question #..., asked...by...No Privileges Person... > > Any reason for not using extract_text here? Might be nicer to read... No, none. It actually crossed my mind, too. Done. > >> + >>> contents = find_main_content(user_browser.contents) >> >>> contents.find('div', 'report') > > ... and here: print extract_text(contents.find('div', 'report')) Did that, too. > >>

I use Ubuntu on AMD64 ...

>> >> >> === modified file 'lib/lp/answers/stories/question-confirm-url.txt' >> --- lib/lp/answers/stories/question-confirm-url.txt 2009-08-25 21:30:02 +0000 >> +++ lib/lp/answers/stories/question-confirm-url.txt 2009-09-24 14:18:35 +0000 >> @@ -96,7 +96,7 @@ >> This adds his comment to the question and mark it as 'Solved.' >> >> >>> print extract_text( >> - ... find_tag_by_id(owner_browser.contents, 'question-details')) >> + ... find_tag_by_id(owner_browser.contents, 'registration')) >> Solved ... > > Ah, so it's also communicating the status... - I personally am not > convinced that it belongs there - but maybe you've had discussions > with others about it? > > I think it should simply be: > > Asked on 2006-01-01 by Guilherme Salgado (and potentially last updated - > not sure if that's in the db?) You are probably right but that would include more work on the whole page which would break more tests ... Too much for too little time ;-) > >> >>> print find_tags_by_class( >> ... owner_browser.contents, 'boardCommentBody')[-1].renderContents() >> >> === modified file 'lib/lp/answers/stories/question-reject-and-change-status.txt' >> --- lib/lp/answers/stories/question-reject-and-change-status.txt 2009-08-25 21:30:02 +0000 >> +++ lib/lp/answers/stories/question-reject-and-change-status.txt 2009-09-24 14:18:35 +0000 >> @@ -52,7 +52,7 @@ >> >> >>> def print_question_status(browser): >> ... print extract_text( >> - ... find_tag_by_id(browser.contents, 'question-details')) >> + ... find_tag_by_id(browser.contents, 'registration')) > > Hmm... perhaps it's worth moving this into something like > l/c/lp/testing/pages.py? See what you think. Haven't looked at that yet but usually I am all for this kind of stuff. But ... [...] >> === modified file 'lib/lp/answers/templates/question-index.pt' >> --- lib/lp/answers/templates/question-index.pt 2009-09-03 20:22:39 +0000 >> +++ lib/lp/answers/templates/question-index.pt 2009-09-24 14:18:35 +0000 >> @@ -18,12 +18,7 @@ >> >> >> >> - >> -

Bar doesn't work

>> -
>> - Open> - tal:attributes="alt context/status/title; >> - title context/status/title;" /> >> + >> > tal:attributes="class string:questionstatus${context/status/name}" >> tal:content="context/status/title">Open >> @@ -48,14 +43,8 @@ >> > tal:attributes="href context/owner/fmt:url" >> tal:content="context/owner/displayname">Foo Bar >> -
>> - >> -
>> - Language: >> - English
>> -
>> - >> -
>> + >> + >> >> >>
>> @@ -67,6 +56,11 @@ >> >>
>> >> +
>> + Language: >> + English
>> +
> > Did you try a dl here? It's what we're using elsewhere for this kind of thing. > Personally, as I mentioned above, I'd prefer to see both the language > and the status here using a dl. Again, this would cause pagetests to break, I imagine. I was glad that none broke over moving this div here and as you have seen, many tests in answers may not use extract_test and depend on this being a div. Answers code is quite old. > >> + >> > define="global description context/description/fmt:obfuscate-email/fmt:text-to-html" /> >> > > Thanks again Henning! Thank you, too, and sorry that not many of you suggestions could be incorporated. I will file bugs about extracting the function and redoing the answers page if there isn't one for it already. Henning