/**
* Contains AssertionClientDebugTab class
*
* Copyright (C) 2017 R-T Specialty, LLC.
*
* This file is part of the Liza Data Collection Framework
*
* Liza is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
var Class = require( 'easejs' ).Class,
ClientDebugTab = require( './ClientDebugTab' )
;
/**
* Monitors client-side assertions
*/
module.exports = Class( 'AssertionClientDebugTab' )
.implement( ClientDebugTab )
.extend(
{
/**
* Client being monitored
* @type {Client}
*/
'private _client': null,
/**
* Current log index
* @type {number}
*/
'private _logIndex': 0,
/**
* Table holding assertion log entries
* @type {jQuery}
*/
'private _$table': null,
/**
* Reference to paint timeout timer
* @type {?number}
*/
'private _paintTimeout': null,
/**
* Event stack
* @type {Array.}
*/
'private _stack': [],
/**
* Retrieve tab title
*
* @return {string} tab title
*/
'public getTitle': function()
{
return 'Assertions';
},
/**
* Retrieve tab content
*
* @param {Client} client active client being debugged
* @param {StagingBucket} bucket bucket to reference for data
*
* @return {jQuery} tab content
*/
'public getContent': function( client, bucket )
{
// cut down on argument list
this._client = client;
return this._createAssertionsContent();
},
/**
* Create tab content
*
* @return {jQuery} tab content
*/
'private _createAssertionsContent': function()
{
var _self = this;
this._hookAssertEvent();
this._hookTriggerEvent();
return $( '
' )
.append( $( '
' )
.text(
"Below is a list of all assertions performed (in real " +
"time)."
)
.append( $( '