Example #1
0
require_once "caseSource.php";
$c = new Kiss($_GET['case']);
$title = $c->name;
$cov = array_key_exists('cov', $_GET);
?>
<html>
<head>
    <title>Jasmine Spec Runner</title>

    <link rel="shortcut icon" type="image/png" href="lib/jasmine-1.3.0/jasmine_favicon.png">
    <link rel="stylesheet" type="text/css" href="lib/jasmine-1.3.0/jasmine.css">
    <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine.js"></script>
    <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine-html.js"></script>
    <script type="text/javascript" src="js/ext_jasmine.js"></script>
    <?php 
$c->print_js($cov);
?>

</head>
<script type="text/javascript">
    //todo
    //     if (parent && parent.brtest) {
    //            parent.$(parent.brtest).trigger('done', [ new Date().getTime(), {
    //                failed : args[0],
    //                passed : args[1],
    //                detail:args[2]
    //            }, window._$jscoverage || null ]);
    //        }
    (function() {
        var jasmineEnv = jasmine.getEnv();
        jasmineEnv.updateInterval = 1000;
Example #2
0
File: run.php Project: eou/Magic
    return;
}
$title = $c->name;
$cov = array_key_exists('cov', $_GET);
$release = array_key_exists('release', $_GET);
$dep = array_key_exists('dep', $_GET) ? $_GET['dep'] : false;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
print "run case {$title}";
?>
</title>
<?php 
$c->print_js($cov, $release, $dep);
?>
</head>
<body>
<h1 id="qunit-header"><span><a href="<?php 
echo 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["REQUEST_URI"];
?>
" target="_blank">新窗口打开</a></span><?php 
print $c->name;
?>
</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
</body>
</html>
Example #3
0
    public $name;
    public $srcPath;
    public $testPath;
    function __construct($name = '')
    {
        $this->projroot = Config::$projroot;
        $this->srcPath = Config::$projroot . Config::$src_PATH;
        $this->testPath = Config::$projroot . Config::$test_PATH;
        $this->name = $name;
    }
    public function print_js()
    {
        /* load case source*/
        $importurl = "./import.php";
        print "<script type='text/javascript' src='" . $importurl . "' ></script>\n";
        /* load case and case dependents*/
        $ps = explode('/', $this->name);
        //读取helper
        foreach (Config::$helperFiles as $f) {
            array_pop($ps);
            array_push($ps, $f);
            if (file_exists($this->testPath . implode('/', $ps))) {
                print '<script type="text/javascript" src="' . $this->testPath . implode('/', $ps) . '"></script>' . "\n";
            }
        }
        print '<script type="text/javascript" src="' . $this->testPath . $this->name . '.js"></script>' . "\n";
    }
}
$a = new Kiss();
$a->print_js();
Example #4
0
}
require_once "case.class.php";
$c = new Kiss('../../../', $_GET['case']);
$title = $c->name;
$cov = array_key_exists('cov', $_GET);
$release = array_key_exists('release', $_GET);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
print "run case {$title}";
?>
</title>
<?php 
$c->print_js($cov, $release);
?>
<link rel="stylesheet" type="text/css" href="../qa/Public/tools/CodeMirror-2.24/lib/codemirror.css">
<link rel="stylesheet" type="text/css" href="../qa/Public/tools/CodeMirror-2.24/theme/blackboard.css">

<script type="text/javascript" src="../qa/Public/tools/CodeMirror-2.24/lib/codemirror.js"></script>
<script src="../qa/Public/tools/CodeMirror-2.24/mode/javascript/javascript.js"></script>
</head>
<body>
<h1 id="qunit-header"><span><a onclick="toggleSource()">切换显示用例源码</a></span><?php 
print $c->name;
?>
</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<div id="source" class="wrap-testing-src"></div>
Example #5
0
}
$title = $c->name;
$cov = array_key_exists('cov', $_GET);
$release = array_key_exists('release', $_GET);
$compatible = array_key_exists('compatible', $_GET);
$download = array_key_exists('download', $_GET);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
print "run case {$title}";
?>
</title>
<?php 
$c->print_js($cov, $release, $compatible, $download);
?>

</head>
<body>
<h1 id="qunit-header"><span><a href="<?php 
echo 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["REQUEST_URI"];
?>
" target="_blank">新窗口打开</a></span><?php 
print $c->name;
?>
</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
Example #6
0
require_once "caseSource.php";
$c = new Kiss($_GET['case']);
$title = $c->name;
//$cov = array_key_exists( 'cov' , $_GET );
?>
<html>
<head>
    <title>Jasmine Spec Runner</title>

    <link rel="shortcut icon" type="image/png" href="lib/jasmine-1.3.0/jasmine_favicon.png">
    <link rel="stylesheet" type="text/css" href="lib/jasmine-1.3.0/jasmine.css">
    <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine.js"></script>
    <script type="text/javascript" src="lib/jasmine-1.3.0/jasmine-html.js"></script>

    <?php 
$c->print_js();
?>

</head>
<script type="text/javascript">
    (function() {
        var jasmineEnv = jasmine.getEnv();
        jasmineEnv.updateInterval = 1000;

        var htmlReporter = new jasmine.HtmlReporter();

        jasmineEnv.addReporter(htmlReporter);

        jasmineEnv.specFilter = function(spec) {
            return htmlReporter.specFilter(spec);
        };