Merge lp:~bjornt/launchpad/bug-415333 into lp:launchpad

Proposed by Björn Tillenius
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~bjornt/launchpad/bug-415333
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~bjornt/launchpad/bug-415333
Reviewer Review Type Date Requested Status
Deryck Hodge (community) Approve
Review via email: mp+10316@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Björn Tillenius (bjornt) wrote :

Make the test_bug_commenting.py windmill test pass.

The test looked for a link, which used to be how you added a comment.
When it was changed to a button again, the test wasn't updated.

--
Björn Tillenius | https://launchpad.net/~bjornt

Revision history for this message
Deryck Hodge (deryck) wrote :

Looks good, Björn.

Cheers,
deryck

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py'
--- lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py 2009-07-30 09:14:25 +0000
+++ lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py 2009-08-18 14:33:08 +0000
@@ -14,8 +14,8 @@
14WAIT_PAGELOAD = u'30000'14WAIT_PAGELOAD = u'30000'
15WAIT_ELEMENT_COMPLETE = u'30000'15WAIT_ELEMENT_COMPLETE = u'30000'
16WAIT_CHECK_CHANGE = u'1000'16WAIT_CHECK_CHANGE = u'1000'
17ADD_COMMENT_LINK = (17ADD_COMMENT_BUTTON = (
18 u'//a[@href="+addcomment" and @class="sprite add js-action"]')18 u'//input[@id="field.actions.save" and @class="button js-action"]')
1919
2020
21def test_bug_commenting():21def test_bug_commenting():
@@ -25,13 +25,13 @@
2525
26 client.open(url='http://bugs.launchpad.dev:8085/bugs/1')26 client.open(url='http://bugs.launchpad.dev:8085/bugs/1')
27 client.waits.forPageLoad(timeout=WAIT_PAGELOAD)27 client.waits.forPageLoad(timeout=WAIT_PAGELOAD)
28 client.waits.forElement(xpath=ADD_COMMENT_LINK)28 client.waits.forElement(xpath=ADD_COMMENT_BUTTON)
2929
30 # Generate a unique piece of text, so we can run the test multiple30 # Generate a unique piece of text, so we can run the test multiple
31 # times, without resetting the db.31 # times, without resetting the db.
32 new_comment_text = generate_uuid()32 new_comment_text = generate_uuid()
33 client.type(text=new_comment_text, id="field.comment")33 client.type(text=new_comment_text, id="field.comment")
34 client.click(xpath=ADD_COMMENT_LINK)34 client.click(xpath=ADD_COMMENT_BUTTON)
35 client.waits.forElement(35 client.waits.forElement(
36 xpath=u'//div[@class="bug-comment"]/p[contains(., "%s")]' % (36 xpath=u'//div[@class="bug-comment"]/p[contains(., "%s")]' % (
37 new_comment_text))37 new_comment_text))