suite-ui.tpl.php 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php if (isset($_GET['noajax'])) { include(dirname(__FILE__) . '/suite-ui-noajax.tpl.php'); exit(0); } ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <title><?php echo $suiteName; ?></title>
  7. <link rel="stylesheet" type="text/css" href="templates/sweety/css/main.css" />
  8. <script type="text/javascript">
  9. var sweetyTestCases = {};
  10. <?php foreach ($testCases as $name): ?>
  11. sweetyTestCases.<?php echo $name; ?> = true;
  12. <?php endforeach; ?>
  13. </script>
  14. <!-- XPath legacy is completely inert in DOM 3 XPath enabled browsers -->
  15. <script type="text/javascript" src="xpath-legacy.js"></script>
  16. <script type="text/javascript" src="sweety.js"></script>
  17. <script type="text/javascript" src="templates/sweety/js/sweety-template.js"></script>
  18. </head>
  19. <body>
  20. <div id="sweety-page">
  21. <div id="sweety-testlist">
  22. <div class="sweety-pad">
  23. <form action="?noajax=1" method="post" onsubmit="return false;">
  24. <div>
  25. <input type="text" class="sweety-text" id="sweety-filter"
  26. onkeyup="sweetyFilter.search();" />
  27. <input type="submit" id="sweety-run-button" value="Run Tests"
  28. onclick="sweetyUI.initialize(); sweetyRunner.runAll();" />
  29. </div>
  30. <!-- Dynamically generated list of tests goes here -->
  31. <div id="sweety-testlist-container">
  32. <?php $currentPackage = null; foreach ($testCases as $testCase): ?>
  33. <?php if ($currentPackage != $package = preg_replace('/_?[^_]+$/', '', $testCase)): ?>
  34. <?php $currentPackage = $package; ?>
  35. <div id="sweety-package-<?php echo $package; ?>"
  36. onmouseover="this.style.cursor='pointer';"
  37. onclick="sweetyUI.initialize(); sweetyRunner.runAll('<?php echo $package; ?>');"
  38. class="sweety-package-header sweety-pkg-idle">
  39. <span class="sweety-pkg-count" id="sweety-pkg-count-<?php echo $package; ?>"></span>
  40. <img id="sweety-pkg-img-<?php echo $package; ?>" src="templates/sweety/images/darr.gif"
  41. alt="Toggle Display" title="Toggle Display"
  42. onmouseover="this.style.cursor='default';"
  43. onclick="sweetyUI.togglePackage('<?php echo $package; ?>'); event.cancelBubble=true;" />
  44. <?php echo preg_replace('/^.*_/', '', $package); ?> Tests
  45. <span class="sweety-test-package">
  46. <?php echo preg_replace('/_?[^_]+$/', '', $package); ?>
  47. </span>
  48. </div>
  49. <?php endif; ?>
  50. <div id="<?php echo $testCase; ?>" class="sweety-test sweety-idle"
  51. onmouseover="this.style.cursor='pointer';"
  52. onclick="sweetyUI.initialize(); sweetyRunner.runTestCase(this.id);">
  53. <div class="sweety-testcase">
  54. <a href="?test=<?php echo $testCase; ?>&amp;format=xml" onclick="event.cancelBubble=true;"><img
  55. src="templates/sweety/images/xmlicon.gif" alt="As XML" title="As XML" /></a>
  56. <a href="?test=<?php echo $testCase; ?>&amp;format=html" onclick="event.cancelBubble=true;"><img
  57. src="templates/sweety/images/htmlicon.gif" alt="As HTML" title="As HTML" /></a>
  58. <a href="?runtests=<?php echo $testCase; ?>&amp;noajax=1" onclick="return false;"><img
  59. src="templates/sweety/images/runicon.gif" alt="Run" title="Run this test" /></a>
  60. <input id="sweety-field-<?php echo $testCase; ?>" class="sweety-check"
  61. type="checkbox" name="runtests[]" value="<?php echo $testCase; ?>"
  62. <?php if (array_key_exists($testCase, $runTests)): ?>
  63. checked="checked"
  64. <?php endif; ?> />
  65. <label for="sweety-field-<?php echo $testCase; ?>"
  66. onmouseover="this.style.cursor='pointer';" onclick="return false;">
  67. <?php echo preg_replace('/^.*_/', '', $testCase); ?>
  68. </label>
  69. <span class="sweety-test-package">
  70. <?php echo $package; ?>
  71. </span>
  72. </div>
  73. </div>
  74. <?php endforeach; ?>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. <div id="sweety-output">
  80. <div class="sweety-pad">
  81. <div id="sweety-communication">
  82. <img src="templates/sweety/images/network.gif" alt="Communicating" />
  83. </div>
  84. <h1><?php echo $suiteName; ?></h1>
  85. <div id="sweety-results" class="sweety-idle">
  86. <span id="sweety-num-run">0</span>/<span id="sweety-num-cases">0</span>
  87. test cases complete:
  88. <strong id="sweety-num-passes">0</strong> passes,
  89. <strong id="sweety-num-fails">0</strong> fails and
  90. <strong id="sweety-num-exceptions">0</strong> exceptions.
  91. </div>
  92. <div id="sweety-smoke-images">
  93. </div>
  94. <div id="sweety-messages">
  95. </div>
  96. </div>
  97. </div>
  98. <div class="sweety-clear"></div>
  99. </div>
  100. </body>
  101. </html>