Added pending page
parent
e200ab3e82
commit
7a8356d2a6
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Facade for the entire application
|
* Facade for the entire application
|
||||||
*/
|
*/
|
||||||
|
@ -56,27 +55,39 @@ rectest.RecTest = Class( 'RecTest',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
'bindContinue': function( $element, callback )
|
'public goConfig': function()
|
||||||
{
|
{
|
||||||
var _self = this,
|
this._jQuery( 'body' )
|
||||||
$body = this._jQuery( 'body' );
|
.removeClass( 'pending' )
|
||||||
|
.removeClass( 'testing' )
|
||||||
|
;
|
||||||
|
|
||||||
$element.click( function()
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
'public goVerify': function()
|
||||||
|
{
|
||||||
|
this._jQuery( 'body' ).addClass( 'pending' );
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
'public run': function()
|
||||||
|
{
|
||||||
|
var _self = this,
|
||||||
|
$body = this._jQuery( 'body' ),
|
||||||
|
options = this._getOptions(),
|
||||||
|
testcase = this._cases[ options['case'] ].testCase();
|
||||||
|
|
||||||
|
$body.addClass( 'testing' ).removeClass( 'pending' );
|
||||||
|
|
||||||
|
this._runner.run( testcase, options, function( history )
|
||||||
{
|
{
|
||||||
var options = _self._getOptions(),
|
_self.goConfig();
|
||||||
testcase = _self._cases[ options['case'] ].testCase();
|
|
||||||
|
|
||||||
$body.addClass( 'testing' );
|
console.log( history );
|
||||||
|
console.log( 'done' );
|
||||||
_self._runner.run( testcase, options, function( history )
|
|
||||||
{
|
|
||||||
$body.removeClass( 'testing' );
|
|
||||||
|
|
||||||
console.log( history );
|
|
||||||
console.log( 'done' );
|
|
||||||
} );
|
|
||||||
|
|
||||||
callback && callback.call( _self.__inst );
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -7,8 +7,22 @@ window.rectest = { cases: {} };
|
||||||
|
|
||||||
$( document ).ready( function()
|
$( document ).ready( function()
|
||||||
{
|
{
|
||||||
rectest.RecTest( jQuery, rectest.cases ).init()
|
var app = rectest.RecTest( jQuery, rectest.cases ).init()
|
||||||
.listCases( $( '#case' ) )
|
.listCases( $( '#case' ) )
|
||||||
.bindContinue( $( '#continue' ) )
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
$( '#continue' ).click( function()
|
||||||
|
{
|
||||||
|
app.goVerify();
|
||||||
|
} );
|
||||||
|
|
||||||
|
$( '#reconfigure' ).click( function()
|
||||||
|
{
|
||||||
|
app.goConfig();
|
||||||
|
} );
|
||||||
|
|
||||||
|
$( '#run' ).click( function()
|
||||||
|
{
|
||||||
|
app.run();
|
||||||
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
28
style.css
28
style.css
|
@ -24,16 +24,6 @@ dd {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.testing .while-idle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.while-testing {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.testing .while-testing {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.topbox {
|
.topbox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -113,3 +103,21 @@ dd {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** after everything else to ensure it takes precidence **/
|
||||||
|
.pending .while-idle,
|
||||||
|
.testing .while-idle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.while-pending,
|
||||||
|
.while-testing {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.pending .while-pending,
|
||||||
|
.testing .while-testing {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.testing .until-testing {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
30
test.html
30
test.html
|
@ -5,7 +5,7 @@
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="style.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 class="while-idle">Recollection Test</h1>
|
<h1 class="until-testing">Recollection Test</h1>
|
||||||
<noscript>
|
<noscript>
|
||||||
<p>It appears that you have JavaScript disabled. Please consult your
|
<p>It appears that you have JavaScript disabled. Please consult your
|
||||||
browser's documentation to enable it before continuing. Don't worry - it
|
browser's documentation to enable it before continuing. Don't worry - it
|
||||||
|
@ -17,11 +17,6 @@
|
||||||
Please wait while we get our act together... (Loading)
|
Please wait while we get our act together... (Loading)
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- holds notices -->
|
|
||||||
<div class="hasjs topbox notice while-idle">
|
|
||||||
Please configure the test using the form below.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- status (while testing) -->
|
<!-- status (while testing) -->
|
||||||
<div class="statusbar-area while-testing">
|
<div class="statusbar-area while-testing">
|
||||||
<div class="statusbar">
|
<div class="statusbar">
|
||||||
|
@ -29,6 +24,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- configure -->
|
||||||
|
<div class="hasjs topbox notice while-idle">
|
||||||
|
Please configure the test using the form below.
|
||||||
|
</div>
|
||||||
<div class="hasjs config while-idle">
|
<div class="hasjs config while-idle">
|
||||||
<h2 class="title">Test Setup</h2>
|
<h2 class="title">Test Setup</h2>
|
||||||
|
|
||||||
|
@ -62,10 +62,26 @@
|
||||||
<dd><input type="number" id="delay" value="5.0" /> seconds</dd>
|
<dd><input type="number" id="delay" value="5.0" /> seconds</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<button id="continue" class="action">Continue</button>
|
<button id="continue" class="action">Continue »</button>
|
||||||
<br clear="both" />
|
<br clear="both" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- pending -->
|
||||||
|
<div class="topbox notice while-pending">
|
||||||
|
Test configured. Click "Begin Test" to continue, or "Reconfigure" to alter
|
||||||
|
the configuration.
|
||||||
|
</div>
|
||||||
|
<div class="while-pending">
|
||||||
|
<p>To share this configuration with others, please use the following URL:
|
||||||
|
(TODO)
|
||||||
|
</p>
|
||||||
|
<div>
|
||||||
|
<button id="reconfigure">« Reconfigure</button>
|
||||||
|
<button id="run">Begin Test »</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
|
<script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
|
||||||
<script type="text/javascript" src="scripts/ease.min.js"></script>
|
<script type="text/javascript" src="scripts/ease.min.js"></script>
|
||||||
<script type="text/javascript" src="scripts/main.js"></script>
|
<script type="text/javascript" src="scripts/main.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue