diff --git a/e2e/list.e2e-spec.ts b/e2e/list.e2e-spec.ts index d53a34e99bf0158df2d9a5feb321a6743eecd8c3..0530208eef5faed06428d890599a8931b5690975 100644 --- a/e2e/list.e2e-spec.ts +++ b/e2e/list.e2e-spec.ts @@ -1,4 +1,5 @@ import { ListPage } from "./list.po"; +import { element, by } from "protractor"; /** * Show calculators list (home page) @@ -15,4 +16,12 @@ describe("ngHyd − list page", () => { expect(page.getThemesCardsLength()).toBeGreaterThan(4); expect(page.getCalculatorsMenuLength()).toBeGreaterThan(8); }); + + it("when list is open, link to doc should be well-formed (2-letter language code)", async () => { + await page.navigateTo(); + const docLink = element(by.css("a#header-doc")); + const href = await docLink.getAttribute("href"); + const re = new RegExp("assets/docs/[a-z]{2}/index.html"); + expect(re.test(href)).toBe(true); + }); });