~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/stories/distribution-package-answer-contact.txt

[r=adeuring][bug=823945] Provide a javascript answer contacts portlet
 which allows users to be removed as contacts

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    >>> portlet = find_portlet(
32
32
    ...     anon_browser.contents,
33
33
    ...     'Answer contacts for evolution in Ubuntu')
34
 
    >>> print portlet.first('div').renderContents()
35
 
    <p>
36
 
      <i>There are no answer contacts.</i>
37
 
    </p>
38
 
    >>> for answer_contact in find_portlet(
39
 
    ...     anon_browser.contents, 'Answer contacts for Ubuntu').fetch('a'):
40
 
    ...     print answer_contact.renderContents()
41
 
    Sample Person
42
34
 
43
35
To register himself as answer contact, the user clicks on the
44
36
'Set answer contact' link. He needs to login to access that function.
82
74
    Landscape Developers has been added as an answer contact for
83
75
    evolution in Ubuntu.
84
76
 
85
 
The answer contacts portlet for the source package was updated:
86
 
 
87
 
    >>> for answer_contact in find_portlet(
88
 
    ...     browser.contents,
89
 
    ...     'Answer contacts for evolution in Ubuntu').fetch('a'):
90
 
    ...     print answer_contact.renderContents()
91
 
    Landscape Developers
92
 
    Sample Person
93
 
 
94
77
To unregister as answer contact, the same page is used. Instead this
95
78
time, we unselect the checkboxes:
96
79
 
102
85
    ...     "I want to be an answer contact for "
103
86
    ...     "evolution").selected = False
104
87
 
105
 
Again a confirmation message is displayed and the answer contacts
106
 
portlet for the source package is updated.
 
88
Again a confirmation message is displayed.
107
89
 
108
90
    >>> browser.getControl('Continue').click()
109
91
    >>> for message in find_tags_by_class(browser.contents, 'message'):
110
92
    ...     print message.renderContents()
111
93
    You have been removed as an answer contact for evolution in Ubuntu.
112
 
 
113
 
    >>> for answer_contact in find_portlet(
114
 
    ...     browser.contents,
115
 
    ...     'Answer contacts for evolution in Ubuntu').fetch('a'):
116
 
    ...     print answer_contact.renderContents()
117
 
    Landscape Developers