diff --git a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.py b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.py new file mode 100644 index 0000000000000000000000000000000000000000..d55ead8c0e426cdfc29c7b100548b65e25116d59 --- /dev/null +++ b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.py @@ -0,0 +1,12 @@ +return { + 'en': 'en_US', + 'de': 'de_DE', + 'fa': 'fa_IR', + 'fr': 'fr_FR', + 'ja': 'ja_JP', + 'ko': 'ko_KR', + 'pl': 'pl_PL', + 'pt': 'pt_BR', + 'ru': 'ru_RU', + 'zh': 'zh_CN' +} diff --git a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.xml b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.xml new file mode 100644 index 0000000000000000000000000000000000000000..d1673d7c4da92873549116bd581f6faae7362688 --- /dev/null +++ b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/WebSite_getOgLocaleDict.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>**kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>WebSite_getOgLocaleDict</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt index debc40bbbbe2d3389b3990d0d5923e7a337b19d5..ac4dc302d14e890222be4a7a8472ad73cb2d71a9 100644 --- a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt +++ b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/dialog_main.zpt @@ -15,6 +15,14 @@ no_style_gadget_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_style_gadget_url'); no_style_css_url python: relative_url_prefix + 'jsstyle.css'; favicon_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_favicon_url'); + site_name python: web_site.getTranslatedTitle(); + document_title python: here.getTitle(); + site_url python: web_site.absolute_url(); + description python: here.getDescription(); + preview_image_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_favicon_url'); + keyword_list python: web_section.getSubjectList(); + og_locale_dict python: web_site.WebSite_getOgLocaleDict(); + current_language python: web_site.getPortalObject().Localizer.get_selected_language(); global_definitions_macros here/global_definitions/macros;"> <tal:block metal:use-macro="global_definitions_macros/header_definitions" /> <html> @@ -25,6 +33,33 @@ <tal:block tal:condition="favicon_url"> <link rel="icon" tal:attributes="href favicon_url" /> </tal:block> + <tal:block tal:condition="keyword_list"> + <meta name="keywords" tal:attributes="content python: ','.join(keyword_list)"> + </tal:block> + <meta property="og:type" content="website" /> + <tal:block tal:condition="site_url"> + <meta name="url" tal:attributes="content site_url"> + <meta property="og:url" tal:attributes="content site_url"> + <meta name="twitter:url" tal:attributes="content site_url"> + </tal:block> + <tal:block tal:condition="document_title"> + <meta property="og:title" tal:attributes="content document_title"> + <meta name="twitter:title" tal:attributes="content document_title"> + </tal:block> + <tal:block tal:condition="preview_image_url"> + <meta property="og:image" tal:attributes="content preview_image_url"> + <meta name="twitter:image" tal:attributes="content preview_image_url"> + </tal:block> + <tal:block tal:condition="site_name"> + <meta name="application-name" tal:attributes="content site_name" > + <meta property="og:site_name" tal:attributes="content site_name"> + </tal:block> + <tal:block tal:condition="description"> + <meta name="description" tal:attributes="content description"> + <meta property="og:description" tal:attributes="content description"> + <meta name="twitter:description" tal:attributes="content description"> + </tal:block> + <meta property="og:locale" tal:attributes="content python: og_locale_dict[current_language]"> <tal:block tal:condition="python: no_style_gadget_url == ''"> <link rel="stylesheet" tal:attributes="href no_style_css_url"> </tal:block> diff --git a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt index a47687f1db9b1cd599caf15cc650d3794ef788de..0dae6db17666d9f562831e03e43149008c600374 100644 --- a/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt +++ b/bt5/erp5_web_js_style/SkinTemplateItem/portal_skins/erp5_web_js_style_ui/view_main.zpt @@ -14,6 +14,14 @@ no_style_gadget_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_style_gadget_url'); no_style_css_url python: relative_url_prefix + 'jsstyle.css'; favicon_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_favicon_url'); + site_name python: web_site.getTranslatedTitle(); + document_title python: here.getTitle(); + site_url python: web_site.absolute_url(); + description python: here.getDescription(); + preview_image_url python: web_section.WebSection_generateLayoutPropertyUrl('configuration_favicon_url'); + keyword_list python: web_section.getSubjectList(); + og_locale_dict python: web_site.WebSite_getOgLocaleDict(); + current_language python: web_site.getPortalObject().Localizer.get_selected_language(); global_definitions_macros here/global_definitions/macros;"> <tal:block metal:use-macro="global_definitions_macros/header_definitions" /> <html> @@ -24,6 +32,33 @@ <tal:block tal:condition="favicon_url"> <link rel="icon" tal:attributes="href favicon_url" /> </tal:block> + <tal:block tal:condition="keyword_list"> + <meta name="keywords" tal:attributes="content python: ','.join(keyword_list)"> + </tal:block> + <meta property="og:type" content="website" /> + <tal:block tal:condition="site_url"> + <meta name="url" tal:attributes="content site_url"> + <meta property="og:url" tal:attributes="content site_url"> + <meta name="twitter:url" tal:attributes="content site_url"> + </tal:block> + <tal:block tal:condition="document_title"> + <meta property="og:title" tal:attributes="content document_title"> + <meta name="twitter:title" tal:attributes="content document_title"> + </tal:block> + <tal:block tal:condition="preview_image_url"> + <meta property="og:image" tal:attributes="content preview_image_url"> + <meta name="twitter:image" tal:attributes="content preview_image_url"> + </tal:block> + <tal:block tal:condition="site_name"> + <meta name="application-name" tal:attributes="content site_name" > + <meta property="og:site_name" tal:attributes="content site_name"> + </tal:block> + <tal:block tal:condition="description"> + <meta name="description" tal:attributes="content description"> + <meta property="og:description" tal:attributes="content description"> + <meta name="twitter:description" tal:attributes="content description"> + </tal:block> + <meta property="og:locale" tal:attributes="content python: og_locale_dict[current_language]"> <tal:block tal:condition="python: no_style_gadget_url == ''"> <link rel="stylesheet" tal:attributes="href no_style_css_url"> </tal:block> diff --git a/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.xml b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.xml new file mode 100644 index 0000000000000000000000000000000000000000..5ef69258c7c2e7e57684f2127dfd550749527ca3 --- /dev/null +++ b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>testJsStyleWebSiteFormWithMetaTag</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt new file mode 100644 index 0000000000000000000000000000000000000000..bae9c14208aa6040ab4d22ee4da5269e51127755 --- /dev/null +++ b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteFormWithMetaTag.zpt @@ -0,0 +1,307 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test JS Style Demo Style</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test JS Style Demo Style</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/ERP5Site_createWebJSStyleZuiteTestData?configuration=meta_tag_form</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Web Site created.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + + +<!-- Initialize --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//input[@value='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='keywords' and @content='keyword1,keyword2']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:locale' and @content='en_US']</td> + <td></td> +</tr> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/fr</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//input[@value='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:description' and @content='this is a form description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='keywords' and @content='keyword1,keyword2']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:locale' and @content='fr_FR']</td> + <td></td> +</tr> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/erp5_web_js_style_test_section_1</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//h1[text()='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag Form']</td> + <td></td> +</tr> + + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.xml b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.xml new file mode 100644 index 0000000000000000000000000000000000000000..659502aa9c05ce1e42c23896a4a1ade470953fd6 --- /dev/null +++ b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.xml @@ -0,0 +1,58 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/html</string> </value> + </item> + <item> + <key> <string>expand</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>testJsStyleWebSiteWithMetaTag</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt new file mode 100644 index 0000000000000000000000000000000000000000..42823ec23212a3b04fdf8dd9afade9c8000d267d --- /dev/null +++ b/bt5/erp5_web_js_style_test/PathTemplateItem/portal_tests/js_style_zuite/testJsStyleWebSiteWithMetaTag.zpt @@ -0,0 +1,307 @@ +<html xmlns:tal="http://xml.zope.org/namespaces/tal" + xmlns:metal="http://xml.zope.org/namespaces/metal"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>Test JS Style Demo Style</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Test JS Style Demo Style</td></tr> +</thead><tbody> +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> + +<tr> + <td>open</td> + <td>${base_url}/ERP5Site_createWebJSStyleZuiteTestData?configuration=meta_tag</td> + <td></td> +</tr> +<tr> + <td>assertTextPresent</td> + <td>Web Site created.</td> + <td></td> +</tr> + +<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> + + +<!-- Initialize --> +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//span[text()='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='keywords' and @content='keyword1,keyword2']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:locale' and @content='en_US']</td> + <td></td> +</tr> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/fr</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//span[text()='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site/fr']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:description' and @content='this is a description']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='keywords' and @content='keyword1,keyword2']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:locale' and @content='fr_FR']</td> + <td></td> +</tr> + +<tr> + <td>open</td> + <td>${base_url}/web_site_module/erp5_web_js_style_test_site/erp5_web_js_style_test_section_1</td> + <td></td> +</tr> + +<tr> + <td>waitForElementPresent</td> + <td>//h1[text()='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:url' and @content='${base_url}/web_site_module/erp5_web_js_style_test_site']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:title' and @content='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:title' and @content='Demo Section 1']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:image' and @content='favicon.ico']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@name='twitter:image' and @content='favicon.ico']</td> + <td></td> +</tr> + + <tr> + <td>verifyElementPresent</td> + <td>//meta[@name='application-name' and @content='Meta Tag']</td> + <td></td> +</tr> + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:site_name' and @content='Meta Tag']</td> + <td></td> +</tr> + + +<tr> + <td>verifyElementPresent</td> + <td>//meta[@property='og:type' and @content='website']</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> \ No newline at end of file diff --git a/bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py b/bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py index f7390478683d9bcafa998da9c5cfed6077d013b8..dd58fcf7d16728e36080b65de2b7e46bbcd7939b 100644 --- a/bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py +++ b/bt5/erp5_web_js_style_test/SkinTemplateItem/portal_skins/erp5_web_js_style_test/ERP5Site_createWebJSStyleZuiteTestData.py @@ -148,6 +148,21 @@ configuration_dict = { 'custom_render_method_id': 'WebSite_viewJSStyleTestDialog', 'site_map_section_parent': True }, + 'meta_tag': { + 'title': 'Meta Tag', + 'description': 'this is a description', + 'subject_list': ['keyword1', 'keyword2'], + 'configuration_favicon_url': 'favicon.ico', + 'site_map_section_parent': True + }, + 'meta_tag_form':{ + 'title': 'Meta Tag Form', + 'description': 'this is a form description', + 'subject_list': ['keyword1', 'keyword2'], + 'configuration_favicon_url': 'favicon.ico', + 'custom_render_method_id': 'WebSite_viewJSStyleTestDialog', + 'site_map_section_parent': True + }, 'language': { 'configuration_style_gadget_url': "jsstyle_demo.html", 'available_language_list': ['en', 'fr', 'zh'],