~launchpad-pqm/launchpad/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
= Question Subscriptions =

Users can subscribe to specific questions. When they are subscribed they
will receive notifications for any changes to the question.


== Subscribing ==

To subscribe, users use the 'Subscribe' link and then confirm that
they want to subscribe by clicking on the 'Subscribe' button. The user
sees a link to his subscribed questions.

    >>> user_browser.open(
    ...     'http://launchpad.dev/firefox/+question/2')
    >>> user_browser.getLink('Subscribe').click()
    >>> print user_browser.title
    Subscription : Question #2 ...

    >>> print user_browser.getLink('your subscribed questions page')
    <Link ...'http://answers.launchpad.dev/~no-priv/+subscribedquestions'>

    >>> user_browser.getControl('Subscribe').click()

A message confirming that he was subscribed is displayed:

    >>> for message in get_feedback_messages(user_browser.contents):
    ...     print message
    You have subscribed to this question.


== Unsubscribing ==

When the user is subscribed to the question, the 'Subscribe' link
becomes an 'Unsubscribe' link. To unsubscribe, the user follows that
link and then click on the 'Unsubscribe' button.

    >>> link = user_browser.getLink('Unsubscribe').click()
    >>> print user_browser.title
    Subscription : Question #2 ...

    >>> print extract_text(
    ...     find_tag_by_id(user_browser.contents, 'unsubscribe'))
    Unsubscribing from this question ...

    >>> user_browser.getControl('Unsubscribe').click()

A confirmation is displayed:

    >>> for message in get_feedback_messages(user_browser.contents):
    ...     print message
    You have unsubscribed from this question.


== Subscribing While Posting A Message ==

It is also possible to subscribe at the same time than posting a message
on an existing question. The user can simply check the 'E-mail me future
discussion about this question' checkbox:

    >>> user_browser.open('http://launchpad.dev/firefox/+question/6')
    >>> user_browser.getControl('Message').value = (
    ...     "Try starting firefox from the command-line. Are there any "
    ...     "messages appearing?")
    >>> user_browser.getControl(
    ...     'E-mail me future discussion about this question').selected = True
    >>> user_browser.getControl("Add Information Request").click()

A notification message is displayed notifying of the subscription:

    >>> for message in get_feedback_messages(user_browser.contents):
    ...     print message
    Thanks for your information request.
    You have subscribed to this question.