~launchpad-pqm/launchpad/devel

12906.2.7 by Curtis Hovey
Replace obsolete +support-contact with +answer-contact.
1
Answer Contact Report
2
=====================
3943.1.3 by Curtis Hovey
Added answer contact report test.
3
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
4
To view the answer contact report for a given person, the user chooses
3943.1.3 by Curtis Hovey
Added answer contact report test.
5
the 'Answer Contact For' link from the actions portlet while viewing
6
the Person's page.
7
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
8
    >>> anon_browser.open('http://answers.launchpad.dev/~no-priv')
9
    >>> anon_browser.getLink('Answer contact for').click()
3943.1.3 by Curtis Hovey
Added answer contact report test.
10
    >>> print anon_browser.title
9322.10.22 by Guilherme Salgado
Fix a bunch of tests and change makeBreadcrumbForRequestedPage() to use view.label before trying to look up a title in pagetitles.py
11
    Projects for which...
3943.1.3 by Curtis Hovey
Added answer contact report test.
12
13
Since No Privileges Person is not an answer contact, the report states
14
that.
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
15
3943.1.3 by Curtis Hovey
Added answer contact report test.
16
    >>> content = find_main_content(anon_browser.contents)
17
    >>> print content.find('p').renderContents()
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
18
    No Privileges Person is not an answer contact for any project.
3943.1.3 by Curtis Hovey
Added answer contact report test.
19
20
But when the person is an answer contact, the page displays the project
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
21
he registered for.
3943.1.3 by Curtis Hovey
Added answer contact report test.
22
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
23
    >>> anon_browser.open('http://answers.launchpad.dev/~name16')
24
    >>> anon_browser.getLink('Answer contact for').click()
3943.1.3 by Curtis Hovey
Added answer contact report test.
25
    >>> print anon_browser.title
9322.10.22 by Guilherme Salgado
Fix a bunch of tests and change makeBreadcrumbForRequestedPage() to use view.label before trying to look up a title in pagetitles.py
26
    Projects for which...
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
27
3943.1.3 by Curtis Hovey
Added answer contact report test.
28
    >>> content = find_tag_by_id(
3943.1.8 by Curtis Hovey
Revisions to code and test per BjornT's review.
29
    ...     anon_browser.contents, "direct-answer-contacts-for-list")
6476.1.9 by Matthew Paul Thomas
Fixes pagetests.
30
    >>> print extract_text(content).encode('ascii', 'backslashreplace')
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
31
    Gnome Baker
8399.3.33 by Michael Nelson
Fixed failing tests as a result of modifying title for source package and modifying some sample data.
32
    ...mozilla-firefox... package in Ubuntu
3943.1.8 by Curtis Hovey
Revisions to code and test per BjornT's review.
33
34
    >>> content = find_tag_by_id(
35
    ...     anon_browser.contents, "team-answer-contacts-for-list")
36
    >>> print extract_text(content)
37
    Gnome Baker
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
38
    The Gnome Panel Applets
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
39
3943.1.3 by Curtis Hovey
Added answer contact report test.
40
Clicking on the name of the project will show the project answers.
41
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
42
    >>> anon_browser.getLink('Gnome Baker').click()
43
    >>> print anon_browser.title
9565.2.4 by Gary Poster
fix failing tests caused by breadcrumbs changes
44
    Questions : gnomebaker
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
45
46
When the user is logged in, and he is visiting this page in his profile
47
he will see a link after each project to manage his registration.
48
49
    >>> browser.addHeader('Authorization', 'Basic test@canonical.com:test')
50
    >>> browser.open(
51
    ...     'http://answers.launchpad.dev/~name12')
52
    >>> browser.getLink('Answer contact for').click()
53
    >>> print browser.title
9322.10.22 by Guilherme Salgado
Fix a bunch of tests and change makeBreadcrumbForRequestedPage() to use view.label before trying to look up a title in pagetitles.py
54
    Projects for which...
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
55
3943.1.10 by Curtis Hovey
Label and test corrections for Contact for report.
56
    >>> content = find_tag_by_id(
57
    ... browser.contents, "team-answer-contacts-for-list")
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
58
    >>> print extract_text(content)
12906.2.7 by Curtis Hovey
Replace obsolete +support-contact with +answer-contact.
59
    Gnome Baker Unsubscribe team
60
    The Gnome Panel Applets Unsubscribe team
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
61
3943.1.8 by Curtis Hovey
Revisions to code and test per BjornT's review.
62
    >>> browser.getLink(id="gnomebaker-setteamanswercontact").click()
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
63
    >>> print browser.title
9322.10.22 by Guilherme Salgado
Fix a bunch of tests and change makeBreadcrumbForRequestedPage() to use view.label before trying to look up a title in pagetitles.py
64
    Answer contact for...
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
65
66
The Remove yourself/team links only appears in his profile. He cannot
3943.1.10 by Curtis Hovey
Label and test corrections for Contact for report.
67
see the link for other users
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
68
69
    >>> browser.open(
70
    ...     'http://answers.launchpad.dev/~name16')
71
    >>> browser.getLink('Answer contact for').click()
72
    >>> print browser.title
9322.10.22 by Guilherme Salgado
Fix a bunch of tests and change makeBreadcrumbForRequestedPage() to use view.label before trying to look up a title in pagetitles.py
73
    Projects for which...
9097.2.7 by Curtis Hovey
Updated code to pass exisitng tests.
74
12906.2.7 by Curtis Hovey
Replace obsolete +support-contact with +answer-contact.
75
    >>> content = find_tag_by_id(
76
    ...     browser.contents, "direct-answer-contacts-for-list")
6476.1.9 by Matthew Paul Thomas
Fixes pagetests.
77
    >>> print extract_text(content).encode('ascii', 'backslashreplace')
3943.1.5 by Curtis Hovey
added template and view class for showing the answer contact for report.
78
    Gnome Baker
8399.3.33 by Michael Nelson
Fixed failing tests as a result of modifying title for source package and modifying some sample data.
79
    ...mozilla-firefox... package in Ubuntu