Merge lp:~thumper/launchpad/fix-review-comment-field-enablement into lp:launchpad/db-devel

Proposed by Tim Penhey
Status: Merged
Approved by: Данило Шеган
Approved revision: not available
Merged at revision: 8796
Proposed branch: lp:~thumper/launchpad/fix-review-comment-field-enablement
Merge into: lp:launchpad/db-devel
Diff against target: 11 lines (+1/-0)
1 file modified
lib/canonical/launchpad/javascript/lp/comment.js (+1/-0)
To merge this branch: bzr merge lp:~thumper/launchpad/fix-review-comment-field-enablement
Reviewer Review Type Date Requested Status
Данило Шеган (community) release-critical Approve
Björn Tillenius (community) code Approve
Review via email: mp+16178@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

As found recently, the new comment layout doesn't enable the review type if you use the keyboard to enter the review vote (bug 496820).

Revision history for this message
Tim Penhey (thumper) wrote :

Oh, and I have no idea at all how to test this with windmill.

Revision history for this message
Jonathan Lange (jml) wrote :

I'm happy with this change, but I'd at least like to know more about why writing a test was so hard.

Revision history for this message
Tim Penhey (thumper) wrote :

On Tue, 15 Dec 2009 16:33:10 Jonathan Lange wrote:
> I'm happy with this change, but I'd at least like to know more about why
> writing a test was so hard.

Because I don't know how to get windmill to record, and I can't see how to
have windmill do key presses from a particular field.

Revision history for this message
Björn Tillenius (bjornt) wrote :

I suspect that Windmill isn't the right place to test this, since it's a bit of a corner case.

Have you looked into writing a Javascript unit test for this functionality?

review: Abstain (subscribe)
Revision history for this message
Tim Penhey (thumper) wrote :

On Tue, 15 Dec 2009 21:16:16 Björn Tillenius wrote:
> Review: Abstain subscribe
> I suspect that Windmill isn't the right place to test this, since it's a
> bit of a corner case.
>
> Have you looked into writing a Javascript unit test for this functionality?

No. I've not had any exposure or experience writing javascript unit test
cases.

Revision history for this message
Tim Penhey (thumper) wrote :

On Tue, 15 Dec 2009 21:16:16 Björn Tillenius wrote:
> Review: Abstain subscribe
> I suspect that Windmill isn't the right place to test this, since it's a
> bit of a corner case.
>
> Have you looked into writing a Javascript unit test for this functionality?

At this stage, I'd suggest landing this one line fix, and writing the test
later.

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Tue, Dec 15, 2009 at 09:12:14AM -0000, Tim Penhey wrote:
> On Tue, 15 Dec 2009 21:16:16 Björn Tillenius wrote:
> > Review: Abstain subscribe
> > I suspect that Windmill isn't the right place to test this, since it's a
> > bit of a corner case.
> >
> > Have you looked into writing a Javascript unit test for this functionality?
>
> No. I've not had any exposure or experience writing javascript unit test
> cases.

So it'd be a great opportunity to get some exposure and experience :) I
would actually consider allowing this to land without tests, so that you
could take your time and figure out how to properly test this.

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Tue, Dec 15, 2009 at 09:24:19AM -0000, Tim Penhey wrote:
> On Tue, 15 Dec 2009 21:16:16 Björn Tillenius wrote:
> > Review: Abstain subscribe
> > I suspect that Windmill isn't the right place to test this, since it's a
> > bit of a corner case.
> >
> > Have you looked into writing a Javascript unit test for this functionality?
>
> At this stage, I'd suggest landing this one line fix, and writing the test
> later.

I agree. Let's get this landed now, so that we'll have more time to QA
it. We do have tests to make sure that commenting and voting on merge
proposals still work.

    vote approve code

review: Approve (code)
Revision history for this message
Данило Шеган (danilo) wrote :

Simple enough, and as already said, it'd be nice to have a test for this.

review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/javascript/lp/comment.js'
2--- lib/canonical/launchpad/javascript/lp/comment.js 2009-12-14 00:01:35 +0000
3+++ lib/canonical/launchpad/javascript/lp/comment.js 2009-12-15 02:58:14 +0000
4@@ -372,6 +372,7 @@
5 */
6 bindUI: function() {
7 CodeReviewComment.superclass.bindUI.apply(this);
8+ this.vote_input.on('keyup', bind(this.syncUI, this));
9 this.vote_input.on('mouseup', bind(this.syncUI, this));
10 this.review_type.on('keyup', bind(this.syncUI, this));
11 this.review_type.on('mouseup', bind(this.syncUI, this));

Subscribers

People subscribed via source and target branches

to status/vote changes: