siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
87 lines (72 loc) • 3.28 kB
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
*/
Class('Ariadne.ExtJSComponentQueryFinder.Identifier.Id', {
isa : Ariadne.QueryFinder.Identifier,
does : [
Ariadne.ExtJSComponentQueryFinder.Role.ExtJSComponentHelper,
Ariadne.ExtJSDomQueryFinder.Role.ExtJSHelper
],
methods : {
identify : function (target, root, maze) {
var id = target.id
if (id && !this.ignoreComponentId(id, target, maze.finder.Ext)) {
// the 1st encountered id will be assigned with weight -100000 in case of `enableMandatoryId`
// it should be guaranteed that this id will belong to lowest parent with id (currently this holds)
var weight = maze.encounteredMandatoryId || !this.finder.enableMandatoryId ? 1000 : -100000
maze.encounteredMandatoryId = true
return {
query : '#' + this.escapeCQSelector(id),
weight : weight,
isId : true
}
} else
return null
},
ignoreComponentId : function (id, comp, Ext) {
return this.componentHasAutoGeneratedId(comp, Ext)
}
}
});
// old ignore xtypes and classnames
// // Table view is always in panel which seems more 'relevant'
// // headerContainer is rarely useful (remember though, a grid column is also a headercontainer)
// ignoreCQSelectors : function () {
// return [
// 'viewport', // Adds no relevance, like matching BODY in a dom query
// 'tableview', // Always sits in a grid panel
// 'treeview', // Always sits in a tree panel
// 'gridview', // Always sits in a grid panel
// 'surface', // "belongs" to a chart but does not respond to CQ: https://www.sencha.com/forum/showthread.php?308911-Querying-chart-gt-surface-doesn-t-work&p=1128263#post1128263
// '>>headercontainer[isColumn=undefined]'
// ];
// },
//
// ignoreExtClassNamesRe : function () {
// return [
// 'Ext\\.dd\\.StatusProxy'
// ].join('|');
// }
</pre>
</body>
</html>