kraken-mobile 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/lib/kraken-mobile/version.rb +1 -1
- data/reporter/assets/css/scenario_index.css +20 -0
- data/reporter/assets/js/sankey.js +56 -24
- data/reporter/index.html.erb +2 -1
- data/reporter/scenario_report.html.erb +73 -31
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc931cd463cf275dd15848f6f5751461275b72c8
|
4
|
+
data.tar.gz: 83c25030dcf11cd2bd403b2f31b76948c73fea07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99bf9ad2a91215798445e26e16fe0377bd8ba6dc0cea908166592c23819362444e082120562743663e299004df7918667cec8454ff375778b79f5e354b7fc5b5
|
7
|
+
data.tar.gz: e4d9af2856eef33da3d740a1cbf642492383490947a00bae2c765f13553efa863c8739fdd95bb571e38b279c456bf67cfd59238c0c69da27e7c7a872c848fb39
|
data/README.md
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
<p align="center">
|
2
|
-
|
3
|
-
<img src="https://raw.githubusercontent.com/ravelinx22/KrakenMobile/master/reporter/assets/images/kraken.png" alt="Bootstrap logo" width="140" height="193">
|
4
|
-
</a>
|
2
|
+
<img src="https://raw.githubusercontent.com/ravelinx22/KrakenMobile/master/reporter/assets/images/kraken.png" alt="kraken logo" width="140" height="193">
|
5
3
|
</p>
|
6
4
|
|
7
5
|
<h3 align="center">Kraken Mobile</h3>
|
@@ -459,3 +459,23 @@ background-color: #E74C3C;
|
|
459
459
|
padding: 50px 0;
|
460
460
|
text-align: center;
|
461
461
|
}
|
462
|
+
|
463
|
+
.step_title {
|
464
|
+
margin-bottom: 10px;
|
465
|
+
white-space:nowrap;
|
466
|
+
overflow-x: hidden;
|
467
|
+
text-overflow: ellipsis;
|
468
|
+
}
|
469
|
+
|
470
|
+
.step_title_icon {
|
471
|
+
margin-right: 5px;
|
472
|
+
}
|
473
|
+
|
474
|
+
.not_available {
|
475
|
+
text-align: center;
|
476
|
+
width: 100%;
|
477
|
+
}
|
478
|
+
|
479
|
+
.step_image {
|
480
|
+
cursor: pointer;
|
481
|
+
}
|
@@ -110,11 +110,21 @@
|
|
110
110
|
return 10;
|
111
111
|
})
|
112
112
|
.style("fill", e)
|
113
|
+
.style("cursor", function(t) {
|
114
|
+
if(t.image) {
|
115
|
+
return "pointer";
|
116
|
+
} else {
|
117
|
+
return "default";
|
118
|
+
}
|
119
|
+
})
|
113
120
|
.on("mouseover", function(t) {
|
114
121
|
mouseover(t, i);
|
115
122
|
}).on("mouseout", function(t) {
|
116
123
|
mouseout(t, i);
|
117
124
|
})
|
125
|
+
.on("click", function(t) {
|
126
|
+
click(t, i);
|
127
|
+
})
|
118
128
|
},
|
119
129
|
exit: function() {
|
120
130
|
this.remove()
|
@@ -442,7 +452,7 @@ function mouseover(d, contexter) {
|
|
442
452
|
computedHeight = boundingRect.height;
|
443
453
|
|
444
454
|
let xPosition = d.x + margins.left + d.dx + 10;
|
445
|
-
let yPosition =
|
455
|
+
let yPosition = d.y + d.dy/2;
|
446
456
|
let endXPosition = xPosition + computedWidth;
|
447
457
|
|
448
458
|
if(endXPosition > width) {
|
@@ -457,38 +467,50 @@ function mouseover(d, contexter) {
|
|
457
467
|
im.id = "scene" + d.id;
|
458
468
|
im.src = "data:image/png;base64," + d.image
|
459
469
|
im.onload = function(e) {
|
460
|
-
var
|
461
|
-
var h = this.height;
|
470
|
+
var h = 100;
|
462
471
|
var ixPosition = d.x + margins.left + d.dx + 10; // 10 of separation from node
|
463
|
-
var iyPosition =
|
464
|
-
let endiXPosition = ixPosition + w;
|
465
|
-
let endiYPosition = iyPosition + h;
|
466
|
-
|
467
|
-
var i = 1
|
468
|
-
while(w/i > 100 || h/i > 100) {
|
469
|
-
i++;
|
470
|
-
}
|
471
|
-
|
472
|
-
h = h/i;
|
473
|
-
w = w/i;
|
474
|
-
|
475
|
-
endiXPosition = ixPosition + w;
|
476
|
-
endiYPosition = iyPosition + h;
|
472
|
+
var iyPosition = d.y + d.dy/2 + 10; // 10 of separation from label
|
477
473
|
|
478
|
-
|
479
|
-
ixPosition -= (endiXPosition-width)
|
480
|
-
}
|
481
|
-
|
482
|
-
contexter.base.append("image")
|
474
|
+
image = contexter.base.append("image")
|
483
475
|
.data([this])
|
484
476
|
.attr("x", ixPosition)
|
485
477
|
.attr("y", iyPosition)
|
478
|
+
.attr("height", 100)
|
479
|
+
.attr("width", 50)
|
480
|
+
.style("width", "auto")
|
486
481
|
.attr("xlink:href", this.src)
|
487
482
|
.attr("transform", null)
|
488
483
|
.attr("id", this.id)
|
489
484
|
.attr("class", "scene-image")
|
490
|
-
|
491
|
-
.
|
485
|
+
|
486
|
+
imageBoundingRect = image.node().getBoundingClientRect();
|
487
|
+
computedImageWidth = imageBoundingRect.width;
|
488
|
+
computedImageHeight = imageBoundingRect.height;
|
489
|
+
let endImageXPosition = ixPosition + computedImageWidth;
|
490
|
+
let endImageYPosition = iyPosition + computedImageHeight;
|
491
|
+
|
492
|
+
if(endImageXPosition > width) {
|
493
|
+
ixPosition -= (endImageXPosition-width)
|
494
|
+
}
|
495
|
+
|
496
|
+
if(endImageYPosition > height + margins.bottom) {
|
497
|
+
iyPosition -= (endImageYPosition-(height+margins.bottom))
|
498
|
+
}
|
499
|
+
|
500
|
+
image.attr("x", ixPosition)
|
501
|
+
.attr("y", iyPosition);
|
502
|
+
|
503
|
+
text.attr("y", iyPosition - 10);
|
504
|
+
|
505
|
+
contexter.base.append('rect')
|
506
|
+
.attr('class', 'scene-image')
|
507
|
+
.attr('width', computedImageWidth)
|
508
|
+
.attr('height', computedImageHeight)
|
509
|
+
.attr('fill', 'transparent')
|
510
|
+
.attr('stroke', 'black')
|
511
|
+
.style('opacity', 0.25)
|
512
|
+
.attr("x", ixPosition)
|
513
|
+
.attr("y", iyPosition);
|
492
514
|
}
|
493
515
|
}
|
494
516
|
}
|
@@ -497,6 +519,16 @@ function mouseout(d, svg) {
|
|
497
519
|
d3.selectAll("[class=\"scene-image\"]").remove();
|
498
520
|
}
|
499
521
|
|
522
|
+
function click(d, svg) {
|
523
|
+
if(d.image) {
|
524
|
+
var im = new Image();
|
525
|
+
im.src = "data:image/png;base64," + d.image
|
526
|
+
var w = window.open("",'_blank');
|
527
|
+
w.document.write(im.outerHTML);
|
528
|
+
w.document.close();
|
529
|
+
}
|
530
|
+
}
|
531
|
+
|
500
532
|
function label(node) {
|
501
533
|
return node.name.replace(/\s*\(.*?\)$/, '');
|
502
534
|
}
|
data/reporter/index.html.erb
CHANGED
@@ -643,7 +643,8 @@
|
|
643
643
|
}
|
644
644
|
devices = Array.from(devicesSet);
|
645
645
|
// GRAPH
|
646
|
-
|
646
|
+
let devicesLength = devices.length > 1 ? (devices.length-1) : 1;
|
647
|
+
var height = 150*devicesLength;
|
647
648
|
var c20c = d3.scale.category10();
|
648
649
|
d3.select("#chart_row" + (i+1))
|
649
650
|
.text(jsonObject["name"])
|
@@ -125,9 +125,42 @@
|
|
125
125
|
</div>
|
126
126
|
</div>
|
127
127
|
</div>
|
128
|
-
</div>
|
128
|
+
</div> <!-- Closes scenario row -->
|
129
|
+
|
130
|
+
<div class="row">
|
131
|
+
<div class="col-md-12 col-sm-12 col-xs-12">
|
132
|
+
<div class="x_panel" style="height: auto;">
|
133
|
+
<div class="x_title">
|
134
|
+
<h2>Screenshots</h2>
|
135
|
+
<div class="clearfix"></div>
|
136
|
+
</div>
|
137
|
+
<div class="x_content">
|
138
|
+
<div class="container">
|
139
|
+
<div class="row">
|
140
|
+
<% f["steps"].each do |s| %>
|
141
|
+
<div class="col-md-2">
|
142
|
+
<div class="step_title">
|
143
|
+
<i class="fa fa-arrow-right step_title_icon"></i>
|
144
|
+
<%= s["keyword"] %> <%= s["name"] %>
|
145
|
+
</div>
|
146
|
+
<% if(s["after"] && s["after"].count > 0 && s["after"].first["embeddings"] && s["after"].first["embeddings"].count > 0) %>
|
147
|
+
<% step_image = s["after"].first["embeddings"].first["data"] %>
|
148
|
+
<img src='<%= "data:image/png;base64,#{step_image}" %>' alt="" class="img-responsive step_image" onclick='<%= "openImageNewTab(\"#{step_image}\")" %>'>
|
149
|
+
<% else %>
|
150
|
+
<div class="not_available">
|
151
|
+
NO IMAGE AVAILABLE
|
152
|
+
</div>
|
153
|
+
<% end %>
|
154
|
+
</div>
|
155
|
+
<% end %>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div> <!-- Closes screenshots row -->
|
162
|
+
<% end %>
|
129
163
|
</div>
|
130
|
-
<% end %>
|
131
164
|
|
132
165
|
<script src="../../assets/js/jquery-3.2.1.min.js" ></script>
|
133
166
|
<script src="../../assets/js/bootstrap.min.js"></script>
|
@@ -136,39 +169,48 @@
|
|
136
169
|
<script src="../../assets/js/dataTables.responsive.min.js"></script>
|
137
170
|
<script src="../../assets/js/Chart.min.js"></script>
|
138
171
|
<script>
|
139
|
-
|
140
|
-
|
141
|
-
|
172
|
+
function openImageNewTab(imageData) {
|
173
|
+
var im = new Image();
|
174
|
+
im.src = "data:image/png;base64," + imageData
|
175
|
+
var w = window.open("",'_blank');
|
176
|
+
w.document.write(im.outerHTML);
|
177
|
+
w.document.close();
|
178
|
+
}
|
142
179
|
|
143
|
-
|
144
|
-
var scenarioOptions = {
|
145
|
-
legend: false,
|
146
|
-
responsive: false
|
147
|
-
};
|
180
|
+
$(document).ready(function () {
|
148
181
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
182
|
+
passed_scenarios = parseInt("<%= passed_scenarios(@feature).count %>")
|
183
|
+
failed_scenarios = parseInt("<%= failed_scenarios(@feature).count %>")
|
184
|
+
|
185
|
+
scenarios_data = [passed_scenarios,failed_scenarios];
|
186
|
+
var scenarioOptions = {
|
187
|
+
legend: false,
|
188
|
+
responsive: false
|
189
|
+
};
|
190
|
+
|
191
|
+
new Chart(document.getElementById("scenario-chart"), {
|
192
|
+
type: 'doughnut',
|
193
|
+
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
|
194
|
+
data: {
|
195
|
+
labels: [
|
196
|
+
"Passed",
|
197
|
+
"Failed"
|
198
|
+
],
|
199
|
+
datasets: [{
|
200
|
+
data: scenarios_data,
|
201
|
+
backgroundColor: [
|
202
|
+
"#26B99A",
|
203
|
+
"#E74C3C"
|
204
|
+
]
|
205
|
+
}]
|
206
|
+
},
|
207
|
+
options: scenarioOptions
|
208
|
+
});
|
167
209
|
|
168
|
-
|
169
|
-
|
210
|
+
$('body').tooltip({
|
211
|
+
selector: '[data-toggle="tooltip"]'
|
212
|
+
});
|
170
213
|
});
|
171
|
-
});
|
172
214
|
</script>
|
173
215
|
</body>
|
174
216
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kraken-mobile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Ravelo M
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -142,7 +142,7 @@ files:
|
|
142
142
|
- reporter/feature_report.html.erb
|
143
143
|
- reporter/index.html.erb
|
144
144
|
- reporter/scenario_report.html.erb
|
145
|
-
homepage: https://github.com/
|
145
|
+
homepage: https://github.com/TheSoftwareDesignLab/KrakenMobile
|
146
146
|
licenses:
|
147
147
|
- MIT
|
148
148
|
metadata: {}
|