Skip to content

Am ref index #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a49f5ce
rus
ArtemMikhalev Oct 17, 2017
77a648a
Update version.rb
ArtemMikhalev89 Oct 17, 2017
e5e62a8
Update version.rb
ArtemMikhalev89 Oct 17, 2017
5eb75a0
rus v2
ArtemMikhalev Oct 17, 2017
7b04238
Merge branch 'master' of https://github.com/ArtemMikhalev89/turnip_fo…
ArtemMikhalev Oct 17, 2017
1279e5b
rus v3
ArtemMikhalev Oct 17, 2017
fe7cb7b
rus v4
ArtemMikhalev Oct 17, 2017
8521642
rus v5
ArtemMikhalev Oct 17, 2017
a002e30
rus v6
ArtemMikhalev Oct 17, 2017
c714a40
rus v7
ArtemMikhalev Oct 17, 2017
0890345
rus v8
ArtemMikhalev Oct 17, 2017
9951052
rus v9
ArtemMikhalev Oct 17, 2017
dda0c52
rus v10
ArtemMikhalev Oct 17, 2017
a047afd
rus v11
ArtemMikhalev Oct 17, 2017
78426a2
rus v12
ArtemMikhalev Oct 17, 2017
b54058b
rus v15
ArtemMikhalev Oct 18, 2017
9eabee2
Update turnip_formatter.css
ArtemMikhalev89 Oct 18, 2017
b7e96ec
Update turnip_formatter.css
ArtemMikhalev89 Oct 18, 2017
09a6b45
Update turnip_formatter.css
ArtemMikhalev89 Oct 18, 2017
5660bf1
rus v16
ArtemMikhalev Oct 18, 2017
8f28b70
rus v17
ArtemMikhalev Oct 18, 2017
9701e95
rus v18
ArtemMikhalev Oct 18, 2017
efdd950
rus v19
ArtemMikhalev Oct 18, 2017
988aac3
rus v20
ArtemMikhalev Oct 18, 2017
fcf1f03
rus v21
ArtemMikhalev Oct 18, 2017
ddb2a7b
rus v22
ArtemMikhalev Oct 18, 2017
4e5dd31
rus v23
ArtemMikhalev Oct 19, 2017
615d924
rus v24
ArtemMikhalev Oct 19, 2017
3c8bb96
rus v25
ArtemMikhalev Oct 19, 2017
9520e20
rus v26
ArtemMikhalev Oct 19, 2017
c589089
rus v27
ArtemMikhalev Oct 19, 2017
c213d80
rus v28
ArtemMikhalev Oct 19, 2017
2af52d2
rus v29
ArtemMikhalev Oct 19, 2017
93afc24
rus v30
ArtemMikhalev Oct 19, 2017
1aa8e10
rus v31
ArtemMikhalev Oct 19, 2017
526ddf4
rus v32
ArtemMikhalev Oct 19, 2017
9889b12
rus v33
ArtemMikhalev Oct 19, 2017
ea06cd2
rus v34
ArtemMikhalev Oct 19, 2017
8f8d24f
rus v35
ArtemMikhalev Oct 19, 2017
b5d5c06
rus v36
ArtemMikhalev Oct 19, 2017
5ef880b
test commit
ArtemMikhalev Dec 13, 2017
671860d
commit v2
ArtemMikhalev89 Dec 13, 2017
2d48ce4
commit v3
ArtemMikhalev89 Dec 13, 2017
47a09bd
Изменил отображение времени прогона
ArtemMikhalev89 Dec 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

28 changes: 24 additions & 4 deletions lib/turnip_formatter/renderer/html/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,34 @@ def statistics_speed_html
StatisticsSpeed.new(scenarios).render
end

def result_status
str = "#{scenarios.size} Scenario "
str += "(#{@resource[:failed_count]} failed #{@resource[:pending_count]} pending)"
def result_status_all
str = "#{scenarios.size} "
str
end

def result_status_passed
str = result_status_all.to_i - result_status_failed.to_i - result_status_pending.to_i
str.to_s
end

def result_status_failed
str = "#{@resource[:failed_count]}"
str
end

def result_status_pending
str = "#{@resource[:pending_count]}"
str
end

def total_time
@resource[:total_time].to_s
t_t = @resource[:total_time] / 60
t_t.to_s.match(/.+\..{0,2}/)[0]
end

def date_create
t = Time.now
t.strftime("%F %H:%M")
end

def turnip_version
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 46 additions & 21 deletions lib/turnip_formatter/renderer/html/views/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>

<meta charset="UTF-8" />
<title><%= ERB::Util.h(title) %></title>

Expand All @@ -16,67 +17,91 @@
</head>

<body>
<style>
body {
background-image: url('https://github.com/ArtemMikhalev89/turnip_formatter/blob/master/lib/turnip_formatter/renderer/html/views/img/ruby.png?raw=true'); /* Путь к фоновому изображению */
background-repeat: no-repeat;
background-position: 95% 0%;
}
</style>

<header id="report">
<div class="container">
<div class="page-header">
<h1><%= ERB::Util.h(title) %></h1>
<h1 style=" font-weight: bold;"><%= ERB::Util.h(title) %></h1>
</div>

<section id="status_display_switch">
<label for="passed_check">
<input id="passed_check" type="checkbox" /> Passed
<div style="font-size: large; font-weight: bold;">Дата и время прогона: <%= date_create %></div>
<div style="border-bottom: 1px solid #eee ; border-top: 1px solid #eee ;">
<div style="font-size: large; font-weight: bold;" >Фильтры отображения:
</div>
<section id="status_display_switch" >
<label for="passed_check" style="color: #4fcf3c">
<input id="passed_check" type="checkbox" /> Пройденные
</label>
<label for="failed_check">
<input id="failed_check" type="checkbox" checked="checked" /> Failed
<label for="failed_check" style="color: #fa0000">
<input id="failed_check" type="checkbox" checked="checked" /> Упавшие
</label>
<label for="pending_check">
<input id="pending_check" type="checkbox" /> Pending
<label for="pending_check" style="color: #ff8c1a">
<input id="pending_check" type="checkbox" /> В ожидании
</label>
</section>
</div>

<section id="result">
<p><%= result_status %></p>
<p>Finished in <%= total_time %> sec</p>
<section id="result" >
<div style="font-size: large; font-weight: bold;">
Статистика по статусу прогона
</div>
<table>
<tr><th>Всего сценариев: </th><td style="text-indent: 10px;"><%=result_status_all %></td></tr>
<tr><th style="color: #4fcf3c">Пройденных: </th><td style="text-indent: 10px;"><%=result_status_passed %></td></tr>
<tr><th style="color: #fa0000">Упавших: </th><td style="text-indent: 10px;"><%=result_status_failed %></td></tr>
<tr><th style="color: #ff8c1a">В ожидании: </th><td style="text-indent: 10px;"><%=result_status_pending %></td></tr>
</table>
<div style="border-top: 1px solid #eee ;">
<table>
<tr><th>Общее время прогона автотестов:</th><td style="text-indent: 10px;"> <%= total_time %> минут</td></tr>
</table>
</div>
</section>
</div>
</header>

<div id="main" class="container" role="main">
<div id="main" class="container" role="main" style="position: relative; top: 15px;">
<ul id="statistics" class="nav nav-tabs">
<li class="active">
<a data-toggle="tab" href="#steps-statistics">Steps</a>
<a data-toggle="tab" href="#steps-statistics">Шаги</a>
</li>
<li>
<a data-toggle="tab" href="#speed-statistics">Speed Statistics</a>
<a data-toggle="tab" href="#speed-statistics">Статистика по скорости</a>
</li>
<li>
<a data-toggle="tab" href="#feature-statistics">Feature Sttistics</a>
<a data-toggle="tab" href="#feature-statistics">Статистика по фичам</a>
</li>
<li>
<a data-toggle="tab" href="#tag-statistics">Tag Statistics</a>
<a data-toggle="tab" href="#tag-statistics">Статистика по тэгам</a>
</li>
</ul>

<div class="tab-content">
<div id="steps-statistics" class="tab-pane active">
<div class="checkbox">
<label>
<input id="scenario_display_check" type="checkbox" checked="checked" /> Folding
<input id="scenario_display_check" type="checkbox" checked="checked" /> Развернуть/Свернуть
</label>
</div>

<div id="scenarios" class="panel-group"><%= scenarios_html %></div>
</div>
<div id="feature-statistics" class="tab-pane">
<h4>The results for the feature:</h4>
<h4>Статистика результатов по фичам:</h4>
<%= statistics_feature_html %>
</div>
<div id="tag-statistics" class="tab-pane">
<h4>The results for the tab:</h4>
<h4>Статистика результатов по тэгам:</h4>
<%= statistics_tag_html %>
</div>
<div id="speed-statistics" class="tab-pane">
<h4>Ranking of running time of each <strong>successfully</strong> scenario:</h4>
<h4>Затраченное время на прохождение каждого <strong>успешного</strong> сценария:</h4>
<%= statistics_speed_html %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<table>
<thead>
<tr>
<th>Feature</th>
<th>Scenarios</th>
<th>passed</th>
<th>failed</th>
<th>pending</th>
<th>status</th>
<th>Наименование фичи</th>
<th>Наименование сценария</th>
<th>Пройденных</th>
<th>Упавших</th>
<th>В ожидании</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<table>
<thead>
<tr>
<th>Feature</th>
<th>Scenario</th>
<th>Duration</th>
<th>Наименование фичи</th>
<th>Наименование сценария</th>
<th>Продолжительность</th>
</tr>
</thead>
<tbody>
Expand Down
12 changes: 6 additions & 6 deletions lib/turnip_formatter/renderer/html/views/statistics_tag.html.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<table>
<thead>
<tr>
<th>Tag</th>
<th>Scenarios</th>
<th>passed</th>
<th>failed</th>
<th>pending</th>
<th>status</th>
<th>Тэг</th>
<th>Кол-во сценариев</th>
<th>Пройденных</th>
<th>Упавших</th>
<th>В ожидании</th>
<th>Статус</th>
</tr>
</thead>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion lib/turnip_formatter/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

module TurnipFormatter
VERSION = '0.6.1'
VERSION = '0.6.2'
end