From f5951a5ca3f35db25c4dc51330c4759504c26e4e Mon Sep 17 00:00:00 2001 From: Carine Dengler Date: Thu, 30 Nov 2023 10:41:23 +0100 Subject: [PATCH] test: add test for footer content --- web/frontend/tests/integration/footer.spec.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web/frontend/tests/integration/footer.spec.ts b/web/frontend/tests/integration/footer.spec.ts index 57185e2a9..332ee9938 100644 --- a/web/frontend/tests/integration/footer.spec.ts +++ b/web/frontend/tests/integration/footer.spec.ts @@ -1,5 +1,16 @@ import { test, expect } from '@playwright/test'; import { default as i18n } from 'i18next'; -import { initI18n } from './utils'; +import { initI18n, getFooter } from './utils'; initI18n(); + +test('Assert footer content is present', async ({ page }) => { + await page.goto(process.env.FRONT_END_URL); + await expect(page.getByText(i18n.t('© 2022 DEDIS LAB -')).first()).toBeVisible(); + await expect( + page.getByRole('link', { name: 'https://github.com/c4dt/d-voting' }).first() + ).toBeVisible(); + await expect( + page.getByText(`version:${process.env.REACT_APP_VERSION || 'unknown'} - build ${process.env.REACT_APP_BUILD || 'unknown'} - on ${process.env.REAC_APP_BUILD_TIME || 'unknown'}`) + ).toBeVisible() +});