Skip to content

Commit 601d099

Browse files
committed
Add test with additionnal questions
1 parent d83f9cb commit 601d099

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

e2e/moulinette/form.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,20 @@ test('Display a result with the available regulations', async ({ page }) => {
1313
await expect(page.getByRole('heading', { name: 'Natura 2000 Non soumis' })).toBeVisible();
1414
await expect(page.getByRole('heading', { name: 'Évaluation environnementale (rubrique 39) Non soumis' })).toBeVisible();
1515
});
16+
17+
test('Display a result with the available regulations and additionnal questions', async ({ page }) => {
18+
await page.goto('/');
19+
await page.getByTestId('simulateur_nav_btn').click();
20+
await page.dblclick('#map', { position: { x: 340, y: 230 } });
21+
await page.getByLabel('Nouveaux impacts').fill('10000');
22+
await page.getByLabel('État final').fill('10000');
23+
await page.getByRole('button', { name: 'Démarrer la simulation' }).click();
24+
await expect(page.getByRole('heading', { name: 'Questions complémentaires' })).toBeVisible();
25+
await page.getByRole('textbox', { name: 'Emprise au sol totale' }).click();
26+
await page.getByRole('textbox', { name: 'Emprise au sol totale' }).fill('10000');
27+
await page.getByText('Supérieure ou égale à 10 000').click();
28+
await page.getByRole('textbox', { name: 'Terrain d\'assiette du projet' }).click();
29+
await page.getByRole('textbox', { name: 'Terrain d\'assiette du projet' }).fill('45000');
30+
await page.getByRole('button', { name: 'Démarrer la simulation' }).click();
31+
await expect(page).toHaveTitle("Simulation réglementaire du projet — EnvErgo");
32+
});

0 commit comments

Comments
 (0)