diff --git a/tests/configs/modules/newsfeed/ignore_items.js b/tests/configs/modules/newsfeed/ignore_items.js new file mode 100644 index 00000000..8b12a10a --- /dev/null +++ b/tests/configs/modules/newsfeed/ignore_items.js @@ -0,0 +1,28 @@ +/* Magic Mirror Test config newsfeed module + * + * MIT Licensed. + */ +let config = { + timeFormat: 12, + + modules: [ + { + module: "newsfeed", + position: "bottom_bar", + config: { + feeds: [ + { + title: "Rodrigo Ramirez Blog", + url: "http://localhost:8080/tests/configs/data/feed_test_rodrigoramirez.xml" + } + ], + ignoreOldItems: true + } + } + ] +}; + +/*************** DO NOT EDIT THE LINE BELOW ***************/ +if (typeof module !== "undefined") { + module.exports = config; +} diff --git a/tests/e2e/modules/newsfeed_spec.js b/tests/e2e/modules/newsfeed_spec.js index d7a3b9fe..1a7f5662 100644 --- a/tests/e2e/modules/newsfeed_spec.js +++ b/tests/e2e/modules/newsfeed_spec.js @@ -60,4 +60,17 @@ describe("Newsfeed module", function () { expect(elem.textContent).toContain("Error in the Newsfeed module. Malformed url."); }); }); + + describe("Ignore items", function () { + beforeAll(function (done) { + helpers.startApplication("tests/configs/modules/newsfeed/ignore_items.js"); + helpers.getDocument(done, 3000); + }); + + it("should show empty items info message", function () { + const elem = document.querySelector(".newsfeed .small"); + expect(elem).not.toBe(null); + expect(elem.textContent).toContain("No news at the moment."); + }); + }); });