This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
people/src/frontend/apps/e2e/__tests__/app-desk/header.spec.ts

29 lines
767 B
TypeScript
Raw Normal View History

import { expect, test } from '@playwright/test';
import { keyCloakSignIn } from './common';
test.beforeEach(async ({ page, browserName }) => {
await page.goto('/');
await keyCloakSignIn(page, browserName);
});
test.describe('Header', () => {
test('checks all the elements are visible', async ({ page, browserName }) => {
const header = page.locator('header').first();
await expect(header.getByText('La Régie')).toBeVisible();
await expect(header.getByRole('combobox').getByText('EN')).toBeVisible();
});
test('checks logout button', async ({ page }) => {
await page
.getByRole('button', {
name: 'Logout',
})
.click();
await expect(page.getByRole('button', { name: 'Sign in' })).toBeVisible();
});
});