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
1=== modified file 'lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py'
2--- lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py 2009-07-30 09:14:25 +0000
3+++ lib/lp/bugs/windmill/tests/test_bugs/test_bug_commenting.py 2009-08-18 14:33:08 +0000
4@@ -14,8 +14,8 @@
5 WAIT_PAGELOAD = u'30000'
6 WAIT_ELEMENT_COMPLETE = u'30000'
7 WAIT_CHECK_CHANGE = u'1000'
8-ADD_COMMENT_LINK = (
9- u'//a[@href="+addcomment" and @class="sprite add js-action"]')
10+ADD_COMMENT_BUTTON = (
11+ u'//input[@id="field.actions.save" and @class="button js-action"]')
12
13
14 def test_bug_commenting():
15@@ -25,13 +25,13 @@
16
17 client.open(url='http://bugs.launchpad.dev:8085/bugs/1')
18 client.waits.forPageLoad(timeout=WAIT_PAGELOAD)
19- client.waits.forElement(xpath=ADD_COMMENT_LINK)
20+ client.waits.forElement(xpath=ADD_COMMENT_BUTTON)
21
22 # Generate a unique piece of text, so we can run the test multiple
23 # times, without resetting the db.
24 new_comment_text = generate_uuid()
25 client.type(text=new_comment_text, id="field.comment")
26- client.click(xpath=ADD_COMMENT_LINK)
27+ client.click(xpath=ADD_COMMENT_BUTTON)
28 client.waits.forElement(
29 xpath=u'//div[@class="bug-comment"]/p[contains(., "%s")]' % (
30 new_comment_text))