~launchpad-pqm/launchpad/devel

8514.3.2 by Brad Crittenden
Reworked people and team searches to be native Storm so that unicode conversions can be sanely handled in one place.
1
People and Team Search
2
======================
3
4
Searching for people
5
--------------------
6
7
    >>> browser.open('http://launchpad.dev/people')
8
    >>> print browser.title
9
    People and teams in Launchpad
10
11
Search for all people and teams with the string "foo bar".  There
12
should just be the one person named "Foo Bar" found.
13
14
    >>> browser.getControl(name='name').value = 'foo bar'
15
    >>> browser.getControl('Search').click()
11014.1.3 by Curtis Hovey
Do not imply teams have karma in people search.
16
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
17
    >>> print extract_text(listing)
18
    Name          Launchpad ID  Karma
19
    Foo Bar       name16        241
20
21
The listing is sortable.
22
23
    >>> print listing['class']
24
    listing sortable
25
26
Search for all people and teams like "launchpad" the users sees three
27
columns of people and teams..
8514.3.2 by Brad Crittenden
Reworked people and team searches to be native Storm so that unicode conversions can be sanely handled in one place.
28
29
    >>> browser.getControl(name='name').value = 'launchpad'
30
    >>> browser.getControl('Search').click()
11014.1.3 by Curtis Hovey
Do not imply teams have karma in people search.
31
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
32
    >>> print extract_text(listing)
33
    Name                         Launchpad ID              Karma
34
    Julian Edwards               launchpad-julian-edwards  0
35
    Launchpad Administrators     admins                    —
36
    Launchpad Beta Testers Owner launchpad-beta-owner      0
37
    Launchpad Beta Testers       launchpad-beta-testers    —
38
    Launchpad Buildd Admins      launchpad-buildd-admins   —
8514.3.2 by Brad Crittenden
Reworked people and team searches to be native Storm so that unicode conversions can be sanely handled in one place.
39
40
Restrict the search to teams and the individuals are no longer
41
listed.  Due to batching teams that were not displayed before are now
11014.1.3 by Curtis Hovey
Do not imply teams have karma in people search.
42
shown. There are only two columns because teams cannot have karma.
8514.3.2 by Brad Crittenden
Reworked people and team searches to be native Storm so that unicode conversions can be sanely handled in one place.
43
44
    >>> browser.getControl(name='name').value = 'launchpad'
45
    >>> browser.getControl(name='searchfor').value = ['teamsonly']
46
    >>> browser.getControl('Search').click()
11014.1.3 by Curtis Hovey
Do not imply teams have karma in people search.
47
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
48
    >>> print extract_text(listing)
49
    Name                         Launchpad ID
8514.3.2 by Brad Crittenden
Reworked people and team searches to be native Storm so that unicode conversions can be sanely handled in one place.
50
    Launchpad Administrators     admins
51
    Launchpad Beta Testers       launchpad-beta-testers
52
    Launchpad Buildd Admins      launchpad-buildd-admins
53
    Launchpad Developers         launchpad
54
    Launchpad Users              launchpad-users
55
56
Restrict the search to people and only individuals are listed.
57
58
    >>> browser.getControl(name='name').value = 'launchpad'
59
    >>> browser.getControl(name='searchfor').value = ['peopleonly']
60
    >>> browser.getControl('Search').click()
11014.1.3 by Curtis Hovey
Do not imply teams have karma in people search.
61
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
62
    >>> print extract_text(listing)
63
    Name                         Launchpad ID              Karma
64
    Julian Edwards               launchpad-julian-edwards  0
65
    Launchpad Beta Testers Owner launchpad-beta-owner      0
66
    Launchpad Janitor            janitor                   0