UNPKG

siesta-lite

Version:

Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers

85 lines (66 loc) 2.54 kB
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The source code</title> <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="../resources/prettify/prettify.js"></script> <style type="text/css"> .highlight { display: block; background-color: #ddd; } </style> <script type="text/javascript"> function highlight() { document.getElementById(location.hash.replace(/#/, "")).className = "highlight"; } </script> </head> <body onload="prettyPrint(); highlight();"> <pre class="prettyprint lang-js">/* Siesta 5.6.1 Copyright(c) 2009-2022 Bryntum AB https://bryntum.com/contact https://bryntum.com/products/siesta/license */ Role(&#39;Ariadne.ExtJSComponentQueryFinder.Role.ExtJSComponentHelper&#39;, { does : Ariadne.DomQueryFinder.Role.DomHelper, has : { }, methods : { getComponentXType : function (cmp) { var xtype = this.getComponentOwnXType(cmp) if (xtype) return xtype xtype = cmp.getXTypes &amp;&amp; cmp.getXTypes() if (!xtype) return null xtype = xtype.split(&#39;/&#39;) return xtype[ xtype.length - 1 ] }, // might be not available if component does not define the &quot;alias&quot; property in &quot;widget&quot; namespace getComponentOwnXType : function (cmp) { return (cmp.getXType &amp;&amp; cmp.getXType()) || cmp.xtype || cmp.xtypes[ 0 ] }, escapeCQSelector : function (selector) { return this.escapeDomSelector(selector) }, // Ext4 breaks when xtype contains dot, even if it is properly escaped // however [xtype=value\.with\.dots] is supported // this is why we need this method getExt4ProofXtype : function (cmp, Ext) { var xtype = this.getComponentXType(cmp) var escaped = this.escapeCQSelector(xtype) var extVersion = Ext.getVersion(&#39;ext&#39;) if (extVersion &amp;&amp; extVersion.major == 4 &amp;&amp; xtype != escaped) return { query : &#39;[xtype=&#39; + escaped + &#39;]&#39;, leading : false } else return { query : escaped, leading : true } } } }); </pre> </body> </html>