Merge lp:~sinzui/launchpad/css-ui-1 into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 12103
Proposed branch: lp:~sinzui/launchpad/css-ui-1
Merge into: lp:launchpad
Diff against target: 814 lines (+178/-162)
16 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+20/-10)
lib/canonical/launchpad/icing/style.css (+0/-19)
lib/canonical/launchpad/webapp/error.py (+1/-1)
lib/lp/answers/stories/project-add-question.txt (+105/-90)
lib/lp/answers/stories/questions-index.txt (+3/-3)
lib/lp/answers/templates/question-listing-detailed.pt (+2/-2)
lib/lp/registry/browser/distribution.py (+5/-4)
lib/lp/registry/browser/product.py (+5/-4)
lib/lp/registry/browser/tests/distribution-views.txt (+4/-4)
lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt (+18/-10)
lib/lp/registry/stories/productseries/xx-productseries-series.txt (+4/-4)
lib/lp/registry/templates/distributionmirror-macros.pt (+3/-3)
lib/lp/registry/templates/productreleasefile-macros.pt (+1/-1)
lib/lp/registry/templates/team-editproposed.pt (+2/-2)
lib/lp/soyuz/browser/sourcepackagerelease.py (+1/-1)
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py (+4/-4)
To merge this branch: bzr merge lp:~sinzui/launchpad/css-ui-1
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+44068@code.launchpad.net

Description of the change

Clean up the CSS.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/90502
        https://bugs.launchpad.net/bugs/415267
    Pre-implementation: no one
    Test command: ./bin/test -vv \
      -t distribution-views -t xx-productseries-series

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Both classes use the base rules. There should be only one.
      The 3.0 eliminated most of the highlighted cases. polls are being
      removed, so distro mirrors are the only case

Bug #415267 [Table header cells should not be centered]
    ages with wide tables but narrow data, such as
    <https://code.launchpad.net/ubuntu/+source/hotssh>, demonstrate a mistake
    I made in designing Launchpad tables: the text in table header cells
    should not be centered.

--------------------------------------------------------------------

RULES

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * update distributionmirror-macros.pt to use highlight instead of
      highlighted
    * Remove the highligted rules from the CSS.
    * Rename dimmed to lowlight.

Bug #415267 [Table header cells should not be centered]
    * use text-align: left so that the left edge of the text in the th
      aligns with the text in the td.

QA

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Visit https://launchpad.net/ubuntu/+cdmirrors
    * Verify the country and total are highlighted.

Bug #415267 [Table header cells should not be centered]
    * Visit any table listing in lp and verify that the table headers
      have left-aligned text.

LINT

    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/answers/templates/question-listing-detailed.pt
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt
    lib/lp/registry/templates/productreleasefile-macros.pt
    lib/lp/registry/templates/team-editproposed.pt

IMPLEMENTATION

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    Update template to use highlight and removed highligted from css.
    Removed unhighlighted. Renamed dimmed to lowlight. Removed .series
    class because the rules are always superseded by other css rules.
    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt

Bug #415267 [Table header cells should not be centered]
    Updated the style as mpt suggested.
    lib/canonical/launchpad/icing/style-3-0.css.in

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

The changes look good Curtis. But if I grep for 'class="highlighted"' I get six hits:

bzr ls -VR --kind=file --null | xargs -0 grep -In class\=\"highlighted\"
lib/canonical/launchpad/webapp/error.py:118: return ('<div class="highlighted" style="'
lib/lp/soyuz/browser/sourcepackagerelease.py:158: highlight = r'<span class="highlighted">\1</span>'
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:90: '<span class="highlighted">https://upstream.dom/fnord/no/</span> '
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:102: '<span class="highlighted">/usr/share/common-licenses/GPL</span>')
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:113: '<span class="highlighted">/usr/share/common-licenses/GPL</span> '
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:114: 'or <span class="highlighted">https://osi.org/mit</span>')

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

On Fri, 2010-12-17 at 18:31 +0000, Brad Crittenden wrote:
> Review: Approve code
> The changes look good Curtis. But if I grep for 'class="highlighted"' I get six hits:

I am incompetent. I wrote the spr code and test :(. I resolved the
conflict you point out too.

--
__Curtis C. Hovey_________
http://launchpad.net/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
--- lib/canonical/launchpad/icing/style-3-0.css.in 2010-12-16 15:53:37 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-12-18 00:58:15 +0000
@@ -537,7 +537,7 @@
537 vertical-align: baseline;537 vertical-align: baseline;
538 }538 }
539thead th, tr.thead th {539thead th, tr.thead th {
540 text-align: center;540 text-align: left;
541 vertical-align: bottom;541 vertical-align: bottom;
542 }542 }
543th.icon, td.icon {543th.icon, td.icon {
@@ -663,9 +663,6 @@
663table.listing tfoot td {663table.listing tfoot td {
664 border: 1px solid #d2d2d2;664 border: 1px solid #d2d2d2;
665 }665 }
666table.listing tr.note {
667 font-size: 77%;
668 }
669table.listing th, table.listing td {666table.listing th, table.listing td {
670 padding: 0.25em;667 padding: 0.25em;
671 }668 }
@@ -681,7 +678,7 @@
681 border: 1px #d2d2d2;678 border: 1px #d2d2d2;
682 border-style: dotted none none none;679 border-style: dotted none none none;
683 }680 }
684table.listing tr.note td {681table.listing .note td {
685 border-style: none;682 border-style: none;
686 }683 }
687table.listing img {684table.listing img {
@@ -1469,11 +1466,20 @@
1469 Universal presentation1466 Universal presentation
1470 Colors and fonts1467 Colors and fonts
1471*/1468*/
1472pre .highlighted {1469
1473 border: none;1470.exception {
1474 padding: 0em;1471 color: #cc0000;
1475 margin: 0em;1472 }
1476 }1473.highlight {
1474 background: #ddd;
1475 border: 1px solid #ddd;
1476 }
1477.lowlight {
1478 opacity: .5;
1479 filter: alpha(opacity=50);
1480 -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
1481}
1482
1477.answers-stat {1483.answers-stat {
1478 color: #3840BE;1484 color: #3840BE;
1479 }1485 }
@@ -1780,6 +1786,10 @@
1780.launchpad-gold {1786.launchpad-gold {
1781 color: #F8C300;1787 color: #F8C300;
1782 }1788 }
1789
1790.discreet, .lesser, .duplicate-details {
1791 font-size: 85%;
1792 }
1783pre.changelog, table.diff,1793pre.changelog, table.diff,
1784.bug-comment, .bug-activity, .codereviewcomment {1794.bug-comment, .bug-activity, .codereviewcomment {
1785 font-size: 93%;1795 font-size: 93%;
17861796
=== modified file 'lib/canonical/launchpad/icing/style.css'
--- lib/canonical/launchpad/icing/style.css 2010-12-16 17:12:13 +0000
+++ lib/canonical/launchpad/icing/style.css 2010-12-18 00:58:15 +0000
@@ -25,13 +25,6 @@
2525
26/* === Fonts and colors === */26/* === Fonts and colors === */
2727
28
29
30
31
32.exception {color: #cc0000;}
33.discreet, .lesser, .duplicate-details {font-size: 90%;}
34.extra-discreet {font-size: 75%;}
35.unavailable {color: #999; background: none;}28.unavailable {color: #999; background: none;}
3629
37.duplicate-details p { padding: 0em; margin-top: 0em; margin-bottom: 0.2em; }30.duplicate-details p { padding: 0em; margin-top: 0em; margin-bottom: 0.2em; }
@@ -61,17 +54,6 @@
61 .notforscreen {display:none;}54 .notforscreen {display:none;}
62}55}
6356
64.highlighted, tr.highlight {background: #ddd; border: 1px solid #ddd;}
65.highlighted {padding: 0.5em;}
66.highlighted h3 {margin-top: 0;}
67.unhighlighted {padding: 0 0.5em;}
68.dimmed {
69 padding: 0 0.5em;
70 opacity: .5;
71 filter: alpha(opacity=50);
72 -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
73}
74
75.debug {57.debug {
76 background: none;58 background: none;
77 color: #f09;59 color: #f09;
@@ -262,7 +244,6 @@
262 margin-top: 1em;244 margin-top: 1em;
263}245}
264246
265.product.series, .series {margin-bottom: 1em;}
266#packages h1, #projects h1 {margin-top: 1.2em;}247#packages h1, #projects h1 {margin-top: 1.2em;}
267248
268249
269250
=== modified file 'lib/canonical/launchpad/webapp/error.py'
--- lib/canonical/launchpad/webapp/error.py 2010-08-31 11:11:09 +0000
+++ lib/canonical/launchpad/webapp/error.py 2010-12-18 00:58:15 +0000
@@ -115,7 +115,7 @@
115 def inside_div(self, html):115 def inside_div(self, html):
116 """Returns the given HTML inside a div of an appropriate class."""116 """Returns the given HTML inside a div of an appropriate class."""
117117
118 return ('<div class="highlighted" style="'118 return ('<div class="highlight" style="'
119 "font-family: 'UbuntuBeta Mono', 'Ubuntu Mono', monospace;"119 "font-family: 'UbuntuBeta Mono', 'Ubuntu Mono', monospace;"
120 ' font-size: smaller;">'120 ' font-size: smaller;">'
121 '%s'121 '%s'
122122
=== modified file 'lib/lp/answers/stories/project-add-question.txt'
--- lib/lp/answers/stories/project-add-question.txt 2010-08-02 02:33:53 +0000
+++ lib/lp/answers/stories/project-add-question.txt 2010-12-18 00:58:15 +0000
@@ -1,18 +1,20 @@
1= Asking a New Question from a ProjectGroup =1Asking a New Question from a ProjectGroup
2=========================================
23
3Even though project groups are not QuestionTargets, it is still possible to4Even though project groups are not QuestionTargets, it is still possible
4create a question from a project group. There are some form and behaviour5to create a question from a project group. There are some form and
5difference from the regular process for asking a question (documented6behaviour difference from the regular process for asking a question
6in 35-question-add.txt). Firstly, we do not know the product the7(documented in 35-question-add.txt). Firstly, we do not know the product
7product the question is about, so we ask the user to select one.8the product the question is about, so we ask the user to select one.
8Secondly, without knowing the product, we cannot show the which of the9Secondly, without knowing the product, we cannot show the which of the
9user's preferred languages are supported.10user's preferred languages are supported.
1011
1112
12== Ask a question about a Product in a ProjectGroup ==13Ask a question about a Product in a ProjectGroup
14------------------------------------------------
1315
14The user must be logged in to ask a question. When he attempts to ask16The user must be logged in to ask a question. When he attempts to ask a
15a question, without being logged in, he encounters an unauthorized17question, without being logged in, he encounters an unauthorized
16exception (and the user will be prompted to login from another page).18exception (and the user will be prompted to login from another page).
17The logged user will see the Ask a Question page, for the Mozilla19The logged user will see the Ask a Question page, for the Mozilla
18Project in this case.20Project in this case.
@@ -28,11 +30,11 @@
28 >>> print user_browser.title30 >>> print user_browser.title
29 Ask a question...31 Ask a question...
3032
31The workflow is identical to the regular one, except that the user33The workflow is identical to the regular one, except that the user must
32must select one of the ProjectGroup's Products. The page displays a list of34select one of the ProjectGroup's Products. The page displays a list of
33products associated with the project. Note that the site policy is35products associated with the project. Note that the site policy is to
34to use the word 'Project' for 'Products' (and 'Distributions') so36use the word 'Project' for 'Products' (and 'Distributions') so that
35that users do not have to learn our business' semantics.37users do not have to learn our business' semantics.
3638
37 >>> print user_browser.getControl('Project').displayOptions39 >>> print user_browser.getControl('Project').displayOptions
38 ['Mozilla Firefox', 'Mozilla Thunderbird']40 ['Mozilla Firefox', 'Mozilla Thunderbird']
@@ -70,7 +72,7 @@
7072
71 >>> similar_questions = find_tag_by_id(73 >>> similar_questions = find_tag_by_id(
72 ... user_browser.contents, 'similar-questions')74 ... user_browser.contents, 'similar-questions')
73 >>> for row in similar_questions.fetch('tr', 'noted'):75 >>> for row in similar_questions.fetch('tr', 'lesser'):
74 ... print row.a.renderContents()76 ... print row.a.renderContents()
75 Problem showing the SVG demo on W3C site77 Problem showing the SVG demo on W3C site
7678
@@ -81,8 +83,8 @@
81 >>> user_browser.getControl('Mozilla Thunderbird').selected = True83 >>> user_browser.getControl('Mozilla Thunderbird').selected = True
8284
83If he empties the question summary, and submits the form he'll be85If he empties the question summary, and submits the form he'll be
84redirected to the first page. Let's assume he does this by accident86redirected to the first page. Let's assume he does this by accident as
85as he revises the summary after reading the similar questions.87he revises the summary after reading the similar questions.
8688
87 >>> user_browser.getControl('Summary').value = ''89 >>> user_browser.getControl('Summary').value = ''
88 >>> user_browser.getControl('Post Question').click()90 >>> user_browser.getControl('Post Question').click()
@@ -94,12 +96,13 @@
94 >>> print soup.first('div', 'message').renderContents()96 >>> print soup.first('div', 'message').renderContents()
95 You must enter a summary of your problem.97 You must enter a summary of your problem.
9698
97The product Thunderbird that he selected on the previous screen is99The product Thunderbird that he selected on the previous screen is still
98still selected. No Privileged Person re-enters his question summary,100selected. No Privileged Person re-enters his question summary, and
99and submits the form.101submits the form.
100102
101 >>> print user_browser.getControl('Project').displayValue103 >>> print user_browser.getControl('Project').displayValue
102 ['Mozilla Thunderbird']104 ['Mozilla Thunderbird']
105
103 >>> user_browser.getControl('Summary').value = (106 >>> user_browser.getControl('Summary').value = (
104 ... 'Problem displaying complex SVG')107 ... 'Problem displaying complex SVG')
105 >>> user_browser.getControl('Continue').click()108 >>> user_browser.getControl('Continue').click()
@@ -113,39 +116,43 @@
113 There are no existing FAQs or questions similar to the summary you116 There are no existing FAQs or questions similar to the summary you
114 entered.117 entered.
115118
116The user then elaborates upon his question by entering a description119The user then elaborates upon his question by entering a description of
117of the problem. He submits the form using the 'Post Question' button.120the problem. He submits the form using the 'Post Question' button.
118121
119 >>> user_browser.getControl('Description').value = (122 >>> user_browser.getControl('Description').value = (
120 ... "I received an HTML message containing an inlined SVG\n"123 ... "I received an HTML message containing an inlined SVG\n"
121 ... "representation of a chessboard. It didn't displayed properly.\n"124 ... "representation of a chessboard. It didn't displayed properly.\n"
122 ... "Is there a way to configure Thunderbird to display SVG properly?\n")125 ... "Is there a way to configure Thunderbird to display SVG properly?\n")
123 >>> user_browser.getControl('Post Question').click()126 >>> user_browser.getControl('Post Question').click()
124127
125No Privileged Person is taken to page displaying his question. From128No Privileged Person is taken to page displaying his question. From this
126this point on, the user's interaction with the question follows to129point on, the user's interaction with the question follows to regular
127regular workflow. (see 30-question-workflow.txt for the details).130workflow. (see 30-question-workflow.txt for the details).
128131
129 >>> user_browser.url132 >>> user_browser.url
130 '.../thunderbird/+question/...'133 '.../thunderbird/+question/...'
134
131 >>> print user_browser.title135 >>> print user_browser.title
132 Question #... : Questions : Mozilla Thunderbird136 Question #... : Questions : Mozilla Thunderbird
133137
134138
135== Supported Language behaviour ==139Supported Language behaviour
140----------------------------
136141
137Following a similar path as demonstrated above with a non-English142Following a similar path as demonstrated above with a non-English
138language speaker illustrates a less-than-ideal behaviour for143language speaker illustrates a less-than-ideal behaviour for supported
139supported languages. (See xx-question-add-in-other-languages.txt144languages. (See xx-question-add-in-other-languages.txt for the regular
140for the regular behaviour).145behaviour).
141146
142=== Register a support contact who speaks a non-English language ===147
143148Register a support contact who speaks a non-English language
144To illustrate the supported language behavior, we add an answer149............................................................
145contact to Thunderbird who has Japanese as a preferred language.150
146Japanese will be a supported language for Thunderbird Questions,151To illustrate the supported language behavior, we add an answer contact
147which allows us to test the supported languages behaviour for152to Thunderbird who has Japanese as a preferred language. Japanese will
148non-English languages. Dafydd speaks Japanese, so we will use him.153be a supported language for Thunderbird Questions, which allows us to
154test the supported languages behaviour for non-English languages. Dafydd
155speaks Japanese, so we will use him.
149156
150 >>> daf_browser = setupBrowser(auth='Basic daf@canonical.com:daf')157 >>> daf_browser = setupBrowser(auth='Basic daf@canonical.com:daf')
151 >>> daf_browser.open('http://launchpad.dev/~daf/+editlanguages')158 >>> daf_browser.open('http://launchpad.dev/~daf/+editlanguages')
@@ -169,10 +176,9 @@
169 You have been added as an answer contact for Mozilla Thunderbird.176 You have been added as an answer contact for Mozilla Thunderbird.
170177
171And we add Japanese to No Privileges Person's preferred languages. We178And we add Japanese to No Privileges Person's preferred languages. We
172then have a condition for certain products, Thunderbird in this179then have a condition for certain products, Thunderbird in this example,
173example, where the user's languages and the answer contact's languages180where the user's languages and the answer contact's languages will
174will match. This condition demonstrates the supported language181match. This condition demonstrates the supported language behaviour.
175behaviour.
176182
177 >>> user_browser.open(183 >>> user_browser.open(
178 ... 'http://launchpad.dev/~no-priv/+editlanguages')184 ... 'http://launchpad.dev/~no-priv/+editlanguages')
@@ -187,33 +193,36 @@
187193
188So if No Privileges Person were to visit the Ask a Question page for194So if No Privileges Person were to visit the Ask a Question page for
189Thunderbird directly, he will see that Japanese, as well English (the195Thunderbird directly, he will see that Japanese, as well English (the
190default supported language), have asterisks next to them in196default supported language), have asterisks next to them in the Language
191the Language list. This indicates that he can ask a question in197list. This indicates that he can ask a question in Japanese or English
192Japanese or English and expect someone to reply in the same language.198and expect someone to reply in the same language.
193199
194 >>> user_browser.open(200 >>> user_browser.open(
195 ... 'http://answers.launchpad.dev/thunderbird/+addquestion')201 ... 'http://answers.launchpad.dev/thunderbird/+addquestion')
196 >>> print user_browser.getControl('Language').displayOptions202 >>> print user_browser.getControl('Language').displayOptions
197 ['English (en) *', 'Japanese (ja) *']203 ['English (en) *', 'Japanese (ja) *']
198204
199The supported languages will not be shown immediately when Sample205The supported languages will not be shown immediately when Sample Person
200Person asks a question Thunderbird question from the context of the206asks a question Thunderbird question from the context of the Mozilla
201Mozilla Project.207Project.
202208
203209
204=== Ask a non-English question about a Product in a ProjectGroup ===210Ask a non-English question about a Product in a ProjectGroup
211............................................................
205212
206Supported languages are only shown after the user submits the 'Product'213Supported languages are only shown after the user submits the 'Product'
207associated with the project. When a user enters the 'Product'214associated with the project. When a user enters the 'Product'
208information incorrectly we cannot show the supported languages to the215information incorrectly we cannot show the supported languages to the
209user.216user.
210217
211==== Supported languages aren't displayed after choosing a product ====218
219Supported languages aren't displayed after choosing a product
220.............................................................
212221
213XXX sinzui 2007-05-02 #111793 (Supported languages will not be shown in222XXX sinzui 2007-05-02 #111793 (Supported languages will not be shown in
214some cases when asking questions from the ProjectGroup facet)223some cases when asking questions from the ProjectGroup facet) No
215No Privileges Person visits the Ask a question page from a project just224Privileges Person visits the Ask a question page from a project just as
216as No Privileged Person did above, but this time in wants to do so in225No Privileged Person did above, but this time in wants to do so in
217Japanese.226Japanese.
218227
219 >>> user_browser.open('http://answers.launchpad.dev/mozilla')228 >>> user_browser.open('http://answers.launchpad.dev/mozilla')
@@ -221,22 +230,23 @@
221 >>> print user_browser.title230 >>> print user_browser.title
222 Ask a question...231 Ask a question...
223232
224The page displays a list of products associated with the project.233The page displays a list of products associated with the project. The
225The first item in the list is the default value, and it will be234first item in the list is the default value, and it will be submitted if
226submitted if the user does not change it.235the user does not change it.
227236
228 >>> print user_browser.getControl('Project').displayOptions237 >>> print user_browser.getControl('Project').displayOptions
229 ['Mozilla Firefox', 'Mozilla Thunderbird']238 ['Mozilla Firefox', 'Mozilla Thunderbird']
239
230 >>> print user_browser.getControl('Project').displayValue240 >>> print user_browser.getControl('Project').displayValue
231 ['Mozilla Firefox']241 ['Mozilla Firefox']
232242
233Like for the regular workflow, the user is shown a list of languages,243Like for the regular workflow, the user is shown a list of languages,
234with the supported languages flagged with an asterisk. Note that only244with the supported languages flagged with an asterisk. Note that only
235English is flagged because we do not know which Product the245English is flagged because we do not know which Product the question is
236question is about. Without knowing the product, we cannot flag the246about. Without knowing the product, we cannot flag the supported
237supported languages other than the default language of English. If the247languages other than the default language of English. If the user were
238user were to submit his question in another language, he might find248to submit his question in another language, he might find that the
239that the language is supported on the next page.249language is supported on the next page.
240250
241 >>> print user_browser.getControl('Language').displayOptions251 >>> print user_browser.getControl('Language').displayOptions
242 ['English (en) *', 'Japanese (ja)']252 ['English (en) *', 'Japanese (ja)']
@@ -252,10 +262,10 @@
252 ... 'Problem displaying complex SVG')262 ... 'Problem displaying complex SVG')
253 >>> user_browser.getControl('Continue').click()263 >>> user_browser.getControl('Continue').click()
254264
255He's shown a list of similar questions related to the product265He's shown a list of similar questions related to the product Firefox.
256Firefox. He can see which of his preferred languages are supported266He can see which of his preferred languages are supported for the
257for the Firefox product by reviewing which languages has asterisks267Firefox product by reviewing which languages has asterisks in the
258in the Languages list--only English in the example.268Languages list--only English in the example.
259269
260 >>> print user_browser.getControl('Language').displayOptions270 >>> print user_browser.getControl('Language').displayOptions
261 ['English (en) *', 'Japanese (ja)']271 ['English (en) *', 'Japanese (ja)']
@@ -273,15 +283,17 @@
273283
274If No Privileges Person asks a question in Japanese, it will be284If No Privileges Person asks a question in Japanese, it will be
275supported by Dafydd, but No Privileges Person will never know that.285supported by Dafydd, but No Privileges Person will never know that.
276Let's stop here. The rest of this scenario is just adding a question286Let's stop here. The rest of this scenario is just adding a question as
277as described above--filling in a description and submitting the data287described above--filling in a description and submitting the data with
278with the 'Post Question' button.288the 'Post Question' button.
279289
280==== Supported languages are displayed after the submitting a product ====290
291Supported languages are displayed after the submitting a product
292................................................................
281293
282Let's try this again from the starting page, but this time, No294Let's try this again from the starting page, but this time, No
283Privileges Person correctly chooses Thunderbird as the subject of295Privileges Person correctly chooses Thunderbird as the subject of his
284his question.296question.
285297
286 >>> user_browser.open('http://answers.launchpad.dev/mozilla')298 >>> user_browser.open('http://answers.launchpad.dev/mozilla')
287 >>> user_browser.getLink('Ask a question').click()299 >>> user_browser.getLink('Ask a question').click()
@@ -295,38 +307,41 @@
295307
296 >>> print user_browser.getControl('Language').displayOptions308 >>> print user_browser.getControl('Language').displayOptions
297 ['English (en) *', 'Japanese (ja)']309 ['English (en) *', 'Japanese (ja)']
310
298 >>> user_browser.getControl('Summary').value = (311 >>> user_browser.getControl('Summary').value = (
299 ... 'Problem displaying complex SVG')312 ... 'Problem displaying complex SVG')
300 >>> user_browser.getControl('Continue').click()313 >>> user_browser.getControl('Continue').click()
301314
302The product Thunderbird that he selected on the previous screen is315The product Thunderbird that he selected on the previous screen is still
303still selected. He can see that this product has support for Japanese316selected. He can see that this product has support for Japanese as well
304as well as English when he sees the asterisks next to both in the317as English when he sees the asterisks next to both in the Languages
305Languages list. Japanese is supported because Dafydd speaks Japanese318list. Japanese is supported because Dafydd speaks Japanese and is an
306and is an answer contact for Thunderbird. We see this only after a319answer contact for Thunderbird. We see this only after a question
307question summary is submitted for a product.320summary is submitted for a product.
308321
309 >>> print user_browser.getControl('Language').displayOptions322 >>> print user_browser.getControl('Language').displayOptions
310 ['English (en) *', 'Japanese (ja) *']323 ['English (en) *', 'Japanese (ja) *']
311324
312No Privileges Person sets the language to Japanese, changes his325No Privileges Person sets the language to Japanese, changes his question
313question summary, writes a description, and submits the form with the326summary, writes a description, and submits the form with the 'Post
314'Post Question' button.327Question' button.
315328
316 >>> print user_browser.getControl('Project').displayValue329 >>> print user_browser.getControl('Project').displayValue
317 ['Mozilla Thunderbird']330 ['Mozilla Thunderbird']
331
318 >>> user_browser.getControl('Japanese (ja) *').selected = True332 >>> user_browser.getControl('Japanese (ja) *').selected = True
319 >>> user_browser.getControl('Summary').value = (333 >>> user_browser.getControl('Summary').value = (
320 ... 'Pretend this is written in Japanese')334 ... 'Pretend this is written in Japanese')
321 >>> user_browser.getControl('Description').value = (335 >>> user_browser.getControl('Description').value = (
322 ... "Something in kanji and hiragana.")336 ... "Something in kanji and hiragana.")
323 >>> user_browser.getControl('Post Question').click()337 >>> user_browser.getControl('Post Question').click()
324338
325The user is taken to page displaying his question. Changing the339The user is taken to page displaying his question. Changing the language
326language or the summary did not search for similar questions340or the summary did not search for similar questions again--the question
327again--the question is created.341is created.
328342
329 >>> user_browser.url343 >>> user_browser.url
330 '.../thunderbird/+question/...'344 '.../thunderbird/+question/...'
345
331 >>> print user_browser.title346 >>> print user_browser.title
332 Question #... : Questions : Mozilla Thunderbird347 Question #... : Questions : Mozilla Thunderbird
333348
=== modified file 'lib/lp/answers/stories/questions-index.txt'
--- lib/lp/answers/stories/questions-index.txt 2010-11-15 23:55:43 +0000
+++ lib/lp/answers/stories/questions-index.txt 2010-12-18 00:58:15 +0000
@@ -14,7 +14,7 @@
14 >>> firefox.answers_usage = ServiceUsage.LAUNCHPAD14 >>> firefox.answers_usage = ServiceUsage.LAUNCHPAD
15 >>> ubuntu.answers_usage = ServiceUsage.LAUNCHPAD15 >>> ubuntu.answers_usage = ServiceUsage.LAUNCHPAD
16 >>> logout()16 >>> logout()
17 >>> transaction.commit() 17 >>> transaction.commit()
1818
19 >>> anon_browser.open('http://answers.launchpad.dev/')19 >>> anon_browser.open('http://answers.launchpad.dev/')
20 >>> print anon_browser.title20 >>> print anon_browser.title
@@ -26,7 +26,7 @@
26 ... anon_browser.contents, 'latest-questions-asked')26 ... anon_browser.contents, 'latest-questions-asked')
27 >>> print latest_questions_asked.first('h2').renderContents()27 >>> print latest_questions_asked.first('h2').renderContents()
28 Latest questions asked28 Latest questions asked
29 >>> for row in latest_questions_asked.fetch('tr', 'noted'):29 >>> for row in latest_questions_asked.fetch('tr', 'lesser'):
30 ... row.first('a').renderContents()30 ... row.first('a').renderContents()
31 'Problemas de Impress\xc3\xa3o no Firefox'31 'Problemas de Impress\xc3\xa3o no Firefox'
32 'Problema al recompilar kernel con soporte smp (doble-n\xc3\xbacleo)'32 'Problema al recompilar kernel con soporte smp (doble-n\xc3\xbacleo)'
@@ -40,7 +40,7 @@
40 ... anon_browser.contents, 'latest-questions-solved')40 ... anon_browser.contents, 'latest-questions-solved')
41 >>> print latest_questions_solved.first('h2').renderContents()41 >>> print latest_questions_solved.first('h2').renderContents()
42 Latest questions solved42 Latest questions solved
43 >>> for row in latest_questions_solved.fetch('tr', 'noted'):43 >>> for row in latest_questions_solved.fetch('tr', 'lesser'):
44 ... row.first('a').renderContents()44 ... row.first('a').renderContents()
45 'mailto: problem in webpage'45 'mailto: problem in webpage'
4646
4747
=== modified file 'lib/lp/answers/templates/question-listing-detailed.pt'
--- lib/lp/answers/templates/question-listing-detailed.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/answers/templates/question-listing-detailed.pt 2010-12-18 00:58:15 +0000
@@ -4,7 +4,7 @@
4 xmlns:i18n="http://xml.zope.org/namespaces/i18n">4 xmlns:i18n="http://xml.zope.org/namespaces/i18n">
5 <tal:description5 <tal:description
6 define="global description context/description/fmt:obfuscate-email/fmt:shorten/320" />6 define="global description context/description/fmt:obfuscate-email/fmt:shorten/320" />
7<tr class="noted"7<tr class="lesser"
8 tal:attributes="title description">8 tal:attributes="title description">
9 <td class="icon left">9 <td class="icon left">
10 <img alt="" src="/@@/question" />10 <img alt="" src="/@@/question" />
@@ -20,7 +20,7 @@
20 />20 />
21 (<span tal:replace="context/status/title">Approved</span>)21 (<span tal:replace="context/status/title">Approved</span>)
22 </div>22 </div>
23 <div class="lesser">23 <div>
24 posted24 posted
25 <span25 <span
26 tal:attributes="title context/datecreated/fmt:datetime"26 tal:attributes="title context/datecreated/fmt:datetime"
2727
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2010-11-28 00:47:39 +0000
+++ lib/lp/registry/browser/distribution.py 2010-12-18 00:58:15 +0000
@@ -829,13 +829,14 @@
829 return all_series829 return all_series
830830
831 def getCssClass(self, series):831 def getCssClass(self, series):
832 """The highlighted, unhighlighted, or dimmed CSS class."""832 """The highlight, lowlight, or normal CSS class."""
833 if series.status == SeriesStatus.DEVELOPMENT:833 if series.status == SeriesStatus.DEVELOPMENT:
834 return 'highlighted'834 return 'highlight'
835 elif series.status == SeriesStatus.OBSOLETE:835 elif series.status == SeriesStatus.OBSOLETE:
836 return 'dimmed'836 return 'lowlight'
837 else:837 else:
838 return 'unhighlighted'838 # This is normal presentation.
839 return ''
839840
840841
841class DistributionChangeMirrorAdminView(RegistryEditFormView):842class DistributionChangeMirrorAdminView(RegistryEditFormView):
842843
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py 2010-11-23 23:22:27 +0000
+++ lib/lp/registry/browser/product.py 2010-12-18 00:58:15 +0000
@@ -810,13 +810,14 @@
810810
811 @property811 @property
812 def css_class(self):812 def css_class(self):
813 """The highlighted, unhighlighted, or dimmed CSS class."""813 """The highlight, lowlight, or normal CSS class."""
814 if self.is_development_focus:814 if self.is_development_focus:
815 return 'highlighted'815 return 'highlight'
816 elif self.status == SeriesStatus.OBSOLETE:816 elif self.status == SeriesStatus.OBSOLETE:
817 return 'dimmed'817 return 'lowlight'
818 else:818 else:
819 return 'unhighlighted'819 # This is normal presentation.
820 return ''
820821
821822
822class SeriesWithReleases(DecoratedSeries):823class SeriesWithReleases(DecoratedSeries):
823824
=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
--- lib/lp/registry/browser/tests/distribution-views.txt 2010-11-29 19:08:26 +0000
+++ lib/lp/registry/browser/tests/distribution-views.txt 2010-12-18 00:58:15 +0000
@@ -306,10 +306,10 @@
306306
307 >>> for styled_series in view.styled_series:307 >>> for styled_series in view.styled_series:
308 ... print styled_series['series'].name, styled_series['css_class']308 ... print styled_series['series'].name, styled_series['css_class']
309 breezy-autotest unhighlighted309 breezy-autotest
310 grumpy unhighlighted310 grumpy
311 hoary highlighted311 hoary highlight
312 warty unhighlighted312 warty
313313
314314
315Distribution +ppas315Distribution +ppas
316316
=== modified file 'lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt'
--- lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2010-03-26 02:27:44 +0000
+++ lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2010-12-18 00:58:15 +0000
@@ -1,4 +1,5 @@
1= Distribution mirrors =1Distribution mirrors
2====================
23
3There are several pages which list the mirrors of a given distribution based4There are several pages which list the mirrors of a given distribution based
4on their status and content.5on their status and content.
@@ -11,13 +12,13 @@
11 ... country = extract_text(header.find('th'))12 ... country = extract_text(header.find('th'))
12 ... mirrors = []13 ... mirrors = []
13 ... for tr in header.findNextSiblings('tr'):14 ... for tr in header.findNextSiblings('tr'):
14 ... if 'highlighted' in str(tr.attrs):15 ... if 'highlight' in str(tr.attrs):
15 ... print "%s: %s" % (country, mirrors)16 ... print "%s: %s" % (country, mirrors)
16 ... country = extract_text(tr.find('th'))17 ... country = extract_text(tr.find('th'))
17 ... if country == 'Total':18 ... if country == 'Total':
18 ... break19 ... break
19 ... mirrors = []20 ... mirrors = []
20 ... elif 'note' in str(tr.attrs):21 ... elif 'lesser' in str(tr.attrs):
21 ... # This is an empty row to visually separate the mirrors22 ... # This is an empty row to visually separate the mirrors
22 ... # from different countries, so we'll just skip it.23 ... # from different countries, so we'll just skip it.
23 ... pass24 ... pass
@@ -25,7 +26,8 @@
25 ... tds = tuple([extract_text(td) for td in tr.findAll('td')])26 ... tds = tuple([extract_text(td) for td in tr.findAll('td')])
26 ... mirrors.append(tds)27 ... mirrors.append(tds)
2728
28== Official mirrors ==29Official mirrors
30----------------
2931
30These are the mirrors that show up in public listings. They're highly32These are the mirrors that show up in public listings. They're highly
31reliable and we strongly encourage their use.33reliable and we strongly encourage their use.
@@ -48,7 +50,8 @@
48 United Kingdom: [(u'Canonical-archive', u'http', u'100 Mbps',50 United Kingdom: [(u'Canonical-archive', u'http', u'100 Mbps',
49 u'Last update unknown')]51 u'Last update unknown')]
5052
51 >>> find_tags_by_class(browser.contents, 'distromirrorstatusSIXHOURSBEHIND')53 >>> find_tags_by_class(
54 ... browser.contents, 'distromirrorstatusSIXHOURSBEHIND')
52 [<span class="distromirrorstatusSIXHOURSBEHIND">Six hours behind</span>]55 [<span class="distromirrorstatusSIXHOURSBEHIND">Six hours behind</span>]
53 >>> find_tags_by_class(browser.contents, 'distromirrorstatusUNKNOWN')[0]56 >>> find_tags_by_class(browser.contents, 'distromirrorstatusUNKNOWN')[0]
54 <span class="distromirrorstatusUNKNOWN">Last update unknown</span>57 <span class="distromirrorstatusUNKNOWN">Last update unknown</span>
@@ -60,14 +63,15 @@
60 >>> browser.url63 >>> browser.url
61 'http://launchpad.dev/ubuntu/+cdmirrors'64 'http://launchpad.dev/ubuntu/+cdmirrors'
62 >>> print_mirrors_by_countries(browser.contents)65 >>> print_mirrors_by_countries(browser.contents)
63 France: 66 France:
64 [(u'Releases-mirror', u'http', u'2 Mbps'),67 [(u'Releases-mirror', u'http', u'2 Mbps'),
65 (u'Unreachable-mirror', u'http', u'512 Kbps')]68 (u'Unreachable-mirror', u'http', u'512 Kbps')]
66 Germany: [(u'Releases-mirror2', u'http', u'2 Mbps')]69 Germany: [(u'Releases-mirror2', u'http', u'2 Mbps')]
67 United Kingdom: [(u'Canonical-releases', u'http', u'100 Mbps')]70 United Kingdom: [(u'Canonical-releases', u'http', u'100 Mbps')]
6871
6972
70=== Disabled mirrors ===73Disabled mirrors
74................
7175
72These are official mirrors for which the last check wasn't successful (e.g.76These are official mirrors for which the last check wasn't successful (e.g.
73they were out of date, missing some content, etc). This list can only be77they were out of date, missing some content, etc). This list can only be
@@ -88,7 +92,8 @@
88 ...We don't know of any Disabled Mirrors for this distribution...92 ...We don't know of any Disabled Mirrors for this distribution...
8993
9094
91== Unofficial mirrors ==95Unofficial mirrors
96------------------
9297
93The unofficial mirrors are listed in a separate page, which is not public.98The unofficial mirrors are listed in a separate page, which is not public.
94It's only visible to distro owners, mirror admins of the distro or99It's only visible to distro owners, mirror admins of the distro or
@@ -107,7 +112,9 @@
107 >>> print_mirrors_by_countries(browser.contents)112 >>> print_mirrors_by_countries(browser.contents)
108 France: [(u'Invalid-mirror', u'http', u'2 Mbps', u'Last update unknown')]113 France: [(u'Invalid-mirror', u'http', u'2 Mbps', u'Last update unknown')]
109114
110== Pending-review mirrors ==115
116Pending-review mirrors
117----------------------
111118
112These are the mirrors that were created but none of the mirror admins have119These are the mirrors that were created but none of the mirror admins have
113looked at yet. Since all pending mirrors are grouped on one page the120looked at yet. Since all pending mirrors are grouped on one page the
@@ -122,7 +129,8 @@
122 >>> browser = setupBrowser(auth='Basic karl@canonical.com:test')129 >>> browser = setupBrowser(auth='Basic karl@canonical.com:test')
123 >>> # Register an unreviewed archive mirror.130 >>> # Register an unreviewed archive mirror.
124 >>> browser.open('http://launchpad.dev/ubuntu/+newmirror')131 >>> browser.open('http://launchpad.dev/ubuntu/+newmirror')
125 >>> browser.getControl(name='field.displayname').value = 'Kabul LUG mirror'132 >>> browser.getControl(
133 ... name='field.displayname').value = 'Kabul LUG mirror'
126 >>> browser.getControl(name='field.ftp_base_url').value = (134 >>> browser.getControl(name='field.ftp_base_url').value = (
127 ... 'ftp://kabullug.org/ubuntu')135 ... 'ftp://kabullug.org/ubuntu')
128 >>> browser.getControl(name='field.country').value = ['1'] # Afghanistan136 >>> browser.getControl(name='field.country').value = ['1'] # Afghanistan
129137
=== modified file 'lib/lp/registry/stories/productseries/xx-productseries-series.txt'
--- lib/lp/registry/stories/productseries/xx-productseries-series.txt 2010-08-13 01:20:31 +0000
+++ lib/lp/registry/stories/productseries/xx-productseries-series.txt 2010-12-18 00:58:15 +0000
@@ -38,7 +38,7 @@
38it is highlighted.38it is highlighted.
3939
40 >>> print series_trunk['class']40 >>> print series_trunk['class']
41 highlighted series41 highlight series
4242
43The 1.0 series is not the focus of development, it is active, so it is not43The 1.0 series is not the focus of development, it is active, so it is not
44highlighted.44highlighted.
@@ -52,9 +52,9 @@
52 The 1.0 branch of the Mozilla web browser. Currently, this is the ...52 The 1.0 branch of the Mozilla web browser. Currently, this is the ...
5353
54 >>> print series_1_0['class']54 >>> print series_1_0['class']
55 unhighlighted series55 series
5656
57Any user can see that obsolete series are dimmed. Obsolete series do not57Any user can see that obsolete series are lowlight. Obsolete series do not
58show bug status counts because it is expensive to retrieve the information.58show bug status counts because it is expensive to retrieve the information.
5959
60 >>> series_xxx = find_tag_by_id(content, 'series-xxx')60 >>> series_xxx = find_tag_by_id(content, 'series-xxx')
@@ -64,4 +64,4 @@
64 Use true GTK UI.64 Use true GTK UI.
6565
66 >>> print series_xxx['class']66 >>> print series_xxx['class']
67 dimmed series67 lowlight series
6868
=== modified file 'lib/lp/registry/templates/distributionmirror-macros.pt'
--- lib/lp/registry/templates/distributionmirror-macros.pt 2009-12-09 19:41:23 +0000
+++ lib/lp/registry/templates/distributionmirror-macros.pt 2010-12-18 00:58:15 +0000
@@ -16,7 +16,7 @@
16 <table class="listing" id="mirrors_list">16 <table class="listing" id="mirrors_list">
17 <tbody>17 <tbody>
18 <tal:country_and_mirrors repeat="country_and_mirrors mirrors_by_country">18 <tal:country_and_mirrors repeat="country_and_mirrors mirrors_by_country">
19 <tr class="highlighted">19 <tr class="highlight">
20 <th colspan="2" style="text-align: left"20 <th colspan="2" style="text-align: left"
21 tal:content="country_and_mirrors/country" />21 tal:content="country_and_mirrors/country" />
22 <th style="text-align: left"22 <th style="text-align: left"
@@ -59,12 +59,12 @@
59 Include a blank row after the last entry of a country to provide59 Include a blank row after the last entry of a country to provide
60 vertical spacing to separate the next country.60 vertical spacing to separate the next country.
61 </tal:comment>61 </tal:comment>
62 <tr class="note">62 <tr class="lesser">
63 <td>&nbsp;</td>63 <td>&nbsp;</td>
64 </tr>64 </tr>
6565
66 </tal:country_and_mirrors>66 </tal:country_and_mirrors>
67 <tr class="highlighted">67 <tr class="highlight">
68 <th colspan="5" style="text-align: left; font-weight: bold;">Total</th>68 <th colspan="5" style="text-align: left; font-weight: bold;">Total</th>
69 </tr>69 </tr>
70 <tr>70 <tr>
7171
=== modified file 'lib/lp/registry/templates/productreleasefile-macros.pt'
--- lib/lp/registry/templates/productreleasefile-macros.pt 2010-01-15 20:42:44 +0000
+++ lib/lp/registry/templates/productreleasefile-macros.pt 2010-12-18 00:58:15 +0000
@@ -26,7 +26,7 @@
26 define="last_downloaded lfa/last_downloaded">26 define="last_downloaded lfa/last_downloaded">
27 <span tal:replace="lfa/hits/fmt:intcomma">10</span>27 <span tal:replace="lfa/hits/fmt:intcomma">10</span>
28 <br />28 <br />
29 <span class="extra-discreet greyed-out">29 <span class="lesser greyed-out">
30 last downloaded30 last downloaded
31 <strong tal:condition="not:last_downloaded/days">31 <strong tal:condition="not:last_downloaded/days">
32 today32 today
3333
=== modified file 'lib/lp/registry/templates/team-editproposed.pt'
--- lib/lp/registry/templates/team-editproposed.pt 2009-09-01 19:43:30 +0000
+++ lib/lp/registry/templates/team-editproposed.pt 2010-12-18 00:58:15 +0000
@@ -32,8 +32,8 @@
32 <td style="text-align: left">32 <td style="text-align: left">
33 <span tal:replace="structure member/fmt:link" />33 <span tal:replace="structure member/fmt:link" />
34 <br />34 <br />
35 <span class="extra-discreet">35 <span class="lesser">
36 (Applied on 36 (Applied on
37 <span tal:replace="membership/date_proposed/fmt:date" />)37 <span tal:replace="membership/date_proposed/fmt:date" />)
38 </span>38 </span>
39 </td>39 </td>
4040
=== modified file 'lib/lp/soyuz/browser/sourcepackagerelease.py'
--- lib/lp/soyuz/browser/sourcepackagerelease.py 2010-07-02 20:32:58 +0000
+++ lib/lp/soyuz/browser/sourcepackagerelease.py 2010-12-18 00:58:15 +0000
@@ -155,5 +155,5 @@
155 return ''155 return ''
156 # Match any string with 2 or more non-consecutive slashes in it.156 # Match any string with 2 or more non-consecutive slashes in it.
157 pattern = re.compile(r'([\S]+/[\S]+/[\S]+)')157 pattern = re.compile(r'([\S]+/[\S]+/[\S]+)')
158 highlight = r'<span class="highlighted">\1</span>'158 highlight = r'<span class="highlight">\1</span>'
159 return pattern.sub(highlight, self.context.copyright)159 return pattern.sub(highlight, self.context.copyright)
160160
=== modified file 'lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py'
--- lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py 2010-10-04 19:50:45 +0000
+++ lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py 2010-12-18 00:58:15 +0000
@@ -87,7 +87,7 @@
87 'Downloaded from https://upstream.dom/fnord/no/ and')87 'Downloaded from https://upstream.dom/fnord/no/ and')
88 expected = (88 expected = (
89 'Downloaded from '89 'Downloaded from '
90 '<span class="highlighted">https://upstream.dom/fnord/no/</span> '90 '<span class="highlight">https://upstream.dom/fnord/no/</span> '
91 'and')91 'and')
92 view = create_initialized_view(92 view = create_initialized_view(
93 self.source_package_release, '+copyright')93 self.source_package_release, '+copyright')
@@ -99,7 +99,7 @@
99 'See /usr/share/common-licenses/GPL')99 'See /usr/share/common-licenses/GPL')
100 expected = (100 expected = (
101 'See '101 'See '
102 '<span class="highlighted">/usr/share/common-licenses/GPL</span>')102 '<span class="highlight">/usr/share/common-licenses/GPL</span>')
103 view = create_initialized_view(103 view = create_initialized_view(
104 self.source_package_release, '+copyright')104 self.source_package_release, '+copyright')
105 self.assertEqual(expected, view.highlighted_copyright)105 self.assertEqual(expected, view.highlighted_copyright)
@@ -110,8 +110,8 @@
110 'See /usr/share/common-licenses/GPL or https://osi.org/mit')110 'See /usr/share/common-licenses/GPL or https://osi.org/mit')
111 expected = (111 expected = (
112 'See '112 'See '
113 '<span class="highlighted">/usr/share/common-licenses/GPL</span> '113 '<span class="highlight">/usr/share/common-licenses/GPL</span> '
114 'or <span class="highlighted">https://osi.org/mit</span>')114 'or <span class="highlight">https://osi.org/mit</span>')
115 view = create_initialized_view(115 view = create_initialized_view(
116 self.source_package_release, '+copyright')116 self.source_package_release, '+copyright')
117 self.assertEqual(expected, view.highlighted_copyright)117 self.assertEqual(expected, view.highlighted_copyright)