allura
Revision | 531a01d1af919a26fde31d73091ece7648ee0dd0 (tree) |
---|---|
Time | 2012-04-02 23:21:16 |
Author | bolkimen <bolkimen@yaho...> |
Commiter | bolkimen |
Merge branch 't34_valid_html_css' into t35_custom_css_values
@@ -180,9 +180,9 @@ class Neighborhood(MappedClass): | ||
180 | 180 | if m: |
181 | 181 | icon_theme = m.group(1) |
182 | 182 | if icon_theme == "ffffff": |
183 | - titlebarcolor_dark = 'selected="selected"' | |
183 | + titlebarcolor_dark = ' selected="selected"' | |
184 | 184 | elif icon_theme == "454545": |
185 | - titlebarcolor_white = 'selected="selected"' | |
185 | + titlebarcolor_white = ' selected="selected"' | |
186 | 186 | |
187 | 187 | titlebarcolor['additional'] = titlebarcolor['additional'] % {'titlebarcolor_dark': titlebarcolor_dark, |
188 | 188 | 'titlebarcolor_white': titlebarcolor_white} |
@@ -125,14 +125,17 @@ class TestNeighborhood(TestController): | ||
125 | 125 | 'css-projecttitlecolor': 'green', |
126 | 126 | 'css-barontop': '#555555', |
127 | 127 | 'css-titlebarbackground': '#333', |
128 | - 'css-titlebarcolor': '#444'}, | |
128 | + 'css-titlebarcolor': '#444', | |
129 | + 'css-addopt-icon-theme': 'dark'}, | |
129 | 130 | extra_environ=dict(username='root'), upload_files=[]) |
130 | 131 | neighborhood = M.Neighborhood.query.get(name='Adobe') |
131 | 132 | assert '/*projecttitlefont*/.project_title{font-family:arial,sans-serif;}' in neighborhood.css |
132 | 133 | assert '/*projecttitlecolor*/.project_title{color:green;}' in neighborhood.css |
133 | 134 | assert '/*barontop*/.pad h2.colored {background-color:#555555; background-image: none;}' in neighborhood.css |
134 | 135 | assert '/*titlebarbackground*/.pad h2.title{background-color:#333; background-image: none;}' in neighborhood.css |
135 | - assert '/*titlebarcolor*/.pad h2.title{color:#444;}' in neighborhood.css | |
136 | + assert "/*titlebarcolor*/.pad h2.title{color:#444;} "\ | |
137 | + ".pad h2.dark small b.ico {background-image: "\ | |
138 | + "url('/nf/_ew_/theme/allura/images/neo-icon-set-ffffff-256x350.png');}" in neighborhood.css | |
136 | 139 | |
137 | 140 | def test_max_projects(self): |
138 | 141 | # Set max value to unlimit |
@@ -53,17 +53,21 @@ def test_neighborhood(): | ||
53 | 53 | 'titlebarbackground': u'#555', |
54 | 54 | 'projecttitlefont': u'arial,sans-serif', |
55 | 55 | 'projecttitlecolor': u'#333', |
56 | - 'titlebarcolor': u'#666'} | |
56 | + 'titlebarcolor': u'#666', | |
57 | + 'addopt-icon-theme': 'dark'} | |
57 | 58 | css_text = neighborhood.compile_css_for_gold_level(test_css_dict) |
58 | 59 | assert '#333' in css_text |
59 | 60 | assert '#444' in css_text |
60 | 61 | assert '#555' in css_text |
61 | 62 | assert '#666' in css_text |
62 | 63 | assert 'arial,sans-serif' in css_text |
64 | + assert 'images/neo-icon-set-ffffff-256x350.png' in css_text | |
63 | 65 | neighborhood.css = css_text |
64 | 66 | styles_list = neighborhood.get_css_for_gold_level() |
65 | 67 | for style in styles_list: |
66 | 68 | assert test_css_dict[style['name']] == style['value'] |
69 | + if style['name'] == 'titlebarcolor': | |
70 | + assert '<option value="dark" selected="selected">' in style['additional'] | |
67 | 71 | |
68 | 72 | # Check neighborhood custom css showing |
69 | 73 | neighborhood.level = 'silver' |