diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8cdcffd6..f44ca69c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ _This release is scheduled to be released on 2021-04-01._
- Fix calendar start function logging inconsistency.
- Fix updatenotification start function logging inconsistency.
+- Checks and applies the showDescription setting for the newsfeed module again
## [2.15.0] - 2021-04-01
diff --git a/modules/default/newsfeed/newsfeed.njk b/modules/default/newsfeed/newsfeed.njk
index dc9ccad6..e63a8054 100644
--- a/modules/default/newsfeed/newsfeed.njk
+++ b/modules/default/newsfeed/newsfeed.njk
@@ -13,13 +13,15 @@
{{ title }}
-
- {% if config.truncDescription %}
- {{ description | truncate(config.lengthDescription) }}
- {% else %}
- {{ description }}
- {% endif %}
-
+ {% if config.showDescription %}
+
+ {% if config.truncDescription %}
+ {{ description | truncate(config.lengthDescription) }}
+ {% else %}
+ {{ description }}
+ {% endif %}
+
+ {% endif %}
{% elseif error %}
diff --git a/tests/configs/modules/newsfeed/prohibited_words.js b/tests/configs/modules/newsfeed/prohibited_words.js
index e039385e..f9bfa5cf 100644
--- a/tests/configs/modules/newsfeed/prohibited_words.js
+++ b/tests/configs/modules/newsfeed/prohibited_words.js
@@ -27,7 +27,8 @@ let config = {
url: "http://localhost:8080/tests/configs/data/feed_test_rodrigoramirez.xml"
}
],
- prohibitedWords: ["QPanel"]
+ prohibitedWords: ["QPanel"],
+ showDescription: true
}
}
]
diff --git a/tests/e2e/modules/newsfeed_spec.js b/tests/e2e/modules/newsfeed_spec.js
index dae3d86b..0a8f505f 100644
--- a/tests/e2e/modules/newsfeed_spec.js
+++ b/tests/e2e/modules/newsfeed_spec.js
@@ -1,4 +1,5 @@
const helpers = require("../global-setup");
+const expect = require("chai").expect;
const describe = global.describe;
const it = global.it;
@@ -36,6 +37,12 @@ describe("Newsfeed module", function () {
it("should show the newsfeed article", function () {
return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "QPanel", 10000);
});
+
+ it("should NOT show the newsfeed description", async () => {
+ await app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "QPanel", 10000);
+ const events = await app.client.$$(".newsfeed .newsfeed-desc");
+ return expect(events.length).equals(0);
+ });
});
describe("Custom configuration", function () {
@@ -46,6 +53,12 @@ describe("Newsfeed module", function () {
it("should not show articles with prohibited words", function () {
return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "Problema VirtualBox", 10000);
});
+
+ it("should show the newsfeed description", async () => {
+ await app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "Problema VirtualBox", 10000);
+ const events = await app.client.$$(".newsfeed .newsfeed-desc");
+ return expect(events.length).equals(1);
+ });
});
describe("Invalid configuration", function () {