mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Merge pull request #2518 from oemel09/hide-newsfeed-description
This commit is contained in:
commit
13fcb55df6
@ -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
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
||||
{{ title }}
|
||||
</div>
|
||||
{% if config.showDescription %}
|
||||
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
||||
{% if config.truncDescription %}
|
||||
{{ description | truncate(config.lengthDescription) }}
|
||||
@ -20,6 +21,7 @@
|
||||
{{ description }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elseif error %}
|
||||
<div class="small dimmed">
|
||||
|
@ -27,7 +27,8 @@ let config = {
|
||||
url: "http://localhost:8080/tests/configs/data/feed_test_rodrigoramirez.xml"
|
||||
}
|
||||
],
|
||||
prohibitedWords: ["QPanel"]
|
||||
prohibitedWords: ["QPanel"],
|
||||
showDescription: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -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 () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user