1) <pdit:displayVersion>

PDIT WCS Tag Library loaded.
Version: [PDIT WCS Tag Library-0.19, Hudson build 414, built on 2017-02-27 11:30:01 UTC]

 


2) <pdit:getProperty>

(these tests rely upon the presence of a WCSProperty asset named "QA test asset")

2.1) Basic QA test assets

2.1.1) Fetch String

<pdit:getProperty key="QA test asset" attribute="string" output="out2_1_1" />

outStr = [This is an English QA asset ]

2.1.2) Fetch Integer

<pdit:getProperty key="QA test asset" attribute="int" output="out2_1_2" />

outStr = [1234567]

2.1.3) Fetch Boolean

<pdit:getProperty key="QA test asset" attribute="boolean" output="out2_1_3" />

outStr = [true]

2.1.4) Fetch List

<pdit:getProperty key="QA test asset" attribute="list" output="out2_1_4" />

outStr = [[fish, cat, dog, the dog said "woof", the cat said "meow", the sun is yellow, the sea is blue]]

2.1.5) Fetch Map

<pdit:getProperty key="QA test asset" attribute="map" output="out2_1_5" />

outStr = [{1=cat, 2=dog, 3=horse}]

2.1.6) Fetch JSON

<pdit:getProperty key="QA test asset" attribute="json" output="out2_1_6" />

outStr = [{"widget":{"debug":"on","window":{"title":"Sample Konfabulator Widget","name":"main_window","width":500,"height":500},"image":{"src":"Images\/Sun.png","name":"sun1","hOffset":250,"vOffset":250,"alignment":"center"},"text":{"data":"Click Here","size":36,"style":"bold","name":"text1","hOffset":250,"vOffset":100,"alignment":"center","onMouseUp":"sun1.opacity = (sun1.opacity \/ 100) * 90;"}}}]

2.1.7) Fetch Values for modified getProperty Logic

<pdit:getProperty cid="1356729141845" attribute="string" output="outCid" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" c="WCSProperty_C" attribute="json" output="outCidC" />

outStr = [{"widget":{"debug":"on","window":{"title":"Sample Konfabulator Widget","name":"main_window","width":500,"height":500},"image":{"src":"Images\/Sun.png","name":"sun1","hOffset":250,"vOffset":250,"alignment":"center"},"text":{"data":"Click Here","size":36,"style":"bold","name":"text1","hOffset":250,"vOffset":100,"alignment":"center","onMouseUp":"sun1.opacity = (sun1.opacity \/ 100) * 90;"}}}]

<pdit:getProperty cid="1356729141845" locale = "fr_FR" attribute="string" output="outCidLocale" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" siteid="fr" site="JCOM" attribute="string" output="outCidSiteIdSite" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" c="WCSProperty_C" siteid="fr" site="JCOM" attribute="string" output="outCidSiteIdSiteC" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" siteid="fr" attribute="string" output="outCidSiteIdCNoSite" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" c="WCSProperty" siteid="fr" site="JCOM" attribute="string" output="outInvalidC" />

outStr = [null]

<pdit:getProperty cid="1356729141845" c="WCSProperty_C" attribute="string" output="outKeyCidC" />

outStr = [This is an English QA asset ]

<pdit:getProperty cid="1356729141845" siteid ="fr" site="JCOM" attribute="map" output="out_article" />

outStr = [{1=cat, 2=dog, 3=horse}]

<pdit:getProperty key="QA test asset" attribute="string" output="outKey" />

outStr = [This is an English QA asset ]

<pdit:getProperty key="QA test asset" attribute="json" output="outKey_json" />

outStr = [{"widget":{"debug":"on","window":{"title":"Sample Konfabulator Widget","name":"main_window","width":500,"height":500},"image":{"src":"Images\/Sun.png","name":"sun1","hOffset":250,"vOffset":250,"alignment":"center"},"text":{"data":"Click Here","size":36,"style":"bold","name":"text1","hOffset":250,"vOffset":100,"alignment":"center","onMouseUp":"sun1.opacity = (sun1.opacity \/ 100) * 90;"}}}]

<pdit:getProperty key="QA test asset" locale = "fr_FR" attribute="string" output="outKeyLocale" />

outStr = [This is an English QA asset ]

<pdit:getProperty key="QA Sample Asset" siteid="fr" site="JCOM" attribute="string" output="outKeySiteIdSite" />

outStr = [This is an English QA asset ]

<pdit:getProperty key="QA Sample Asset" siteid="fr" attribute="string" output="outKeySiteIdNoSite" />

outStr = [This is an English QA asset ]

<pdit:getProperty attribute="string" output="out_nothing" />

outStr = [null]

2.2) Locale QA test assets

2.2.1) Fetch string value from specific locale

<pdit:getProperty key="QA test asset" attribute="string" output="out2_2_1" locale="fr_FR"/>

outStr = [This is an English QA asset ]

2.3) No data found tests

2.3.1) No Asset Matching Key

<pdit:getProperty key="this asset does not exist" attribute="string" output="out2_3_1" />

outStr = [null]

 


3) Localization Tags

(these tests rely upon the presence of a WCSProperty asset named "QA test asset" that has cid=1356729141845)

3.1) <pdit:getDimensionId>

3.1.1) en_US

<pdit:getDimensionId locale="en_US" output="out3_1_1"/>

outStr = [1352726462150]

3.1.2) ab_AB (should be null as the Dimension doesn't exists)

<pdit:getDimensionId locale="ab_AB" output="out3_1_2"/>

outStr = [1356730345911]

3.2) <pdit:filterAssetTranslations> (forced locale)

3.2.1) en_US

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" locale="en_US" output="out3_2_1"/>

outStr = [1405624216080]

3.2.2) es_ES (content does not exist, result should be "null")

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" siteid="en" locale="es_ES" output="out3_2_2"/>

outStr = [0]

3.2.3) fr_FR (content exist, result should not be "null")

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" siteid="en" locale="fr_FR" output="out3_2_3"/>

outStr = [1356729141845]

3.3) <pdit:filterAssetTranslations> (fallback using dimset)

3.3.1) siteid=us

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" siteid="us" output="out3_3_1"/>

outStr = [1405624216080]

3.3.2) siteid=uk (en_GB content does exist)

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" siteid="uk" output="out3_3_2"/>

outStr = [0]

3.3.3) siteid=fr (Should work)

<pdit:filterAssetTranslations c="WCSProperty_C" cid="1356729141845" siteid="fr" output="out3_3_3"/>

outStr = [1356729141845]

3.3.4) siteid=fr (no french content available for 1356726161251 asset, fallback to en)

<pdit:filterAssetTranslations c="Page" cid="1356726161251" siteid="fr" site="OCOM" output="out3_3_4"/>

outStr = [0]

3.4) <pdit:getDimensionSetForSite> (Dimensionset instance using dimset)

3.4.1) siteid="fr"

<pdit:getDimensionSetForSite siteid="fr" output="out3_4_1"/>

outStr = DimensionSet:1356727746877

3.4.2) siteid="ab" (There is no siteid name "ab", Hence it should result in Output = null)

<pdit:getDimensionSetForSite siteid="ab" output="out3_4_2"/>

outStr = null

3.5) <pdit:getHtmlLangCodeForLocale> (Conversion of locale html)

3.5.1) locale=fr_global siteid=fr site="OCOM" Site value is for getting output very specific to a Site(OCOM/Press/Events/OMC)

<pdit:getHtmlLangCodeForLocale locale="fr_global" site="OCOM" siteid="fr" output="out3_5_1"/>

outStr = fr-FR

3.5.2) locale=en_GB siteid=uk

<pdit:getHtmlLangCodeForLocale locale="en_GB" site="OCOM" siteid="uk" output="out3_5_2"/>

outStr = en-GB

3.5.3) locale=en_global siteid='be' siteid dynamicly changes according to page

<pdit:getHtmlLangCodeForLocale locale="en_global" site="OCOM" siteid='be' output="out3_5_3"/>

outStr = en-BE

3.5.4) locale=en_global siteid='be' without site param input(site value will become 'default')

<pdit:getHtmlLangCodeForLocale locale="en_global" siteid='be' output="out3_5_4"/>

outStr = en-BE

3.5.5) locale=en_regional_apac siteid='be' without site param input(site value will become 'default')

<pdit:getHtmlLangCodeForLocale locale="en_regional_apac" siteid='be' output="out3_5_5"/>

outStr = en-BE

3.5.6) locale=en_regional_apac siteid="apac" without site param input(site value will become 'default') and if regional siteid is passed the output will be just "en"

<pdit:getHtmlLangCodeForLocale locale="en_regional_apac" siteid="apac" output="out3_5_6"/>

outStr = en

3.5.7) locale= empty siteid='be' without site param input(site value will become 'default') and if regional siteid is passed the output will be just "en"

<pdit:getHtmlLangCodeForLocale locale="" siteid='be' output="out3_5_7"/>

outStr = null

3.5.8) locale="" siteid="" Both mandatory input values are empty

<pdit:getHtmlLangCodeForLocale locale="" siteid="" output="out3_5_8"/>

outStr = null

3.5.9) locale="null" siteid="null" Both mandatory input values are null

<pdit:getHtmlLangCodeForLocale locale="" siteid="" output="out3_5_9"/>

outStr = null

3.6) <pdit:getPreferredDimensionLocaleForSite> (Getting the preferred locale from pdit table)

<pdit:getPreferredDimensionLocaleForSite siteid="fr" output="out3_6_1"/>

outStr = fr_FR

3.7) <pdit:getTemplateUrl> (gets Template url according to the siteid input)

3.7.1) siteid=be (Input is got from url using ics.GetVar("siteid").. depends on the url, output defers)

<pdit:getTemplateUrl c='Page' cid='2000005089478' siteid='be' output="out3_7_1"/>

outStr = /be/go.java/sajeevtesgojava.html

3.7.2) siteid="jp"(Japan site doesn't have url so falls back to masterurl(_qa/pdit-taglib/test.html) but with jp siteid in the url so that content shown will be in japanese')

<pdit:getTemplateUrl c='Page' cid="1415276434277" siteid="jp" output="out3_7_2"/>

outStr =

3.7.3) siteid="jp"('Example of using all attributes of the tag')

<pdit:getTemplateUrl c='Page' cid="1415276434277" siteid="jp" site="OCOM" slotname="new" tid='1356742160828' ttype="Template" output="out3_7_3"/>

outStr =

3.7.4) siteid="jp"('Example of using on different assettype's : Current type is : "oPressRelease_C" ')

<pdit:getTemplateUrl c="oPressRelease_C" cid="1356730986314" siteid="jp" site="OCOM" slotname="new" tid='1356742160828' ttype="Template" output="out3_7_4"/>

outStr = /corporate/pressrelease/1-970.html

3.7.5) siteid='be'('Example of using on different assettype's loading master asset(en_US) url as there is no url in 1419572008296(fr_FR) asset : Current type is : "oPressRelease_C" ')

<pdit:getTemplateUrl c="oPressRelease_C" cid="1419572008296" siteid='be' site="OCOM" slotname="new" tid='1356742160828' ttype="Template" output="out3_7_5"/>

outStr = null

3.7.6) siteid='be'('Example for no url's present in both Current and Master asset': Output should be null or empty)

<pdit:getTemplateUrl c='Page' cid="1356740138684" siteid='be' site="OCOM" slotname="new" tid='1356742160828' ttype="Template" output="out3_7_6"/>

outStr =

3.8) <pdit:loghtmlcomment> (gets Debug message and can be seen in source code)

3.8.1) message = This is my message (gets Debug message and can be seen in source code if "htmlloglevel=info" argument is passed through url)

<pdit:loghtmlcomment msg="This is my message" severity="info" />

Unpacking the packed urls argument:

ics.GetVar of packed = null

ics.GetVar of i = null

ics.GetVar of r = null

ics.GetVar of g = null

ics.GetVar of cs = null

ics.GetVar of l = null

ics.GetVar of hijax = null

ics.GetVar of adid = null

ics.GetVar of adgroupid = null

ics.GetVar of htmlloglevel = null

 


Page generated at: 2017-12-17T23:31:29.595+0000