Commit 246d3c85 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity_test: add&update tests

parent 572a0c3d
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>967afca778f004143c6bafaea2d888ec</string> </value>
<value> <string>edbd8f387ade29569aa1db37e1dc756b</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>ca5cde4d122c717dcaef89bf3d6e23ae</string> </value>
<value> <string>3c68ea21fb25f8b83fe6908fee0164a2</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>0314b93d0fb10b23d0aa1799c44e761d</string> </value>
<value> <string>3b6af83be3f9f958b768030967345da3</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>1b2d5bf60d483ff11c2b1ba182ed2dd3</string> </value>
<value> <string>bad17ec47b3b1e892d1832c8497c7d87</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>9bff6bfd8a65cfa2145cc1564fdb5dee</string> </value>
<value> <string>cb29d44fd74c8d11afa17a95e6767156</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>b6bfd5f25b79b36e3bf83b2210ca9fdd</string> </value>
<value> <string>92a0def90cf6561e214e1c09de4b3d96</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>de214bf3042b6c0f52b7d3062299c558</string> </value>
<value> <string>49afdaf94a2b72834b2e73fe618a2d92</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -85,7 +85,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>96ffbe981571517de8a6d6db40dd8745</string> </value>
<value> <string>4eae92db6c336a7b56b51455694e533f</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>f3de6eafce10b64f74c197f1bd926b68</string> </value>
<value> <string>53032bd9ff781e0aff1dc6bec1a69997</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>27cbfb271e80056f7c66d8a6a2862255</string> </value>
<value> <string>863b226b9a44c0d839044e90a36544b5</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>50efed194d98db8d6c2829cdc1cedfcf</string> </value>
<value> <string>d1251e10d5377c3998da9757888c27b8</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>9cb258a82b3f0588817bb131e05988c4</string> </value>
<value> <string>59d7bf19acdbf7b657908aa119bde08a</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>b97c618ba81cbd270f5512510856c559</string> </value>
<value> <string>c4f85a79732d6e218f4897ec40dd92e3</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>de214bf3042b6c0f52b7d3062299c558</string> </value>
<value> <string>49afdaf94a2b72834b2e73fe618a2d92</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>99ec2acc2691c7c5b5fa9ff585cd3e14</string> </value>
<value> <string>f2841e1fedb7255533c5904862bfa6ca</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Image" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Change_local_roles_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>604f59988f92a7d5fb7ca004354733ed</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>image/x-bmp</string> </value>
</item>
<item>
<key> <string>height</string> </key>
<value> <int>842</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>template_test_letter_theme_logo</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Image</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>595</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
<div class="ci-letter-header">
<div class="ci-letter-bar">
<div class="ci-letter-bar-logo">
<div class="ci-letter-bar-logo ci-letter-bar-logo-without-description">
<img src="image_module/template_test_image_logo_png?format=png&amp;display=thumbnail"
alt="" />
<span></span>
......
......@@ -14,7 +14,7 @@
<div class="ci-letter-header">
<div class="ci-letter-bar">
<div class="ci-letter-bar-logo">
<div class="ci-letter-bar-logo ci-letter-bar-logo-without-description">
<img src="image_module/template_test_image_logo_png?format=png&amp;display=thumbnail"
alt="" />
<span></span>
......
......@@ -14,7 +14,7 @@
<div class="ci-letter-header">
<div class="ci-letter-bar">
<div class="ci-letter-bar-logo">
<div class="ci-letter-bar-logo ci-letter-bar-logo-without-description">
<img src="organisation_module/template_test_association/default_image?format=png&amp;display=thumbnail"
alt="" />
<span></span>
......
......@@ -14,7 +14,7 @@
<div class="ci-letter-header">
<div class="ci-letter-bar">
<div class="ci-letter-bar-logo">
<div class="ci-letter-bar-logo ci-letter-bar-logo-without-description">
<img src="image_module/template_test_image_logo_png?format=png&amp;display=thumbnail"
alt="" />
<span></span>
......
......@@ -90,6 +90,8 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
preference = self.getDefaultSystemPreference()
if preference.getPreferenceState() != "global":
preference.enable()
if self.portal.portal_preferences.default_site_preference.getPreferenceState() != "global":
self.portal.portal_preferences.default_site_preference.enable()
self.tic()
def createTestEvent(self, target_language, source_relative_url, destination_relative_url):
......@@ -937,6 +939,37 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
subfield_field_override_date_day="31"
)
)
@changeSkin('Letter')
def test_pdfLetterThemeLogo(self):
"""
Test:
- Event as Letter
- export as pdf with Theme Logo
"""
self.portal.portal_preferences.default_site_preference.edit(
preferred_corporate_identity_template_default_logo_prefix='Template.Test.Theme.Logo.',
)
self.tic()
self.runPdfTestPattern(
"template_test_letter_input_003_en_html",
"template_test_letter_theme_logo",
"template_test_image_source_pdf",
**dict(
page_number=0,
test_method="WebPage_exportAsLetter",
format="pdf",
use_skin="Letter",
subfield_field_override_date_year="1999",
subfield_field_override_date_month="12",
subfield_field_override_date_day="31"
)
)
self.portal.portal_preferences.default_site_preference.edit(
preferred_corporate_identity_template_default_logo_prefix='',
)
self.tic()
@changeSkin('Letter')
def test_pdfLetterEventOverrideSenderRecipientOrganisation(self):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment