🚨(i18n) add linter to i18n package

We need to add a linter to the i18n package, we are mainly
interested by the jest linting rules so we create
a jest eslint config pluggable our other configs and to the
i18n eslint config.
This commit is contained in:
Anthony LC
2024-01-24 15:27:11 +01:00
committed by Anthony LC
parent 801cb98e15
commit 8043d12315
20 changed files with 272 additions and 189 deletions

View File

@@ -1,24 +1,24 @@
import { expect, test } from "@playwright/test";
import { expect, test } from '@playwright/test';
import { keyCloakSignIn } from "./common";
import { keyCloakSignIn } from './common';
test.beforeEach(async ({ page }) => {
await page.goto("/");
await page.goto('/');
await keyCloakSignIn(page);
});
test.describe("Language", () => {
test("checks translation library works", async ({ page }) => {
test.describe('Language', () => {
test('checks translation library works', async ({ page }) => {
await expect(
page.locator("h1").first().getByText("Bienvenue sur Desk !"),
page.locator('h1').first().getByText('Bienvenue sur Desk !'),
).toBeVisible();
});
test("checks the language picker", async ({ page }) => {
const header = page.locator("header").first();
test('checks the language picker', async ({ page }) => {
const header = page.locator('header').first();
await header.getByRole("combobox").getByText("FR").click();
await header.getByRole("option", { name: "Language Icon EN" }).click();
await expect(header.getByRole("combobox").getByText("EN")).toBeVisible();
await header.getByRole('combobox').getByText('FR').click();
await header.getByRole('option', { name: 'Language Icon EN' }).click();
await expect(header.getByRole('combobox').getByText('EN')).toBeVisible();
});
});