From 211bb2bb811dd4f8c6b470d971ab04e0b1ee9dc4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 13 Dec 2008 23:40:36 +0000 Subject: [PATCH] Changing styles of test suite and adding icon for error messages. Moving code coverage css into test suite. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7920 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/lib/cake_reporter.php | 2 +- cake/tests/lib/header.php | 83 +++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 7 deletions(-) diff --git a/cake/tests/lib/cake_reporter.php b/cake/tests/lib/cake_reporter.php index 13aeaf9e9..395d4b9d4 100644 --- a/cake/tests/lib/cake_reporter.php +++ b/cake/tests/lib/cake_reporter.php @@ -144,7 +144,7 @@ class CakeHtmlReporter extends SimpleReporter { function paintError($message) { ob_start(); parent::paintError($message); - echo "
  • \n"; + echo "
  • \n"; echo "Error"; echo "
    " . $this->_htmlEntities($message) . "
    \n"; $breadcrumb = Set::filter($this->getTestList()); diff --git a/cake/tests/lib/header.php b/cake/tests/lib/header.php index d925030de..1fd6d9989 100644 --- a/cake/tests/lib/header.php +++ b/cake/tests/lib/header.php @@ -37,18 +37,89 @@ .test-menu {float:left; margin-right: 24px;} .test-results {float:left; width: 67%;} ul.tests {margin: 0; font-size:12px;} - ul.tests li {list-style: none; margin: 14px 0; padding-left: 20px;} - ul.tests li span { font-size:14px; text-transform: uppercase; display:block; color: black; font-weight: bold; } + ul.tests li { + list-style: none; + margin: 14px 0; + padding-left: 20px; + } + ul.tests li span { + font-size:14px; + text-transform: uppercase; + font-weight: bold; + } ul.tests li.pass span, ul.tests li.skipped span { display:inline;} ul.tests li.fail span { color: red; } ul.tests li.pass span { color: green; } ul.tests li.skipped span { color: navy; } - ul.tests li.fail {background: url(http://cakephp.org/img/test-fail-icon.png) top left no-repeat} - ul.tests li.pass {background: url(http://cakephp.org/img/test-pass-icon.png) top left no-repeat;} - ul.tests li.skipped {background: url(http://cakephp.org/img/test-skip-icon.png) top left no-repeat;} + ul.tests li.error span { color : #d15d00; } + + ul.tests li.pass, + ul.tests li.error, + ul.tests li.skipped, + ul.tests li.fail { + background: #fff2f2 url(http://cakephp.org/img/test-fail-icon.png) 5px 5px no-repeat; + border-top: 1px dotted red; + border-bottom: 1px dotted red; + padding:5px 10px 2px 25px; + } + ul.tests li.pass { + background-color: #f2fff2; + background-image: url(http://cakephp.org/img/test-pass-icon.png); + border-color:green; + } + ul.tests li.skipped { + background-color: #edf1ff; + background-image: url(http://cakephp.org/img/test-skip-icon.png); + border-color:navy; + } + ul.tests li.error { + background-color: #ffffe5; + background-image: url(http://cakephp.org/img/test-error-icon.png); + border-color: #DF6300; + } ul.tests li div { margin: 5px 0 8px 0; } ul.tests li div.msg { font-weight: bold; } - table caption { color:#fff;} + table caption { color:#fff; } + + div.code-coverage-results div.code-line { + padding-left:5px; + display:block; + margin-left:10px; + } + div.code-coverage-results div.uncovered span.content { background:#ecc; } + div.code-coverage-results div.covered span.content { background:#cec; } + div.code-coverage-results div.ignored span.content { color:#aaa; } + div.code-coverage-results span.line-num { + color:#666; + display:block; + float:left; + width:20px; + text-align:right; + margin-right:5px; + } + div.code-coverage-results span.line-num strong { color:#666; } + div.code-coverage-results div.start { + border:1px solid #aaa; + border-width:1px 1px 0px 1px; + margin-top:30px; + padding-top:5px; + } + div.code-coverage-results div.end { + border:1px solid #aaa; + border-width:0px 1px 1px 1px; + margin-bottom:30px; + padding-bottom:5px; + } + div.code-coverage-results div.realstart { margin-top:0px; } + div.code-coverage-results p.note { + color:#bbb; + padding:5px; + margin:5px 0 10px; + font-size:10px; + } + div.code-coverage-results span.result-bad { color: #a00; } + div.code-coverage-results span.result-ok { color: #fa0; } + div.code-coverage-results span.result-good { color: #0a0; }