suite-ui-noajax.tpl.php 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title><?php echo $suiteName; ?> - No AJAX</title>
  6. <link rel="stylesheet" type="text/css" href="templates/sweety/css/main.css" />
  7. </head>
  8. <body>
  9. <div id="sweety-page">
  10. <div id="sweety-testlist">
  11. <div class="sweety-pad">
  12. <form action="?noajax=1" method="post">
  13. <div>
  14. <input type="text" class="sweety-text" id="sweety-filter" />
  15. <input type="submit" id="sweety-run-button" value="Run Tests" />
  16. </div>
  17. <!-- Dynamically generated list of tests goes here -->
  18. <div id="sweety-testlist-container">
  19. <?php $currentPackage = null; foreach ($testCases as $testCase): ?>
  20. <?php if ($currentPackage != $package = preg_replace('/_?[^_]+$/', '', $testCase)): ?>
  21. <?php $currentPackage = $package; ?>
  22. <div id="sweety-package-<?php echo $package; ?>"
  23. class="sweety-package-header sweety-pkg-idle">
  24. <img id="sweety-pkg-img-<?php echo $package; ?>" src="templates/sweety/images/darr.gif"
  25. alt="Not available" title="Not available" />
  26. <?php echo preg_replace('/^.*_/', '', $package); ?> Tests
  27. <span class="sweety-test-package">
  28. <?php echo preg_replace('/_?[^_]+$/', '', $package); ?>
  29. </span>
  30. </div>
  31. <?php endif; ?>
  32. <div id="<?php echo $testCase; ?>" class="sweety-test sweety-<?php
  33. if (array_key_exists($testCase, $runTests)) echo $runTests[$testCase]; else echo 'idle';
  34. ?>">
  35. <div class="sweety-testcase">
  36. <a href="?test=<?php echo $testCase; ?>&amp;format=xml"><img
  37. src="templates/sweety/images/xmlicon.gif" alt="As XML" title="As XML" /></a>
  38. <a href="?test=<?php echo $testCase; ?>&amp;format=html"><img
  39. src="templates/sweety/images/htmlicon.gif" alt="As HTML" title="As HTML" /></a>
  40. <a href="?runtests=<?php echo $testCase; ?>&amp;noajax=1"><img
  41. src="templates/sweety/images/runicon.gif" alt="Run" title="Run this test" /></a>
  42. <input id="sweety-field-<?php echo $testCase; ?>" class="sweety-check"
  43. type="checkbox" name="runtests[]" value="<?php echo $testCase; ?>"
  44. <?php if (array_key_exists($testCase, $runTests)): ?>
  45. checked="checked"
  46. <?php endif; ?> />
  47. <label for="sweety-field-<?php echo $testCase; ?>">
  48. <?php echo preg_replace('/^.*_/', '', $testCase); ?>
  49. </label>
  50. <span class="sweety-test-package">
  51. <?php echo $package; ?>
  52. </span>
  53. </div>
  54. </div>
  55. <?php endforeach; ?>
  56. </div>
  57. </form>
  58. </div>
  59. </div>
  60. <div id="sweety-output">
  61. <div class="sweety-pad">
  62. <h1><?php echo $suiteName; ?> - No AJAX</h1>
  63. <div id="sweety-results" class="sweety-<?php echo $result; ?>">
  64. <span id="sweety-num-run"><?php echo $runCount; ?></span>/<span id="sweety-num-cases"><?php echo $caseCount; ?></span>
  65. test cases complete:
  66. <strong id="sweety-num-passes"><?php echo $passCount; ?></strong> passes,
  67. <strong id="sweety-num-fails"><?php echo $failCount; ?></strong> fails and
  68. <strong id="sweety-num-exceptions"><?php echo $exceptionCount; ?></strong> exceptions.
  69. </div>
  70. <div id="sweety-messages">
  71. <?php foreach ($messages as $message)
  72. {
  73. switch ($message['type'])
  74. {
  75. case 'pass':
  76. break;
  77. case 'skip': ?>
  78. <div class="sweety-message">
  79. <span class="sweety-skip-text">Skip</span>:
  80. <strong><?php echo $message['text']; ?></strong>
  81. <div class="sweety-test-path">
  82. in <?php echo $message['path']; ?>
  83. </div>
  84. </div>
  85. <?php
  86. break;
  87. case 'fail': ?>
  88. <div class="sweety-message">
  89. <span class="sweety-fail-text">Fail</span>: <?php echo $message['text']; ?>
  90. <div class="sweety-test-path">
  91. in <?php echo $message['path']; ?>
  92. </div>
  93. </div>
  94. <?php
  95. break;
  96. case 'exception': ?>
  97. <div class="sweety-message">
  98. <span class="sweety-fail-text">Exception</span>:
  99. <strong><?php echo $message['text']; ?></strong>
  100. <div class="sweety-test-path">
  101. in <?php echo $message['path']; ?>
  102. </div>
  103. </div>
  104. <?php
  105. break;
  106. case 'output': ?>
  107. <pre class="sweety-raw-output"><?php echo $message['text']; ?></pre>
  108. <?php
  109. break;
  110. case 'internal': ?>
  111. <div class="sweety-internal-message sweety-running">
  112. <?php echo $message['text']; ?>
  113. </div>
  114. <?php
  115. break;
  116. }
  117. } ?>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="sweety-clear"></div>
  122. </div>
  123. </body>
  124. </html>