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 calendar start function logging inconsistency.
|
||||||
- Fix updatenotification 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
|
## [2.15.0] - 2021-04-01
|
||||||
|
|
||||||
|
@ -13,13 +13,15 @@
|
|||||||
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
<div class="newsfeed-title bright medium light{{ ' no-wrap' if not config.wrapTitle }}">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</div>
|
</div>
|
||||||
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
{% if config.showDescription %}
|
||||||
{% if config.truncDescription %}
|
<div class="newsfeed-desc small light{{ ' no-wrap' if not config.wrapDescription }}">
|
||||||
{{ description | truncate(config.lengthDescription) }}
|
{% if config.truncDescription %}
|
||||||
{% else %}
|
{{ description | truncate(config.lengthDescription) }}
|
||||||
{{ description }}
|
{% else %}
|
||||||
{% endif %}
|
{{ description }}
|
||||||
</div>
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% elseif error %}
|
{% elseif error %}
|
||||||
<div class="small dimmed">
|
<div class="small dimmed">
|
||||||
|
@ -27,7 +27,8 @@ let config = {
|
|||||||
url: "http://localhost:8080/tests/configs/data/feed_test_rodrigoramirez.xml"
|
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 helpers = require("../global-setup");
|
||||||
|
const expect = require("chai").expect;
|
||||||
|
|
||||||
const describe = global.describe;
|
const describe = global.describe;
|
||||||
const it = global.it;
|
const it = global.it;
|
||||||
@ -36,6 +37,12 @@ describe("Newsfeed module", function () {
|
|||||||
it("should show the newsfeed article", function () {
|
it("should show the newsfeed article", function () {
|
||||||
return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "QPanel", 10000);
|
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 () {
|
describe("Custom configuration", function () {
|
||||||
@ -46,6 +53,12 @@ describe("Newsfeed module", function () {
|
|||||||
it("should not show articles with prohibited words", function () {
|
it("should not show articles with prohibited words", function () {
|
||||||
return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "Problema VirtualBox", 10000);
|
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 () {
|
describe("Invalid configuration", function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user