~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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
= A team's home page =

The home page of a public team is visible to everyone.

    >>> browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print browser.title
    Ubuntu Team in Launchpad
    >>> privacy_info = find_tag_by_id(browser.contents, 'privacy')
    >>> print extract_text(privacy_info)
    Public team

The page contains a few interesting details about team membership.

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'recently-approved'))
    Latest members
    Warty Gnome Team
    Daniel Silverstone
    Celso Providelo
    Steve Alexander...

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'recently-proposed'))
    Pending approval
    Sample Person
    Andrew Bennetts

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'recently-invited'))
    Latest invited
    Warty Security Team

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'team-owner'))
    Owner:
    Mark Shuttleworth

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'team-datecreated'))
    Created on:
    2005-06-06

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'subscription-policy'))
    Subscription policy:
    Moderated Team

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'membership-summary'))
    10 active members, 1 invited member, 2 proposed members...

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'contact-email'))
    Email:
    Log in for email information.

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'contact-languages'))
    Languages:
    English

The polls portlet is only shown if current polls exist.

    >>> print extract_text(find_tag_by_id(browser.contents, 'polls'))
    Polls
    A random poll that never closes...
    Show polls

    >>> browser.open('http://launchpad.dev/~launchpad')
    >>> print find_tag_by_id(browser.contents, 'polls')
    None

The subteam-of portlet is not shown if the team is not a subteam.

    >>> browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'subteam-of'))
    Subteam of
    “Ubuntu Team” is a member of these teams: GuadaMen...

    >>> browser.open('http://launchpad.dev/~launchpad')
    >>> print find_tag_by_id(browser.contents, 'subteam-of')
    None

Unless the user is the owner of the team and there are invitations to
join a team.

    >>> admin_browser.open('http://launchpad.dev/~launchpad')
    >>> print extract_text(
    ...     find_tag_by_id(admin_browser.contents, 'subteam-of'))
    Subteam of...
    itself is not a member of any other team.
    Show received invitations

If the team does not have any recently approved, proposed, or invited
members, the empty lists are hidden using the "unseen" css class:

    >>> browser.open('http://launchpad.dev/~launchpad')
    >>> tag = find_tag_by_id(browser.contents, 'recently-approved')
    >>> print tag['class']
    unseen

    >>> tag = find_tag_by_id(browser.contents, 'recently-proposed')
    >>> print tag['class']
    unseen

    >>> tag = find_tag_by_id(browser.contents, 'recently-invited')
    >>> print tag['class']
    unseen

In the above case there's no user logged in, so it doesn't actually show
what's the user's involvement with the team. If the user logs in, he'll see
that, though.

    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'your-involvement'))
    You must log in to join or leave this team.

    >>> browser = setupBrowser(auth='Basic foo.bar@canonical.com:test')
    >>> browser.open('http://launchpad.dev/~guadamen')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'your-involvement'))
    You are the owner of this team...

    >>> browser.open('http://launchpad.dev/~rosetta-admins')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'your-involvement'))
    You are a member of the team that owns this team.
    You are not currently an active member...

    >>> browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'your-involvement'))
    You are a member of this team...

He can also see the contact email address and a link to contact the team.

    >>> browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'contact-email'))
    Email:
    support@ubuntu.com
    Set contact address
    >>> print extract_text(
    ...     find_tag_by_id(browser.contents, 'contact-user'))
    Contact this team's email address

Member can contact their team even if the team does not have a contact
address:

    >>> sample_browser = setupBrowser(auth='Basic test@canonical.com:test')
    >>> sample_browser.open('http://launchpad.dev/~landscape-developers')
    >>> print extract_text(
    ...     find_tag_by_id(sample_browser.contents, 'contact-email'))
    Email:
    No contact email
    Set contact address
    >>> print extract_text(
    ...     find_tag_by_id(sample_browser.contents, 'contact-user'))
    Contact this team's members

As teams do not have OpenID Logins, there is no link in the Contact
details section for help.

    >>> sample_browser.getLink('(What\xe2\x80\x99s\xc2\xa0this?)')
    Traceback (most recent call last):
     ...
    LinkNotFoundError

If the logged in user is an indirect member of the team, we'll say that and
will even show the path from the user to the team.

    >>> sample_browser.open('http://launchpad.dev/~name18')
    >>> print extract_text(
    ...     find_tag_by_id(sample_browser.contents, 'your-involvement'))
    You are an indirect member of this team:
    Sample Person → Warty Security Team → Ubuntu Gnome Team...

It is also possible to view the set of mugshots of the people in the
team.  Notice that the output of mugshots is batched.

    >>> anon_browser.open('http://launchpad.dev/~ubuntu-team/')
    >>> anon_browser.getLink('Show member photos').click()
    >>> main_content = find_main_content(anon_browser.contents)
    >>> print main_content
    <...
    <h1>Member photos</h1>
    ...
    1...10... of 10 results
    ...


== Team admins ==

Team owners and admins can see a link to approve and decline applicants.

    >>> owner_browser = setupBrowser(auth="Basic foo.bar@canonical.com:test")
    >>> owner_browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print extract_text(
    ...     find_tag_by_id(owner_browser.contents, 'recently-proposed'))
    Pending approval
    Sample Person
    Andrew Bennetts
    Approve or decline members

    >>> owner_browser.getLink('Approve or decline members')
    <Link text='Approve or decline members' url='.../+editproposedmembers'>


== Non members ==

No Privileges Person is not a member of the Ubuntu team.

    >>> user_browser.open('http://launchpad.dev/~ubuntu-team')
    >>> print extract_text(
    ...     find_tag_by_id(user_browser.contents, 'your-involvement'))
    Join...
    You are not a member of this team...

He can see the contact address, and the link explains the email
will actually go to the team's administrators.

    >>> print extract_text(find_tag_by_id(user_browser.contents, 'contact-email'))
    Email:
    support@ubuntu.com
    >>> content = find_tag_by_id(user_browser.contents, 'contact-user')
    >>> print extract_text(content)
    Contact this team's owner

    >>> content.a
    <a href="+contactuser"...
      title="Send an email to this team's owner through Launchpad">...