Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions lib/generate-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,14 @@ function generateReport(options) {
'data:image/png;base64,' + embedding.data,
]);
step.embeddings[embeddingIndex] = {};
} else if (
embedding.mime_type === 'video/webm' ||
(embedding.media && embedding.media.type === 'video/webm')
) {
step.video = (step.video ? step.video : []).concat([
'data:video/webm;base64,' + embedding.data,
]);
step.embeddings[embeddingIndex] = {};
} else {
let embeddingType = 'text/plain';
if (embedding.mime_type) {
Expand Down Expand Up @@ -479,6 +487,7 @@ function generateReport(options) {
(step.hidden &&
!step.text &&
!step.image &&
!step.video &&
_.size(step.attachments) === 0 &&
step.result.status !== RESULT_STATUS.failed)
) {
Expand Down
18 changes: 16 additions & 2 deletions templates/components/scenarios.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<div class="x_content" style="display: none;">
<div class="scenario-step-container"><%= scenario.description %></div>
<% _.each(scenario.steps, function(step, stepIndex) { %>
<% if(!step.hidden || step.image || step.text || step.html || step.attachment) { %>
<% if(!step.hidden || step.image || step.video || step.text || step.html || step.attachment) { %>
<div class="scenario-step-container">

<% if(step.result) { %>
Expand Down Expand Up @@ -156,7 +156,7 @@
<% if (step.json) { %>
<a href="#info<%= scenarioIndex %>-<%= stepIndex %>-json" data-toggle="collapse">+ Show Info</a>
<% } %>

<% if (step.text) { %>
<a href="#info<%= scenarioIndex %>-<%= stepIndex %>-text" data-toggle="collapse">+ Show Info</a>
<% } %>
Expand All @@ -169,6 +169,10 @@
<a href="#info<%= scenarioIndex %>-<%= stepIndex %>-image" data-toggle="collapse">+ Screenshot</a>
<% } %>

<% if (step.video) { %>
<a href="#info<%= scenarioIndex %>-<%= stepIndex %>-video" data-toggle="collapse">+ Video</a>
<% } %>

<% if (!_.isEmpty(step.attachments)) { %>
<span>[</span>
<% _.each(step.attachments, function(attachment, attachmentIndex) { %>
Expand Down Expand Up @@ -215,6 +219,16 @@
</div>
<% } %>

<% if (step.video) { %>
<div id="info<%= scenarioIndex %>-<%= stepIndex %>-video" class="scenario-step-collapse collapse">
<% for( var i = 0; i < step.video.length; i++ ) { %>
<video class="videoCapture" controls>
<source type="video/webm" src="<%= step.video[i] %>"/>
</video>
<% } %>
</div>
<% } %>

<% if (!_.isEmpty(step.attachments)) { %>
<% _.each(step.attachments, function(attachment, attachmentIndex) { %>
<div id="info<%= scenarioIndex %>-<%= stepIndex %>-attachment<%= attachmentIndex %>" class="scenario-step-collapse collapse">
Expand Down
7 changes: 7 additions & 0 deletions templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ ul.quick-list li i {
max-width: 100%;
}

.videoCapture{
width: 50%;
height: 50%;
max-height: 100%;
max-width: 100%;
}

/* Features / Scenarios */
ul.panel_toolbox li .step {
border-radius: 50%;
Expand Down