Code review comment for lp:~wgrant/launchpad/tiny-inline-subscription-fixes

Revision history for this message
William Grant (wgrant) wrote :

= Summary =

I picked up a couple of bugs in the inline subscription stuff while testing fixes for the other bugs earlier this week. I thought I might as well fix them now.

See the two linked bugs for details.

== Proposed fix ==

The team icon was showing up as the icon for self-subscription because the self-subscription handler doesn't set is_team -- only check_can_be_unsubscribed does. I've forced is_team to false when setting the current person on the subscription.

The unsubscription handler was unconditionally setting the 'add' class on the Unsubscribe link. I initially moved the manual class changes into the block that sets the text to "Subscribe", but later discovered subscription.disable_spinner(). I now instead use that.

== Tests ==

I've added Windmill tests for the two bugs.

 $ ./bin/lp-windmill -e test=lib/lp/bugs/windmill/tests/test_bugs/test_bug_inline_subscriber.py firefox http://bugs.launchpad.dev:8085

== Demo and Q/A ==

To Q/A:

Bug #415220:
 1. Subscribe yourself to a bug.
 2. Subscribe a team of which you are a member to the bug.
 4. Click the link to unsubscribe the team.
 5. Verify that the "(-) Unsubscribe" link retains the correct icon.

Bug #415219:
 1. Subscribe a team to a bug.
 2. Subscribe yourself to a bug (using "Subscribe", not "Subscribe someone else").
 3. Verify that the icon next to your name is the person, not team, icon.

« Back to merge proposal