From ee8f5c4b8c7a1707407a2962cb0c61a276a1bacd Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Mon, 28 Jan 2019 17:27:26 +0100 Subject: [PATCH] =?UTF-8?q?M=C3=A0J=20tests=20e2e=20pour=20la=20nouvelle?= =?UTF-8?q?=20page=20de=20liste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- e2e/list.e2e-spec.ts | 1 + e2e/list.po.ts | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/e2e/list.e2e-spec.ts b/e2e/list.e2e-spec.ts index 027322c63..775a2735f 100644 --- a/e2e/list.e2e-spec.ts +++ b/e2e/list.e2e-spec.ts @@ -9,6 +9,7 @@ describe("ngHyd − list page", () => { it("when list is open, user should see the list of available compute nodes", async () => { await page.navigateTo(); + expect(page.getThemesCardsLength()).toBeGreaterThan(4); expect(page.getCalculatorsMenuLength()).toBeGreaterThan(8); }); }); diff --git a/e2e/list.po.ts b/e2e/list.po.ts index 8b21d46d1..2f06248a1 100644 --- a/e2e/list.po.ts +++ b/e2e/list.po.ts @@ -5,12 +5,20 @@ export class ListPage { return browser.get("/#/list"); } + getThemesCards() { + return element.all(by.css("mat-card.compute-nodes-theme")); + } + + async getThemesCardsLength() { + return await this.getThemesCards().count(); + } + getCalculatorsMenuEntries() { - return element.all(by.css("ul.list-group")); + return element.all(by.css("mat-card.compute-nodes-theme button.theme-calculator")); } - getCalculatorsMenuLength() { - return this.getCalculatorsMenuEntries().count(); + async getCalculatorsMenuLength() { + return await this.getCalculatorsMenuEntries().count(); } async clickRandomCalculatorMenuEntry() { -- GitLab