~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
People and Team Search
======================

Searching for people
--------------------

    >>> browser.open('http://launchpad.dev/people')
    >>> print browser.title
    People and teams in Launchpad

Search for all people and teams with the string "foo bar".  There
should just be the one person named "Foo Bar" found.

    >>> browser.getControl(name='name').value = 'foo bar'
    >>> browser.getControl('Search').click()
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
    >>> print extract_text(listing)
    Name          Launchpad ID  Karma
    Foo Bar       name16        241

The listing is sortable.

    >>> print listing['class']
    listing sortable

Search for all people and teams like "launchpad" the users sees three
columns of people and teams..

    >>> browser.getControl(name='name').value = 'launchpad'
    >>> browser.getControl('Search').click()
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
    >>> print extract_text(listing)
    Name                         Launchpad ID              Karma
    Julian Edwards               launchpad-julian-edwards  0
    Launchpad Administrators     admins                    —
    Launchpad Beta Testers Owner launchpad-beta-owner      0
    Launchpad Beta Testers       launchpad-beta-testers    —
    Launchpad Buildd Admins      launchpad-buildd-admins   —

Restrict the search to teams and the individuals are no longer
listed.  Due to batching teams that were not displayed before are now
shown. There are only two columns because teams cannot have karma.

    >>> browser.getControl(name='name').value = 'launchpad'
    >>> browser.getControl(name='searchfor').value = ['teamsonly']
    >>> browser.getControl('Search').click()
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
    >>> print extract_text(listing)
    Name                         Launchpad ID
    Launchpad Administrators     admins
    Launchpad Beta Testers       launchpad-beta-testers
    Launchpad Buildd Admins      launchpad-buildd-admins
    Launchpad Developers         launchpad
    Launchpad Users              launchpad-users

Restrict the search to people and only individuals are listed.

    >>> browser.getControl(name='name').value = 'launchpad'
    >>> browser.getControl(name='searchfor').value = ['peopleonly']
    >>> browser.getControl('Search').click()
    >>> listing = find_tag_by_id(browser.contents, 'people-results')
    >>> print extract_text(listing)
    Name                         Launchpad ID              Karma
    Julian Edwards               launchpad-julian-edwards  0
    Launchpad Beta Testers Owner launchpad-beta-owner      0
    Launchpad Janitor            janitor                   0