From a4dfd15888198412f6687acbbded2078df9a14c8 Mon Sep 17 00:00:00 2001 From: oemel09 Date: Sat, 10 Apr 2021 09:13:14 +0200 Subject: [PATCH] Fixes tests for newsfeed description --- tests/e2e/modules/newsfeed_spec.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/e2e/modules/newsfeed_spec.js b/tests/e2e/modules/newsfeed_spec.js index b0f81133..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; @@ -37,8 +38,10 @@ describe("Newsfeed module", function () { return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "QPanel", 10000); }); - it("should not show the newsfeed description", function () { - return !app.client.waitUntilTextExists(".newsfeed .newsfeed-desc", "Para instalar esta nueva versión", 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); }); }); @@ -51,8 +54,10 @@ describe("Newsfeed module", function () { return app.client.waitUntilTextExists(".newsfeed .newsfeed-title", "Problema VirtualBox", 10000); }); - it("should show the newsfeed description", function () { - return app.client.waitUntilTextExists(".newsfeed .newsfeed-desc", "Después de una actualización de Debian", 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); }); });