✅(e2e) change accounts to facilitate SIRET and add e2e test
We also add registration ID info to the /me endpoint, via serializers
This commit is contained in:
committed by
Laurent Bossavit
parent
2435a59078
commit
8fd55a61c5
23
src/frontend/apps/e2e/__tests__/app-desk/siret.spec.ts
Normal file
23
src/frontend/apps/e2e/__tests__/app-desk/siret.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
|
||||
import { keyCloakSignIn } from './common';
|
||||
|
||||
test.beforeEach(async ({ page, browserName }) => {
|
||||
await page.goto('/');
|
||||
await keyCloakSignIn(page, browserName, 'marie');
|
||||
});
|
||||
|
||||
test.describe('OIDC interop with SIRET', () => {
|
||||
test('it checks the SIRET is displayed in /me endpoint', async ({ page }) => {
|
||||
const header = page.locator('header').first();
|
||||
await expect(header.getByAltText('Marianne Logo')).toBeVisible();
|
||||
|
||||
const response = await page.request.get(
|
||||
'http://localhost:8071/api/v1.0/users/me/',
|
||||
);
|
||||
expect(response.ok()).toBeTruthy();
|
||||
expect(await response.json()).toMatchObject({
|
||||
organization: { registration_id_list: ['21580304000017'] },
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user