Skip to content

Commit 626fbf2

Browse files
author
Karl Dubost
authored
Merge pull request #3521 from webcompat/isssue/3520/1
Fixes #3520: Bring back min characters rule for description field
2 parents f34865d + 2666171 commit 626fbf2

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

tests/functional/reporting-auth.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ registerSuite("Reporting (auth)", {
6666
.findDisplayedByCssSelector(".next-description")
6767
.getAttribute("disabled")
6868
.then(function (attribute) {
69-
// Make sure "Continue" is enabled by default
70-
assert.isNull(attribute);
69+
// Make sure "Continue" is disabled if there are not enough characters
70+
assert.isNotNull(attribute);
7171
})
7272
.end()
7373
.findById("steps_reproduce")

tests/functional/reporting-issue-wizard-non-auth.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ registerSuite("Reporting with wizard", {
175175
.findDisplayedByCssSelector(".next-description")
176176
.getAttribute("disabled")
177177
.then(function (attribute) {
178-
// Make sure "Continue" is enabled by default
179-
assert.isNull(attribute);
178+
// Make sure "Continue" is disabled if there are not enough characters
179+
assert.isNotNull(attribute);
180180
})
181181
.end()
182182
.findById("steps_reproduce")
@@ -521,8 +521,8 @@ registerSuite("Reporting with wizard", {
521521
.findDisplayedByCssSelector(".next-description")
522522
.getAttribute("disabled")
523523
.then(function (attribute) {
524-
// Make sure "Continue" is enabled by default
525-
assert.isNull(attribute);
524+
// Make sure "Continue" is disabled if there are not enough characters
525+
assert.isNotNull(attribute);
526526
})
527527
.end()
528528
// Enter more than 30 characters in the description field

webcompat/static/js/lib/wizard/steps/description.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const updateDescription = (url) => {
6161

6262
const showProgress = () => {
6363
progress.removeClass("is-hidden");
64-
$(".char-limit").text("Minimum 30 characters");
64+
$(".char-limit").text(`Minimum ${MIN_CHARACTERS} characters`);
6565
};
6666

6767
const initMinCharMode = () => {

webcompat/templates/steps/description.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
<div class="step-container step-description col" data-min-char="false">
1+
<div class="step-container step-description col" data-min-char="true">
22
<div class="row mobile-col">
33
<div class="input-control device-data-hero half">
44
<img class="protruding-img" src="{{ url_for('static', filename='img/svg/describe-issue.svg') }}" title="Describe issue" alt="Describe issue" />
55
<div class="description-text">
6-
Any <strong>additional information</strong> you would like to specify? <br/>
7-
That would help us diagnose the problem faster.
6+
OK, now the vital part! <br>
7+
Please <strong>describe what happened</strong>,
8+
including any steps you took before you saw the problem.
89
</div>
910
</div>
1011
<div class="input-control half col">

0 commit comments

Comments
 (0)