10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan GroveProvides a specialized log console widget that's pre-configured to display YUI
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan GroveTest output with no extra configuration.
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove <div id="log" class="yui3-skin-sam"></div>
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove YUI().use('test-console', function (Y) {
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove // ... set up your test cases here ...
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove // Render the console inside the #log div, then run the tests.
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove new Y.Test.Console().render('#log');
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove Y.Test.Runner.run();
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove@module test-console
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove@namespace Test
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove@class Console
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove@extends Console
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove@param {Object} [config] Config attributes.
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove @param {Object} [config.filters] Category filter configuration.
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove TestConsole.superclass.constructor.apply(this, arguments);
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan GroveY.namespace('Test').Console = Y.extend(TestConsole, Y.Console, {
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove // -- Protected Event Handlers ---------------------------------------------
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove _onEntry: function (e) {
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove && /\s(?:case|suite)\s|yuitests\d+|began/.test(msg.message)) {
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove '<div class="{entry_class} {cat_class} {src_class}">' +
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove '<div class="{entry_content_class}">{message}</div>' +
10b29d99683d0782b9f9ccbfc2a38afe7288c4d6Ryan Grove value: Y.UA.ie && Y.UA.ie < 9 ? '100%' : 'inherit'