summaryrefslogtreecommitdiffstats
path: root/test/coverage/views/index.erb
blob: 080e5f8cdd3e725950b777b66aa4ff5f5e97ad0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Redmine code coverage</title>
<style>
html {overflow-y:scroll;}
body {font-family:"Lucida Grande","Lucida Sans",Verdana,Helvetica,Arial,sans-serif; font-size:80%;}
h1 {color:#777; margin-bottom:0.2em;}
h2 {color:#aaa;margin-top:1em;font-size:18px;}
table {width:100%; border-collapse:collapse;}
th, td {border:1px solid #e2e2e2;}
td {text-align:right; white-space: nowrap; font-family:"Bitstream Vera Sans Mono","Monaco","Courier New",monospace;}
td.filename {text-align:left; white-space: normal; font-family:"Lucida Grande","Lucida Sans",Verdana,Helvetica,Arial,sans-serif;}
th {background:#e2e2e2;}
table.file_list tr:hover { background-color:#ffffdd; }
#generation {color:#777; font-size:90%;}
a, a:link, a:visited {color:#169; text-decoration:none;}
a:hover, a:active {color:#c61a1a; text-decoration:underline;}
div.percent {height:1em; empty-cells:show; padding:0px; border-collapse:collapse; width:100px !important; float:left; margin:0 0.5em 0 0.5em;}
div.percent div {float:left; height:1em; padding:0px !important;}
div.percent div.covered {background:#8c7;}
div.percent div.uncovered {background:#d76;}
</style>
</head>
<body>
<h1>Redmine code coverage</h1>
<p id='generation'>
  Generated on <%= now %> (<%= revision_link %>).
  More information about this environment at <a href='http://www.redmine.org/projects/redmine/wiki/Continuous_integration'>redmine.org</a>.
</p>

<table class="file_list">
  <thead>
    <tr>
      <th>File</th>
      <th colspan="2">% covered</th>
      <th>Lines</th>
      <th>Relevant</th>
      <th>Covered</th>
    </tr>
  </thead>
  <tbody>
    <% result.source_files.each do |source_file| %>
    <tr>
      <td class="filename"><%= link_to_source_file(source_file) %></td>
      <td><%= "%.1f" % source_file.covered_percent %> %</td>
      <td>
        <div class="percent">
          <div class="covered" style="width:<%= source_file.covered_percent.to_i %>px"></div>
          <div class="uncovered" style="width:<%= 100 - source_file.covered_percent.to_i %>px"></div>
        </div>
      </td>
      <td><%= source_file.lines.count %></td>
      <td><%= source_file.covered_lines.count + source_file.missed_lines.count %></td>
      <td><%= source_file.covered_lines.count %></td>
    </tr>
    <% end %>
  </tbody>
</table>  
</body>
</html>
.sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2005 The Apache Software Foundation

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id$ -->
<testcase>
  <info>
    <p>
      This test checks background image on lists (list-block).
    </p>
  </info>
  <variables>
    <img>../../resources/images/bgimg300dpi.jpg</img>
  </variables>
  <fo>
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
          <fo:region-body/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="normal" white-space-collapse="true">
        <fo:flow flow-name="xsl-region-body">
          <fo:list-block provisional-distance-between-starts="1in" provisional-label-separation="0.1in" background-color="yellow" background-repeat="no-repeat" background-position-horizontal="center" background-position-vertical="center" background-image="##img">
            <fo:list-item>
              <fo:list-item-label end-indent="label-end()">
                <fo:block>label 1</fo:block>
              </fo:list-item-label>
              <fo:list-item-body start-indent="body-start()">
                <fo:block>
                  body 1: The whole list should have a centered background.
                  The whole list should have a centered background.
                  The whole list should have a centered background.
                </fo:block>
              </fo:list-item-body>
            </fo:list-item>
            <fo:list-item>
              <fo:list-item-label end-indent="label-end()">
                <fo:block>label 2</fo:block>
              </fo:list-item-label>
              <fo:list-item-body start-indent="body-start()">
                <fo:block>
                  body 2: The whole list should have a centered background.
                  The whole list should have a centered background.
                  The whole list should have a centered background.
                </fo:block>
              </fo:list-item-body>
            </fo:list-item>
            <fo:list-item>
              <fo:list-item-label end-indent="label-end()">
                <fo:block>label 3</fo:block>
              </fo:list-item-label>
              <fo:list-item-body start-indent="body-start()">
                <fo:block>
                  body 3: The whole list should have a centered background.
                  The whole list should have a centered background.
                  The whole list should have a centered background.
                </fo:block>
              </fo:list-item-body>
            </fo:list-item>
          </fo:list-block>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>
    <eval expected="360000" xpath="//flow/block/@ipd"/>
    <eval expected="172800" xpath="//flow/block/@bpd"/>
    <eval expected="color=#ffff00,url=../../resources/images/bgimg300dpi.jpg,repeat=no-repeat,horiz=156960,vertical=63360" xpath="//flow/block/@background"/>
  </checks>
</testcase>