This commit is contained in:
oussi
2026-04-27 17:31:02 +02:00
parent 4521544c80
commit 536c8740a9

View File

@@ -662,9 +662,27 @@ test.describe('Module T2A', () => {
await page.getByText('A risque', { exact: true }).click();
await expect.soft(page.locator('a.IS_button.warning')).toHaveText('A risque');
await page.getByText('Sauvegarder').click();
await expect.soft(page.getByRole('heading', { name: 'Sauvegarde' })).toBeVisible();
await expect.soft(page.getByRole('cell', { name: 'A RISQUE', exact: true }).locator('span')).toBeVisible();
await page.getByText('Enregistrer et quitter la').click();
await page.getByText('Fiche OGC 57 - Séjour numéro').waitFor({ state: 'hidden' });
await page.getByRole('textbox', { name: 'Taper un numéro de séjour ou' }).fill('57');
await page.locator('header, .IS_Container, body').first().click(); // dehors du champ
await page.getByText('Fiche OGC 57').waitFor({ state: 'visible' });
await expect.soft(page.locator('a.IS_button.warning')).toHaveText('A risque');
// Cliquer sur Non défendable
await page.getByText('Non défendable').click();
await expect.soft(page.locator('a.IS_button.danger')).toHaveText('Non défendable');
await page.getByText('Défendable', { exact: true }).click();
await expect.soft(page.locator('a.IS_button.success').last()).toHaveText('Défendable')
await page.getByText('Sauvegarder').click();
await expect.soft(page.getByRole('heading', { name: 'Sauvegarde' })).toBeVisible();
await expect.soft(page.getByText('Fiche OGC 57 - Séjour numéro')).toBeVisible();
await page.getByText('Enregistrer', { exact: true }).click();
await expect.soft(page.getByText('Fiche OGC 57 - Séjour numéro')).toBeVisible();
});
@@ -872,13 +890,13 @@ test.describe('Module T2A', () => {
await page.locator('a.IS_icon.IS_FrameCloseButton').nth(1).click();
// Recherche de saisines
await page.getByText('Recherche de saisines').click();
await page.getByRole('row', { name: 'Aide à l\'argumentaire' }).locator('a').click();
await expect.soft(page.getByRole('textbox', { name: 'Rechercher un code ou un terme' })).toBeVisible();
await expect.soft(page.getByText('Saisines : 191')).toBeVisible();
await expect.soft(page.getByText('Saisines :')).toBeVisible();
await expect.soft(page.getByText('Agora :')).toBeVisible();
await page.getByRole('textbox', { name: 'Rechercher un code ou un terme' }).fill('transfusion');
await page.getByTitle('Rechercher', { exact: true }).click();
await expect.soft(page.getByText('Saisines : 6')).toBeVisible();
await expect.soft(page.getByText('Saisines :')).toBeVisible();
await expect.soft(page.getByText('Agora : ')).toBeVisible();
await expect.soft(page.getByText('Transfusion sanguine en DAS')).toBeVisible();
await page.getByText('Transfusion sanguine en DAS').click();
@@ -894,6 +912,14 @@ test.describe('Module T2A', () => {
await expect.soft(page.getByText('Source : Agora, sujet N°')).toBeVisible();
const tdAgora = page.locator('div.IS_Container.IS_VFlowLayout.verticalScroll').nth(3);
// COCOA
await page.getByText('CoCoA : ').click();
await expect.soft(page.getByText('sujets trouvés sur la CoCoA')).toBeVisible();
await page.getByTitle('P02.3 (2 occurence)').click();
await expect.soft(page.getByText('CoCoA', { exact: true })).toBeVisible();
await expect.soft(page.getByRole('heading', { name: 'P02.3 - Foetus et nouveau-né' }).locator('b')).toBeVisible();
// Vérifier que tous les "transfusion" sont dans des <mark>
const allMarked = await tdAgora.evaluate((element) => {
const text = element.textContent || '';
@@ -1240,7 +1266,7 @@ test.describe('Module T2A', () => {
await page.locator('a.IS_icon.IS_FrameCloseButton').nth(1).click();
// Recherche de saisines
await page.getByText('Recherche de saisines').click();
await page.getByRole('row', { name: 'Aide à l\'argumentaire' }).locator('a').click();
await expect.soft(page.getByRole('textbox', { name: 'Rechercher un code ou un terme' })).toBeVisible();
await expect.soft(page.getByText('Saisines :')).toBeVisible();
await expect.soft(page.getByText('Agora : ')).toBeVisible();
@@ -1270,6 +1296,13 @@ test.describe('Module T2A', () => {
await expect(newPage).toHaveURL(/connect-pasrel\.atih\.sante\.fr\/cas\/login/);
// COCOA
await page.getByText('CoCoA : ').click();
await expect.soft(page.getByText('sujets trouvés sur la CoCoA')).toBeVisible();
await page.getByTitle('P02.3 (2 occurence)').click();
await expect.soft(page.getByText('CoCoA', { exact: true })).toBeVisible();
await expect.soft(page.getByRole('heading', { name: 'P02.3 - Foetus et nouveau-né' }).locator('b')).toBeVisible();
// Recherche de Diags ou Actes
await page.getByText('Recherche de Diags ou Actes').click();
await expect.soft(page.getByText('Recherche de code')).toBeVisible();