This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 72
/
_runtest_details.html
126 lines (107 loc) · 5.47 KB
/
_runtest_details.html
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{% extends 'lists/_itembody.html' %}
{% load execution urls markup permissions %}
{% block extra-itembody-classes %}{% if result.status == result.STATUS.started %}open{% endif %}{% endblock %}
{% block itembody-content %}
<form method="POST" id="test-status-form-{{ runcaseversion.id }}">
{% csrf_token %}
<div>
<span class="detailstitle">Submit your test result for case </span>
{% if user|has_perm:"library.manage_cases" %}
{% url 'manage_caseversion_edit' caseversion_id=caseversion.id as caseversion_edit_url %}
<a href="{{ caseversion_edit_url }}" target="_blank" class="detail-case-edit">Edit Case Details</a>
{% endif %}
{% block id %}<strong class="id">#{{ caseversion.case.id }}</strong>{% endblock id %}
</div>
{% if result.status == result.STATUS.assigned or result.status == result.STATUS.started %}
<button class="action-pass result-action" value="{{ runcaseversion.id }}" name="action-result_pass">pass test</button>
{% endif %}
</form>
<div class="description">
{% with caseversion.tags.all as tags %}
{% if tags %}
{% for tag in tags %}
{% if tag.description %}
<div class="tag-description">
<div class="tag">{{ tag }}</div>
<div class="tag-desc-text">{{ tag.description|markdown }}</div>
</div>
{% endif %}
{% endfor %}
<hr />
{% endif %}
{% endwith %}
{% if caseversion.description %}
<div class="case-description">
{{ caseversion.description|markdown }}
</div>
{% endif %}
</div>
{% if result.status == result.STATUS.assigned or result.status == result.STATUS.started %}
<div class="testinvalid details">
<p class="summary invalid-summary" title="mark test as invalid or unclear">invalid</p>
<form method="POST" id="test-invalid-form-{{ runcaseversion.id }}" class="invalid-form">
{% csrf_token %}
<label for="invalid-comment-{{ runcaseversion.id }}" class="invalid-label">description of problem:</label>
<textarea class="invalid-input" name="comment" id="invalid-comment-{{ runcaseversion.id }}" placeholder="please explain why this test case is invalid." required></textarea>
<div class="form-actions">
<button class="invalid" value="{{ runcaseversion.id }}" name="action-result_invalid">mark as invalid</button>
</div>
</form>
</div>
{% endif %}
<ol class="steps">
{% for step in caseversion.steps.all %}
{% stepresult_for result step as stepresult %}
<li class="stepitem" data-step-number="{{ step.number }}">
<div class="step {{ stepresult.status }}">
{% if step.instruction %}
<div class="instruction">{{ step.instruction|markdown }}</div>
{% endif %}
{% if step.expected %}
<div class="outcome">{{ step.expected|markdown }}</div>
{% endif %}
</div>
{% if result.status == result.STATUS.assigned or result.status == result.STATUS.started %}{# @@@ or result.status == result.STATUS.failed #}
<div class="stepfail details">
<p class="summary stepfail-summary">fail step</p>
<form method="POST" id="test-fail-form-{{ runcaseversion.id }}-{{ step.number }}" class="content stepfail-content">
{% csrf_token %}
<input type="hidden" name="stepnumber" value="{{ step.number }}">
<div class="formfield fail-field">
<label for="fail-comment-{{ runcaseversion.id }}-{{ step.number }}">actual result:</label>
<textarea name="comment" id="fail-comment-{{ runcaseversion.id }}-{{ step.number }}" placeholder="please explain the actual results of this step." required></textarea>
</div>
{% with runcaseversion.caseversion.bug_urls as bug_urls %}
<ul class="assign-buglist">
{% for bug_url in bug_urls %}
<li class="assign-bug">
<input type="radio" name="bug" value="{{ bug_url }}" id="bug-{{ runcaseversion.id }}-{{ step.number }}-{{ forloop.counter }}" />
<label for="bug-{{ runcaseversion.id }}-{{ step.number }}-{{ forloop.counter }}">{{ bug_url }}</label>
{% if bug_url|is_url %}
<a href="{{ bug_url }}" class="goto" title="go to bug">(go to bug)</a>
{% endif %}
</li>
{% endfor %}
<li class="newbug">
{% if bug_urls %}
<input type="radio" class="newbug-radio" name="bug" value="" id="bug-{{ runcaseversion.id }}-{{ step.number }}-new" class="newbug" />
<label for="bug-{{ runcaseversion.id }}-{{ step.number }}-new" class="newbug-radio-label">link to a new bug</label>
{% endif %}
<label for="related_bug-{{ runcaseversion.id }}-{{ step.number }}" class="newbug-input-label">bug link</label>
<input type="url" class="newbug-input{% if bug_urls %} disabled{% endif %}" name="{% if bug_urls %}disabled-{% endif %}bug" value="" id="related_bug-{{ runcaseversion.id }}-{{ step.number }}" placeholder="optional URL of related bug">
</li>
</ul>
{% endwith %}
<div class="form-actions">
<button class="fail" value="{{ runcaseversion.id }}" name="action-result_fail">submit failure</button>
</div>
</form>
</div>
{% endif %}
</li>
{% endfor %}
</ol>
{% with caseversion.attachments.all as attachments %}
{% include "lists/_associated_links.html" %}
{% endwith %}
{% endblock itembody-content %}