diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 00000000..3c4fd1ec --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,28 @@ +name: Playwright Tests +on: + push: + branches: [main, master, test/test-e2e] + pull_request: + branches: [main, master, test/test-e2e] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install dependencies + run: yarn + - name: Install Playwright Browsers + run: yarn playwright install --with-deps + - name: Run Playwright tests + run: npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "yarn start" "npx wait-on http://localhost:3000 && yarn run playwright test" + + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.gitignore b/.gitignore index c69d067f..c11bec05 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,6 @@ yarn-debug.log* yarn-error.log* .eslintcache +/test-results/ +/playwright-report/ +/playwright/.cache/ diff --git a/e2e/example.spec.ts b/e2e/example.spec.ts new file mode 100644 index 00000000..c511525c --- /dev/null +++ b/e2e/example.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test'; + +test('has title', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test('get started link', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Click the get started link. + await page.getByRole('link', { name: 'Get started' }).click(); + + // Expects the URL to contain intro. + await expect(page).toHaveURL(/.*intro/); +}); diff --git a/e2e/questionnaire-boucles-nombre-variable-fixe.spec.ts b/e2e/questionnaire-boucles-nombre-variable-fixe.spec.ts new file mode 100644 index 00000000..fb50f18e --- /dev/null +++ b/e2e/questionnaire-boucles-nombre-variable-fixe.spec.ts @@ -0,0 +1,235 @@ +import { test, expect } from '@playwright/test'; +test('QNONREG - tous types boucle nombre variable ou fixe (min=max)', async ({ + page, +}) => { + const jsonLunatic = '/static/questionnaire/boucle-fixe/form.json'; + const serveur = 'http://localhost:3000'; + await page.goto(serveur + '/visualize'); + + await page + .getByPlaceholder( + 'http://localhost:3000/static/questionnaire/simpsons/form.json' + ) + .fill(serveur + jsonLunatic); + await page.getByRole('button', { name: 'Visualiser', exact: true }).click(); + expect( + page.getByRole('heading', { + name: 'QNONREG - tous types boucle nombre variable ou fixe (min=max) - ok', + }) + ).toBeVisible(); + expect(page.getByText('Début')).toBeVisible(); + expect(page.getByText('Page de commencement générique.')).toBeVisible(); + await page.getByRole('button', { name: 'Commencer' }).click(); + expect( + page.getByText( + 'I - S1 - boucle liée de 1 à max 4 avec un nb inconnu au début' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + // await page.getByRole('button', { name: 'Continuer' }).click(); + expect(page.getByRole('button', { name: 'Ajoute un prénom' })).toBeVisible(); + expect(page.getByRole('button', { name: 'Remove Row' })).toBeVisible(); + await page.getByLabel('➡ 1. PRENOM').first().fill('AA'); + expect(await page.getByLabel('➡ 1. PRENOM').first().inputValue()).toEqual( + 'AA' + ); + await page.getByRole('button', { name: 'Ajoute un prénom' }).click(); + await page.getByLabel('➡ 1. PRENOM').nth(1).fill('BB'); + expect(await page.getByLabel('➡ 1. PRENOM').nth(1).inputValue()).toEqual( + 'BB' + ); + await page.getByRole('button', { name: 'Ajoute un prénom' }).click(); + await page.getByLabel('➡ 1. PRENOM').nth(2).fill('CC'); + expect(await page.getByLabel('➡ 1. PRENOM').nth(2).inputValue()).toEqual( + 'CC' + ); + expect(await page.locator('input[type="text"]').count()).toEqual(3); + await page.getByRole('button', { name: 'Remove row' }).click(); + expect(await page.locator('input[type="text"]').count()).toEqual(2); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 2. Q1 de AA').fill('A'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel('➡ 3. Affichage de Q2 si Q1 = A - rappel du prénom : AA') + .fill('A2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByLabel('➡ 3. Affichage de Q2 si Q1 = A - rappel du prénom : BB') + ).not.toBeVisible(); + await page.getByLabel('➡ 2. Q1 de BB').fill('A'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByLabel('➡ 3. Affichage de Q2 si Q1 = A - rappel du prénom : BB') + ).toBeVisible(); + await page + .getByLabel('➡ 3. Affichage de Q2 si Q1 = A - rappel du prénom : BB') + .fill('B2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText( + 'II - S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée' + ) + ).toBeVisible(); + //cas sans q2 pour AA et BB + await page.getByRole('button', { name: 'Retour' }).click(); + await page.getByRole('button', { name: 'Retour' }).click(); + await page.getByRole('button', { name: 'Retour' }).click(); + await page.getByRole('button', { name: 'Retour' }).click(); + expect(page.getByText('➡ 2. Q1 de AA')).toBeVisible(); + await page.getByLabel('➡ 2. Q1 de AA').fill('C'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(page.getByText('➡ 2. Q1 de BB')).toBeVisible(); + await page.getByLabel('➡ 2. Q1 de BB').fill('C'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText( + 'II - S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByRole('button', { name: 'Ajouter un produit' }) + ).toBeVisible(); + expect(page.getByRole('button', { name: 'Remove Row' })).toBeVisible(); + expect(page.getByText('Decrire le produit')).toBeVisible(); + expect(page.getByText('➡ 4. Décrire un produit')).toBeVisible(); + + await page.getByLabel('➡ 4. Décrire un produit').fill('P1'); + expect(await page.getByLabel('➡ 4. Décrire un produit').inputValue()).toEqual( + 'P1' + ); + await page.getByLabel('➡ 5. Avis sur produit').fill('ras'); + expect(await page.getByLabel('➡ 5. Avis sur produit').inputValue()).toEqual( + 'ras' + ); + await page.getByRole('button', { name: 'Ajouter un produit' }).click(); + await page.getByLabel('➡ 4. Décrire un produit').nth(1).click(); + await page + .getByLabel('➡ 4. Décrire un produitContrôle sur P1 vide') + .nth(1) + .fill('P2'); + expect( + await page.getByLabel('➡ 4. Décrire un produit').nth(1).inputValue() + ).toEqual('P2'); + await page.getByLabel('➡ 5. Avis sur produit').nth(1).fill('ras'); + expect( + await page.getByLabel('➡ 5. Avis sur produit').nth(1).inputValue() + ).toEqual('ras'); + expect( + await page.getByLabel('➡ 4. Décrire un produitContrôle sur P1 vide').count() + ).toEqual(2); + await page.getByRole('button', { name: 'Remove row' }).click(); + expect( + await page.getByLabel('➡ 4. Décrire un produitContrôle sur P1 vide').count() + ).toEqual(1); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText( + 'III - S3 - boucle N occurrences, N collecté en premier, type logement' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(page.getByText('➡ 6. NB')).toBeVisible(); + await page.getByLabel('➡ 6. NB').fill('3'); + expect(await page.getByLabel('➡ 6. NB').inputValue()).toEqual('3'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(await page.getByRole('textbox').count()).toEqual(3); + expect(await page.getByText('➡ 7. PRENOM').count()).toEqual(3); + expect(await page.getByText('SS31').count()).toEqual(3); + // Vérifie que le texte du premier champ de texte est égal à "A" + await page.locator('#kwupruv2-0').fill('A'); + const textA = await page.locator('#kwupruv2-0').inputValue(); + expect(textA).toEqual('A'); + await page.locator('#kwupruv2-1').fill('B'); + // Vérifie que le texte du deuxième champ de texte est égal à "B" + expect(await page.locator('#kwupruv2-1').inputValue()).toEqual('B'); + await page.locator('#kwupruv2-2').fill('C'); + // Vérifie que le texte du troisième champ de texte est égal à "C" + expect(await page.locator('#kwupruv2-2').inputValue()).toEqual('C'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //cas age vide + await page.getByLabel('➡ 8. AGE de A').fill(''); + expect(await page.getByLabel('➡ 8. AGE de A').inputValue()).toEqual(''); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('AGE est vide') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByLabel('➡ 8. AGE de A').fill('10'); + expect(await page.getByLabel('➡ 8. AGE de A').inputValue()).toEqual('10'); + expect(page.getByText('➡ 8. AGE de A')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //cas age vide + await page.getByLabel('➡ 8. AGE de B').fill(''); + expect(await page.getByLabel('➡ 8. AGE de B').inputValue()).toEqual(''); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('AGE est vide') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + expect(page.getByText('➡ 8. AGE de B')).toBeVisible(); + await page.getByLabel('➡ 8. AGE de B').fill('11'); + expect(await page.getByLabel('➡ 8. AGE de B').inputValue()).toEqual('11'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //cas age vide + await page.getByLabel('➡ 8. AGE de C').fill(''); + expect(await page.getByLabel('➡ 8. AGE de c').inputValue()).toEqual(''); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('AGE est vide') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect(page.getByText('➡ 8. AGE de C')).toBeVisible(); + await page.getByLabel('➡ 8. AGE de C').fill('12'); + expect(await page.getByLabel('➡ 8. AGE de C').inputValue()).toEqual('12'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //commentaire + // expect(page.getByText('➡ 8. COMMENTAIRE')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //remarques + expect( + page.getByText( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + ).toBeVisible(); + await page + .getByLabel( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + .fill('RAS'); + expect( + await page + .getByLabel( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + .inputValue() + ).toEqual('RAS'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByText('Validation')).toBeVisible(); + await expect( + page.getByText('Vous êtes arrivé à la fin du questionnaire.') + ).toBeVisible(); + await expect( + page.getByText( + 'Merci de cliquer sur le bouton "Envoyer" pour le transmettre à l\'Insee.' + ) + ).toBeVisible(); + await expect( + page.getByText( + 'Après envoi, vous ne pourrez plus modifier vos réponses en ligne.' + ) + ).toBeVisible(); + await expect( + page.getByText('Pour toute modification, cliquer sur le bouton "Retour".') + ).toBeVisible(); + await expect( + page.locator('#main').getByRole('button', { name: 'Envoyer' }) + ).toBeVisible(); +}); diff --git a/e2e/questionnaire-controles-invariables-boucles-liees.spec.ts b/e2e/questionnaire-controles-invariables-boucles-liees.spec.ts new file mode 100644 index 00000000..d99d0519 --- /dev/null +++ b/e2e/questionnaire-controles-invariables-boucles-liees.spec.ts @@ -0,0 +1,199 @@ +import { test, expect } from '@playwright/test'; +test('Questionnaire Controles Boucles Liées', async ({ page }) => { + const jsonLunatic = '/static/questionnaire/boucle-liees/form.json'; + const serveur = 'http://localhost:3000'; + await page.goto(serveur + '/visualize'); + + await page + .getByPlaceholder( + 'http://localhost:3000/static/questionnaire/simpsons/form.json' + ) + .fill(serveur + jsonLunatic); + await page.getByRole('button', { name: 'Visualiser', exact: true }).click(); + await page.getByRole('button', { name: 'Commencer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText( + 'Vous avez indiqué avoir deux résidences principales, pouvez-vous corriger l’une de vos réponses ?' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByRole('radio', { name: 'Non' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 3. NBHAB : controle si > 5').fill('9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('supérieur à 5') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //test valeur négative : erreur serveur + // await page.getByLabel('➡ 3. NBHAB : controle si > 5').fill('-2'); + await page.getByLabel('➡ 3. NBHAB : controle si > 5').fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(await page.getByRole('textbox').count()).toEqual(2); + //TODO AJOUT CONTROLE PRENOM VIDE + await page.getByLabel('➡ 4. Prénom').first().fill('A'); + await page.getByLabel('➡ 4. Prénom').nth(1).fill('BBB'); + expect(await page.getByLabel('➡ 4. Prénom').first().inputValue()).toEqual( + 'A' + ); + expect(await page.getByLabel('➡ 4. Prénom').nth(1).inputValue()).toEqual( + 'BBB' + ); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Remplir Q1 INDIV') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Q1 et Q2 de A incompatibles') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByRole('radio', { name: 'Non' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu A') + .fill('120'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inférieur à 10') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //valeur négative + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu A') + .fill('-78'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre 0 et 100.') + ).toBeVisible(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inférieur à 10') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu A') + .fill('78'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Remplir Q1 INDIV') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Q1 et Q2 de BBB incompatibles') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByRole('radio', { name: 'Non' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu BBB') + .fill('130'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inférieur à 10') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //valeur négative + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu BBB') + .fill('-78'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inférieur à 10') + ).toBeVisible(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inférieur à 10') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page + .getByLabel('➡ 7. Montant entre 0 et 100 pour l’individu BBB') + .fill('72'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //fin + expect(page.getByText('➡ 8. FIN')).toBeVisible(); + await page.getByLabel('➡ 8. FIN').fill('FIN'); + expect(await page.getByLabel('➡ 8. FIN').inputValue()).toEqual('FIN'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //commentaire + await expect(page.getByText('COMMENTAIRE')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //remarques + expect( + page.getByText( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + ).toBeVisible(); + await page + .getByLabel( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + .fill('RAS'); + expect( + await page + .getByLabel( + "Avez-vous des remarques concernant l'enquête ou des commentaires ?" + ) + .inputValue() + ).toEqual('RAS'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(page.getByText('Validation')).toBeVisible(); + expect( + page.getByText('Vous êtes arrivé à la fin du questionnaire.') + ).toBeVisible(); + expect( + page.getByText( + 'Merci de cliquer sur le bouton "Envoyer" pour le transmettre à l\'Insee.' + ) + ).toBeVisible(); + expect( + page.getByText( + 'Après envoi, vous ne pourrez plus modifier vos réponses en ligne.' + ) + ).toBeVisible(); + expect( + page.getByText('Pour toute modification, cliquer sur le bouton "Retour".') + ).toBeVisible(); + expect( + page.locator('#main').getByRole('button', { name: 'Envoyer' }) + ).toBeVisible(); + await page.locator('#main').click(); +}); diff --git a/e2e/questionnaire-controles-numeriques.spec.ts b/e2e/questionnaire-controles-numeriques.spec.ts new file mode 100644 index 00000000..b06f2168 --- /dev/null +++ b/e2e/questionnaire-controles-numeriques.spec.ts @@ -0,0 +1,687 @@ +import { test, expect } from '@playwright/test'; +test('Questionnaire Controles Numériques', async ({ page }) => { + const jsonLunatic = '/static/questionnaire/numerique/form.json'; + const serveur = 'http://localhost:3000'; + await page.goto(serveur + '/visualize'); + + await page + .getByPlaceholder( + 'http://localhost:3000/static/questionnaire/simpsons/form.json' + ) + .fill(serveur + jsonLunatic); + await page.getByRole('button', { name: 'Visualiser', exact: true }).click(); + // Page 1 + await page.getByRole('button', { name: 'Commencer' }).click(); + //Page 2 + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 3 : Q1 + //tester avec une valeur supérieur à 100 + //tester avec une valeur inférieur à 0 + await page + .getByLabel( + '➡ 1. Saisie d’un entier compris entre 0 et 100 - sans controle hors format' + ) + .fill('-5'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre 0 et 100.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //tester avec une bonne valeur + await page + .getByLabel( + '➡ 1. Saisie d’un entier compris entre 0 et 100 - sans controle hors format' + ) + .fill('30'); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre 0 et 100.') + ).not.toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 4 :Q2 + //tester avec une valeur inférieur à 100 + await page + .getByLabel( + '➡ 2. Saisie d’un réel entre -100 et 100, 2 chiffres après virgule' + ) + .fill('-300'); + await expect(page.getByText('QREEL vaut : -300')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre -100.00 et 100.00.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //tester avec une bonne valeur + await page + .getByLabel( + '➡ 2. Saisie d’un réel entre -100 et 100, 2 chiffres après virgule' + ) + .fill('90.23'); + await expect(page.getByText('QREEL vaut : 90.23')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 5 : Q3 + //test avec mauvaise valeur mes1 + await page + .getByLabel( + '➡ 3. Test de supériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Si valeur supérieure à 5 message d’info. si superieur à 6 autre message' + ) + .fill('6'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('sup à 5') + ).toBeVisible(); + await expect( + page.getByText('superieur à 6', { exact: true }) + ).not.toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + //test avec mauvaise valeur mes2 + await page + .getByLabel( + '➡ 3. Test de supériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Si valeur supérieure à 5 message d’info. si superieur à 6 autre message' + ) + .fill('20'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('sup à 5') + ).toBeVisible(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('superieur à 6') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + // test avec bonne valeur + await page + .getByLabel( + '➡ 3. Test de supériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Si valeur supérieure à 5 message d’info. si superieur à 6 autre message' + ) + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 6 : Q4 + //TODO QUELQUE SOIT LA REPONSE ON DEMANDE TOUJOURS VOUS N'avez pas repondu à la question + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('vous n’avez pas répondu à la question') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByLabel('➡ 4. Test sur valeur numérique vide').fill('0'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 7 : Q5 + //test avec mauvaise valeur + await page + .getByLabel( + '➡ 5. Test d’infériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Message si valeur inférieure à 8' + ) + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('le nombre saisi est inférieur à 8') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('le nombre saisi est inférieur à 8') + ).toBeVisible(); + + // test avec bonne valeur + await page + .getByLabel( + '➡ 5. Test d’infériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Message si valeur inférieure à 8' + ) + .fill('20'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 8 : Q6 + //test avec mauvaise valeur + await page + .getByLabel( + '➡ 6. Test de supériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur supérieure à 5' + ) + .fill('5'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur saisie est supérieure ou égale à 5') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('la valeur saisie est supérieure ou égale à 5') + ).toBeVisible(); + // test avec bonne valeur + await page + .getByLabel( + '➡ 6. Test de supériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur supérieure à 5' + ) + .fill('2'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + // Page 9 : Q7 + //test avec mauvaise valeur + await page + .getByLabel( + '➡ 7. Test d’infériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur inférieure à 8' + ) + .fill('8'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur saisie est inférieure ou égale à 8') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur saisie est inférieure ou égale à 8') + ).toBeVisible(); + // test avec bonne valeur + await page + .getByLabel( + '➡ 7. Test d’infériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur inférieure à 8' + ) + .fill('9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 10 : Q8 + //test avec valeur egale à 4 + await page.getByLabel('➡ 8. Test d’égalité - Message si = 4').fill('4'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur est égale à 4') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect(page.getByText('la valeur est égale à 4')).toBeVisible(); + //test avec valeur inférieur à 0 + await page.getByLabel('➡ 8. Test d’égalité - Message si = 4').fill('-2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre 0 et 9.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre 0 et 9.') + ).toBeVisible(); + // test avec valeur non equal à 4 + await page.getByLabel('➡ 8. Test d’égalité - Message si = 4').fill('9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 11 : Q9 + await page.getByLabel('➡ 9. Test d’égalité à 0 - Message si = 0').fill('0'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur est zéro') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect(page.getByText('La valeur est zéro')).toBeVisible(); + //test avec valeur inférieur à 0 + await page.getByLabel('➡ 9. Test d’égalité à 0 - Message si = 0').fill('-2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre 0 et 9.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre 0 et 9.') + ).toBeVisible(); + // test avec une valeur entre 0 et 9 + await page.getByLabel('➡ 9. Test d’égalité à 0 - Message si = 0').fill('3'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 12 : Q10 + //valeur supérieur à la constante + await page + .getByLabel( + '➡ 10. Test d’un reel par rapport à une constante négative à virgule - test des positionnements par rapport à -4.51 (sup, inf, égal)' + ) + .fill('3'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur est supérieure à -4.51') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('la valeur est supérieure à -4.51', { exact: true }) + ).toBeVisible(); + // valeur inférieur à la constante + await page + .getByLabel( + '➡ 10. Test d’un reel par rapport à une constante négative à virgule - test des positionnements par rapport à -4.51 (sup, inf, égal)' + ) + .fill('-9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur est inférieure à -4.51') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('la valeur est inférieure à -4.51', { exact: true }) + ).toBeVisible(); + //valeur egale à la constante + await page + .getByLabel( + '➡ 10. Test d’un reel par rapport à une constante négative à virgule - test des positionnements par rapport à -4.51 (sup, inf, égal)' + ) + .fill('-4.51'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 13 :Q11 + //valeur supérieur à la constante + await page + .getByLabel( + '➡ 11. Test d’un réel par rapport à une constante positive décimale - test des positionnements par rapport à 4.51 (sup, inf, égal)' + ) + .fill('9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('superieur à 4.51') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('superieur à 4.51', { exact: true }) + ).toBeVisible(); + // valeur inférieur à la constante + await page + .getByLabel( + '➡ 11. Test d’un réel par rapport à une constante positive décimale - test des positionnements par rapport à 4.51 (sup, inf, égal)' + ) + .fill('3'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inferieur à 4.51') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('inferieur à 4.51', { exact: true }) + ).toBeVisible(); + //valeur egale à la constante + await page + .getByLabel( + '➡ 11. Test d’un réel par rapport à une constante positive décimale - test des positionnements par rapport à 4.51 (sup, inf, égal)' + ) + .fill('4.51'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 14 : Q12 + //valeur supérieur à la constante + await page + .getByLabel( + '➡ 12. Test d’un réel par rapport à une constante entière - test des positionnements par rapport à 4 (sup, égal)' + ) + .fill('9'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('superieur à 4') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect(page.getByText('superieur à 4', { exact: true })).toBeVisible(); + // valeur inférieur à la constante + await page + .getByLabel( + '➡ 12. Test d’un réel par rapport à une constante entière - test des positionnements par rapport à 4 (sup, égal)' + ) + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('inferieur à 4') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect(page.getByText('inferieur à 4', { exact: true })).toBeVisible(); + //valeur egale à la constante + await page + .getByLabel( + '➡ 12. Test d’un réel par rapport à une constante entière - test des positionnements par rapport à 4 (sup, égal)' + ) + .fill('4'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //page 15 : Q13 + await page + .getByLabel( + '➡ 13. Test d’un grand réel par rapport à une constante (max = 1000000000) - test des positionnements par rapport à 1000 - Personnalisation du message d’erreur avec la valeur (précision = 2, max = 1000000000)' + ) + .fill('222222222'); + await expect( + page.getByText('Affichage de 2* GRAND :444444444', { exact: true }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 13. Test d’un grand réel par rapport à une constante (max = 1000000000) - test des positionnements par rapport à 1000 - Personnalisation du message d’erreur avec la valeur (précision = 2, max = 1000000000)' + ) + .fill('1000000000'); + await expect( + page.getByText('Affichage de 2* GRAND :2000000000', { exact: true }) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page.getByText( + 'Les nombres sont QREL et QREL2 Leur somme vaut CALC_SOMME - Leur produit vaut CALC_PRODUIT - Leur différence vaut CALC_DIFFERENCE - Leur division vaut CALC_RATIO', + { exact: true } + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 17 : Q14 + await page + .getByLabel( + '➡ 14. Test sur ordre de deux variables - partie 1 - les contrôles portent sur la question suivante ' + ) + .fill('-101'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre -100.00 et 100.00.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre -100.00 et 100.00.', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 14. Test sur ordre de deux variables - partie 1 - les contrôles portent sur la question suivante ' + ) + .fill('101'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre -100.00 et 100.00.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre -100.00 et 100.00.', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 14. Test sur ordre de deux variables - partie 1 - les contrôles portent sur la question suivante ' + ) + .fill('7'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 18 : Q15 + await page + .getByLabel('➡ 15. Test sur ordre de deux variables - partie 2') + .fill('-101'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre -100.00 et 100.00.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre -100.00 et 100.00.', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel('➡ 15. Test sur ordre de deux variables - partie 2') + .fill('101'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur doit être comprise entre -100.00 et 100.00.') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur doit être comprise entre -100.00 et 100.00.', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel('➡ 15. Test sur ordre de deux variables - partie 2') + .fill('7'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('les deux nombres sont égaux') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('les deux nombres sont égaux', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel('➡ 15. Test sur ordre de deux variables - partie 2') + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('le premier nombre est supérieur') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('le premier nombre est supérieur', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel('➡ 15. Test sur ordre de deux variables - partie 2') + .fill('9.22'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('le premier nombre est inférieur') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('le premier nombre est inférieur', { + exact: true, + }) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Poursuivre' }).click(); + + //Page 19: Q16 + await expect( + page.getByText('rappel QREL2 : 9.22', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 16. Test entre un entier et un réel - saisir entre 0 et 100 - controle sur saisie > QREL2' + ) + .fill('12'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('saisie > QREL2') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('saisie > QREL2', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 16. Test entre un entier et un réel - saisir entre 0 et 100 - controle sur saisie > QREL2' + ) + .fill('2'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 20: Q17 + await expect( + page.getByText('QREL 7', { + exact: true, + }) + ).toBeVisible(); + await expect( + page.getByText('QREL2 9.22', { + exact: true, + }) + ).toBeVisible(); + await expect( + page.getByText('ratio calculé : 0.76', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 17. Test avec une variable calculée : le ratio - Saisissez une valeur pour la comparer à la division des deux nombres précédents' + ) + .fill('3'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Ratio différent') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('Ratio différent', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 17. Test avec une variable calculée : le ratio - Saisissez une valeur pour la comparer à la division des deux nombres précédents' + ) + .fill('0.76'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 21: Q18 + await expect( + page.getByText('QREL : 7', { + exact: true, + }) + ).toBeVisible(); + await expect( + page.getByText('QREL2 : 9.22', { + exact: true, + }) + ).toBeVisible(); + await expect( + page.getByText('somme calculée : 16.22', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 18. test avec une variable calculée : la somme - Saisissez une valeur pour la comparer à la somme des deux nombres précédents' + ) + .fill('11'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur saisie est inférieure à la somme') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('la valeur saisie est inférieure à la somme', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 18. test avec une variable calculée : la somme - Saisissez une valeur pour la comparer à la somme des deux nombres précédents' + ) + .fill('17'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La valeur saisie est supérieure à la somme') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('La valeur saisie est supérieure à la somme', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 18. test avec une variable calculée : la somme - Saisissez une valeur pour la comparer à la somme des deux nombres précédents' + ) + .fill('16.22'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 22 : 19 + await page + .getByLabel( + '➡ 19. Test avec une variable calculée : le produit - Saisissez une valeur pour la comparer au produit des deux nombres précédents' + ) + .fill('88'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('la valeur saisie est différente du produit') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('la valeur saisie est différente du produit', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 19. Test avec une variable calculée : le produit - Saisissez une valeur pour la comparer au produit des deux nombres précédents' + ) + .fill('65,54'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //TODO A REVOIR pourquoi ça ne se valide pas sur playwright alors que ça marche sur pogues stromae v2 + await page.getByRole('button', { name: 'Poursuivre' }).click(); + //Page 23 : Q20 + await page + .getByLabel( + '➡ 20. Test avec une variable calculée : la différence - Saisissez une valeur pour la comparer au produit des deux nombres précédents' + ) + .fill('99'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('Différence') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await expect( + page.getByText('Différence', { + exact: true, + }) + ).toBeVisible(); + await page + .getByLabel( + '➡ 20. Test avec une variable calculée : la différence - Saisissez une valeur pour la comparer au produit des deux nombres précédents' + ) + .fill('-2.22'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + + //tester le bouton retour et vérification que toutes les réponses sont sauvegardés + // valider le formulaire +}); diff --git a/e2e/questionnaire-sum-min-boucle-controles.spec.ts b/e2e/questionnaire-sum-min-boucle-controles.spec.ts new file mode 100644 index 00000000..d2048f24 --- /dev/null +++ b/e2e/questionnaire-sum-min-boucle-controles.spec.ts @@ -0,0 +1,60 @@ +import { test, expect } from '@playwright/test'; +test('QNONREG - sum, min dans une boucle et sur controle prénom et test filtre occurrence', async ({ + page, +}) => { + const jsonLunatic = '/static/questionnaire/sum-min/form.json'; + const serveur = 'http://localhost:3000'; + await page.goto(serveur + '/visualize'); + + await page + .getByPlaceholder( + 'http://localhost:3000/static/questionnaire/simpsons/form.json' + ) + .fill(serveur + jsonLunatic); + await page.getByRole('button', { name: 'Visualiser', exact: true }).click(); + await page.getByRole('button', { name: 'Commencer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 1. NB').fill('2'); + expect(await page.getByLabel('➡ 1. NB').inputValue()).toEqual('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(await page.getByRole('textbox').count()).toEqual(2); + await page.locator('#ksyjvi40-0').fill('AA'); + expect(await page.locator('#ksyjvi40-0').inputValue()).toEqual('AA'); + await page.locator('#ksyjvi40-1').fill('BB'); + expect(await page.locator('#ksyjvi40-1').inputValue()).toEqual('BB'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(await page.getByText('➡ 3. Age de l’individu : AA')).toBeVisible(); + await page.getByLabel('➡ 3. Age de l’individu : AA').fill('22'); + expect( + await page.getByLabel('➡ 3. Age de l’individu : AA').inputValue() + ).toEqual('22'); + expect(await page.getByText('IND_MAJEUR :1')).toBeVisible(); + expect(await page.getByText('AGE vaut : 22')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(await page.getByText('➡ 3. Age de l’individu : BB')).toBeVisible(); + await page.getByLabel('➡ 3. Age de l’individu : BB').fill('12'); + expect( + await page.getByLabel('➡ 3. Age de l’individu : BB').inputValue() + ).toEqual('12'); + expect(await page.getByText('IND_MAJEUR :0')).toBeVisible(); + expect(await page.getByText('AGE vaut : 12')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //TODO + expect(page.getByText('Affichage du nb de majeurs : 1')).toBeVisible(); + expect(page.getByText('Affichage du somme age : 34')).toBeVisible(); + expect( + page.getByText('Affichage du min des ages sans cast: 12') + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //DIVERS + expect(page.getByText('➡ 4. divers')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //TODO + expect(page.getByText('Affichage de la somme des ages : 34')).toBeVisible(); + expect(page.getByText('Affichage du nb de majeurs : 1')).toBeVisible(); + expect(page.getByText('Affichage du min des ages : 12')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); +}); diff --git a/e2e/questionnaires-controles-composants.spec.js b/e2e/questionnaires-controles-composants.spec.js new file mode 100644 index 00000000..30e9bde1 --- /dev/null +++ b/e2e/questionnaires-controles-composants.spec.js @@ -0,0 +1,1579 @@ +import { test, expect } from '@playwright/test'; + +test('Questionnaire Controles Composants', async ({ page }) => { + const jsonLunatic = '/static/questionnaire/tous-composants/form.json'; + const serveur = 'http://localhost:3000'; + await page.goto(serveur + '/visualize'); + + await page + .getByPlaceholder( + 'http://localhost:3000/static/questionnaire/simpsons/form.json' + ) + .fill(serveur + jsonLunatic); + await page.getByRole('button', { name: 'Visualiser', exact: true }).click(); + // expect(page.url()).toEqual(serveur + jsonLunatic); + await expect( + page.getByRole('heading', { + name: 'QNONREG - Questionnaire tous composants', + }) + ).toBeVisible(); + await expect(page.getByText('Début')).toBeVisible(); + await expect(page.getByText('Page de commencement générique.')).toBeVisible(); + // Page 1 + await page.getByRole('button', { name: 'Commencer' }).click(); + expect( + page.getByText('I - Questions ouvertes - Titre de la séquence') + ).toBeVisible(); + await expect( + page.getByText( + 'Ce module comprend les questions ouvertes. ​ Ceci est une déclaration de type consigne, associée au titre du module.' + ) + ).toBeVisible(); + //Page 2 + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 3 : Q1 + //tester avec une valeur supérieur à 100 + await expect( + page.getByText( + '➡ 1. Je suis le libellé de la question de type texte de longueur inférieure à 250 caractères' + ) + ).toBeVisible(); + await expect( + page.getByText( + 'So close no matter how far couldn’t be much more from the heart forever trust in who we are and nothing else matters
never opened myself this way life is ours, we live it our way all these words I don’t just say and nothing else matters
trust I seek and I find in you every day for us something new open mind for a different view and nothing else matters never cared for what they do never cared for what they know But I know so close no matter how far couldn’t be much more from the heart forever trusting who we are and nothing else matters never cared for what they do never cared for what they know And I know I never opened myself this way life is ours, we live it our way all these words I don’t just say and nothing else matters trust I seek and I find in you every day for us something new open mind for a different view and nothing else matters never cared for what they say never cared for games they play never cared for what they do' + ) + ).toBeVisible(); + await page + .getByLabel( + '➡ 1. Je suis le libellé de la question de type texte de longueur inférieure à 250 caractères' + ) + .fill('aaaaa'); + expect( + await page + .getByLabel( + '➡ 1. Je suis le libellé de la question de type texte de longueur inférieure à 250 caractères' + ) + .inputValue() + ).toEqual('aaaaa'); + expect( + ( + await page + .getByLabel( + '➡ 1. Je suis le libellé de la question de type texte de longueur inférieure à 250 caractères' + ) + .inputValue() + ).length + ).toEqual(5); + + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 4 :Q2 + await expect( + page.getByText( + '➡ 2. Je suis le libellé de la question de type texte de longueur supérieure à 250 caractères. Demain, dès l’aube, à l’heure où blanchit la campagne, Je partirai. Vois-tu, je sais que tu m’attends. J’irai par la forêt, j’irai par la montagne. Je ne puis demeurer loin de toi plus longtemps. Je marcherai les yeux fixés sur mes pensées, Sans rien voir au dehors, sans entendre aucun bruit, Seul, inconnu, le dos courbé, les mains croisées, Triste, et le jour pour moi sera comme la nuit. Je ne regarderai ni l’or du soir qui tombe, Ni les voiles au loin descendant vers Harfleur, Et quand j’arriverai, je mettrai sur ta tombe Un bouquet de houx vert et de bruyère en fleur.' + ) + ).toBeVisible(); + //tester avec une valeur supérieur à 100 + await page + .getByLabel( + '➡ 2. Je suis le libellé de la question de type texte de longueur supérieure à 250 caractères. Demain, dès l’aube, à l’heure où blanchit la campagne, Je partirai. Vois-tu, je sais que tu m’attends. J’irai par la forêt, j’irai par la montagne. Je ne puis demeurer loin de toi plus longtemps. Je marcherai les yeux fixés sur mes pensées, Sans rien voir au dehors, sans entendre aucun bruit, Seul, inconnu, le dos courbé, les mains croisées, Triste, et le jour pour moi sera comme la nuit. Je ne regarderai ni l’or du soir qui tombe, Ni les voiles au loin descendant vers Harfleur, Et quand j’arriverai, je mettrai sur ta tombe Un bouquet de houx vert et de bruyère en fleur.' + ) + .fill(Array(580).join('x')); + expect((await page.getByRole('textbox').inputValue()).length).toEqual(500); + await page + .getByLabel( + '➡ 2. Je suis le libellé de la question de type texte de longueur supérieure à 250 caractères.\rDemain, dès l’aube, à l’heure où blanchit la campagne,\rJe partirai. Vois-tu, je sais que tu m’attends. J’irai par la forêt, j’irai par la montagne. Je ne puis demeurer loin de toi plus longtemps.\rJe marcherai les yeux fixés sur mes pensées, Sans rien voir au dehors, sans entendre aucun bruit, Seul, inconnu, le dos courbé, les mains croisées, Triste, et le jour pour moi sera comme la nuit.\rJe ne regarderai ni l’or du soir qui tombe, Ni les voiles au loin descendant vers Harfleur, Et quand j’arriverai, je mettrai sur ta tombe Un bouquet de houx vert et de bruyère en fleur.Le champ de la réponse de type texte long est modifiable à la souris' + ) + .fill('aaaa'); + expect( + await page + .getByLabel( + '➡ 2. Je suis le libellé de la question de type texte de longueur supérieure à 250 caractères.\rDemain, dès l’aube, à l’heure où blanchit la campagne,\rJe partirai. Vois-tu, je sais que tu m’attends. J’irai par la forêt, j’irai par la montagne. Je ne puis demeurer loin de toi plus longtemps.\rJe marcherai les yeux fixés sur mes pensées, Sans rien voir au dehors, sans entendre aucun bruit, Seul, inconnu, le dos courbé, les mains croisées, Triste, et le jour pour moi sera comme la nuit.\rJe ne regarderai ni l’or du soir qui tombe, Ni les voiles au loin descendant vers Harfleur, Et quand j’arriverai, je mettrai sur ta tombe Un bouquet de houx vert et de bruyère en fleur.Le champ de la réponse de type texte long est modifiable à la souris' + ) + .inputValue() + ).toEqual('aaaa'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 5 : Q3 + await expect( + page.getByText('➡ 3. Numérique entier sans unité - grand (max= 999999999)') + ).toBeVisible(); + // test avec bonne valeur + await page + .getByLabel('➡ 3. Numérique entier sans unité - grand (max= 999999999)') + .fill('12'); + expect( + await page + .getByLabel('➡ 3. Numérique entier sans unité - grand (max= 999999999)') + .inputValue() + ).toEqual('12'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 6 : Q4 + await expect( + page.getByText('➡ 4. Numérique décimal sans unité (entre 0 et 1000.00)') + ).toBeVisible(); + await expect( + page.getByText('Controle par rapport à question 3 dont la valeur est :12') + ).toBeVisible(); + await page + .getByLabel('➡ 4. Numérique décimal sans unité (entre 0 et 1000.00)') + .fill('8'); + expect( + await page + .getByLabel('➡ 4. Numérique décimal sans unité (entre 0 et 1000.00)') + .inputValue() + ).toEqual('8'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 7 : Q5 + await expect( + page.getByText( + '➡ 5. Numérique max 9999 avec unité et infobulle sur le mot unité de cette question' + ) + ).toBeVisible(); + await page + .getByLabel( + '➡ 5. Numérique max 9999 avec unité et infobulle sur le mot unité de cette question' + ) + .fill('5'); + expect( + await page + .getByLabel( + '➡ 5. Numérique max 9999 avec unité et infobulle sur le mot unité de cette question' + ) + .inputValue() + ).toEqual('5'); + await expect(page.getByText('k€', { exact: true })).toBeVisible(); + + const uniteElement = await page.$('span.field-md'); + if (uniteElement) { + await uniteElement.hover(); + } else { + console.error('Unable to find uniteElement'); + } + await expect( + page.getByText( + 'l’unité choisie ici est le kilo euro mais je peux tester une infobulle un peu longue pour regarder' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByText('Autres formats de réponse')).toBeVisible(); + expect( + page.getByText( + 'Ce sous module comprend des questions de type : - date - durée - booléen' + ) + ); + //Page 8 + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 9 : Q6 + await expect(page.getByText('➡ 6. Date jour')).toBeVisible(); + //test avec mauvaise valeur + + await page.getByLabel('➡ 6. Date jour').fill('2020-05-01'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText( + 'La date saisie doit être comprise entre 2000-01-01 et 2020-03-31.' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page.getByLabel('➡ 6. Date jour').fill('2004-05-01'); + + await page.getByRole('button', { name: 'Continuer' }).click(); + // Page 9 : Q7 + expect(page.getByText('➡ 7. Booléen')); + await page.getByLabel('➡ 7. Booléen').check(); + expect(page.getByLabel('➡ 7. Booléen').isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page.getByText( + 'II - Questions à choix unique et questions à choix multiple' + ) + ).toBeVisible(); + // Page 10 + await page.getByRole('button', { name: 'Continuer' }).click(); + // Page 11 : Q8 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText('➡ 8. Question à choix unique / présentation bouton radio') + ).toBeVisible(); + await expect( + page.getByText('code1 : le libellé du code 1 contient du gras') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + ).toBeVisible(); + await expect( + page.getByText('code2 le libellé du code 2 contient de l’italique') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code3 : le libellé du code 3 contient du gras et de l’italique' + ) + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText('code4 : le libellé du code 4 contient du gras italique') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3' + ) + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + ).toBeVisible(); + await expect(page.getByText('code6')).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code6', + }) + ).toBeVisible(); + await expect( + page.getByText('code7 le code 7 porte une infobulle') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code7 le code 7 porte une infobulle', + }) + ).toBeVisible(); + await expect(page.getByText('code8')).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code8', + }) + ).toBeVisible(); + const code7 = await page.$('span.field-md'); + await code7.hover(); + expect(page.getByText('My name is Bond, James Bond')).toBeVisible(); + const radioBtn8 = await page.$('#lunatic-radio-jfjepz6i-6'); + await radioBtn8.check(); + expect(radioBtn8.isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 12 : Q9 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText( + '➡ 9. Question à choix unique - présentation case à cocher décochable' + ) + ).toBeVisible(); + await expect( + page.getByText('code1 : le libellé du code 1 contient du gras') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + ).toBeVisible(); + await expect( + page.getByText('code2 le libellé du code 2 contient de l’italique') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code3 : le libellé du code 3 contient du gras et de l’italique' + ) + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText('code4 : le libellé du code 4 contient du gras italique') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3' + ) + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + ).toBeVisible(); + await expect(page.getByText('code6')).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code6', + }) + ).toBeVisible(); + await expect( + page.getByText('code7 le code 7 porte une infobulle') + ).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code7 le code 7 porte une infobulle', + }) + ).toBeVisible(); + await expect(page.getByText('code8')).toBeVisible(); + await expect( + page.getByRole('radio', { + name: 'code8', + }) + ).toBeVisible(); + const thirdRadio = page.getByRole('radio', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }); + await page + .getByRole('radio', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + .click(); + await page + .getByRole('radio', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + .press('ArrowDown'); + await page + .getByRole('radio', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + .press('ArrowDown'); + await thirdRadio.press('Enter'); + expect(thirdRadio.isChecked()).toBeTruthy(); + const fifthRadio = await page.getByRole('radio', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }); + await fifthRadio.click(); + expect(fifthRadio.isChecked()).toBeTruthy(); + expect(await thirdRadio.isChecked()).toBeFalsy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 13 : Q10 + expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText( + '➡ 10. Question à choix unique - présentation images - non fonc Lunatic (Symboles en attendant) - besoin Conjoncture' + ) + ).toBeVisible(); + await expect(page.getByText('soleil')).toBeVisible(); + await expect(page.getByRole('radio', { name: 'soleil' })).toBeVisible(); + await expect(page.getByText('➘')).toBeVisible(); + await expect(page.getByRole('radio', { name: '➘' })).toBeVisible(); + await expect(page.getByText('➞')).toBeVisible(); + await expect(page.getByRole('radio', { name: '➞' })).toBeVisible(); + await expect(page.getByText('orage')).toBeVisible(); + await expect(page.getByRole('radio', { name: 'orage' })).toBeVisible(); + const fourthRadio = await page.$('#lunatic-radio-k6cc6f8r-4'); + await fourthRadio.check(); + expect(fourthRadio.isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Page 14 : Q11 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText( + '➡ 11. Question à choix unique - présentation liste déroulante' + ) + ).toBeVisible(); + await expect( + page + .getByRole('combobox', { + name: '➡ 11. Question à choix unique - présentation liste déroulante', + }) + .locator('div') + ).toBeVisible(); + const dropdown = await page.$('#jfjfae9f'); + await dropdown.click(); + + // sélectionner l'option "Allier" et cliquer dessus pour la choisir + const option = await page.$('text=Allier'); + await option.click(); + + // vérifier que l'option sélectionnée a bien le texte "Allier" + const selectedOption = await dropdown.$('.lunatic-combo-box-selected'); + const selectedOptionText = await selectedOption.textContent(); + expect(selectedOptionText.trim()).toEqual('Allier'); + await dropdown.click(); + const option2 = await page.$('text=Drôme'); + await option2.click(); + const selectedOptionText2 = await selectedOption.textContent(); + expect(selectedOptionText2.trim()).toEqual('Drôme'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 14 : Q12 + expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + //TODO AUTOCOMLETION + expect( + page.getByText( + '➡ 12. Question à choix unique - présentation autocomplétion, par TS' + ) + ).toBeVisible(); + + await page + .getByLabel( + '➡ 12. Question à choix unique - présentation autocomplétion, par TS' + ) + .fill('ok'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 15 : Q13 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText('➡ 13. Question à choix multiple - réponse booléen') + ).toBeVisible(); + await expect( + page.getByText('code1 : le libellé du code 1 contient du gras') + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + ).toBeVisible(); + await expect( + page.getByText('code2 le libellé du code 2 contient de l’italique') + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code3 : le libellé du code 3 contient du gras et de l’italique' + ) + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + ).toBeVisible(); + await expect( + page.getByText('code4 : le libellé du code 4 contient du gras italique') + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + ).toBeVisible(); + await expect( + page.getByText( + 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3' + ) + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + ).toBeVisible(); + await expect(page.getByText('code6')).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code6', + }) + ).toBeVisible(); + await expect( + page.getByText('code7 le code 7 porte une infobulle') + ).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code7 le code 7 porte une infobulle', + }) + ).toBeVisible(); + await expect(page.getByText('code8')).toBeVisible(); + await expect( + page.getByRole('checkbox', { + name: 'code8', + }) + ).toBeVisible(); + const radioBtnQ13_1 = await page.$('#lunatic-checkbox-jfkxh2lf-QCM_B1'); + const radioBtnQ13_5 = await page.$('#lunatic-checkbox-jfkxh2lf-QCM_B5'); + await radioBtnQ13_1.check(); + await radioBtnQ13_5.check(); + expect(await radioBtnQ13_1.isChecked()).toBeTruthy(); + expect(await radioBtnQ13_5.isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 16 : Q14 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText( + '➡ 14. Question à choix multiple - réponse oui/non case à cocher' + ) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 1' })).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 1' }) + .getByText('OuiNonNe sait pasSans objet') + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 1' }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 1' }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 1' }) + .getByRole('radio', { name: 'Ne sait pas' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 1' }) + .getByRole('radio', { name: 'Sans Objet' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 2' })).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 2' }) + .getByText('OuiNonNe sait pasSans objet') + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 2' }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 2' }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 2' }) + .getByRole('radio', { name: 'Ne sait pas' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 2' }) + .getByRole('radio', { name: 'Sans Objet' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 3' })).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 3' }) + .getByText('OuiNonNe sait pasSans objet') + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Ne sait pas' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Sans Objet' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 4' })).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 4' }) + .getByText('OuiNonNe sait pasSans objet') + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 4' }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 4' }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 4' }) + .getByRole('radio', { name: 'Ne sait pas' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 4' }) + .getByRole('radio', { name: 'Sans Objet' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 5' })).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 5' }) + .getByText('OuiNonNe sait pasSans objet') + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 5' }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 5' }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 5' }) + .getByRole('radio', { name: 'Ne sait pas' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { name: 'choix 5' }) + .getByRole('radio', { name: 'Sans Objet' }) + ).toBeVisible(); + const radioNesaisPasL1 = page + .getByRole('row', { name: 'choix 1' }) + .getByRole('radio', { name: 'Ne sait pas' }); + await radioNesaisPasL1.check(); + expect(await radioNesaisPasL1.isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //PAGE 17 : Q15 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText('➡ 15. Question à choix multiple - réponse oui/non radio') + ).toBeVisible(); + await expect( + page.getByRole('cell', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code1 : le libellé du code 1 contient du gras', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code2 le libellé du code 2 contient de l’italique', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code3 : le libellé du code 3 contient du gras et de l’italique', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code4 : le libellé du code 4 contient du gras italique', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'code6' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code6', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code6', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { name: 'code7 le code 7 porte une infobulle' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code7 le code 7 porte une infobulle', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code7 le code 7 porte une infobulle', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'code8' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code8', + }) + .getByRole('radio', { name: 'Oui' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'code8', + }) + .getByRole('radio', { name: 'Non' }) + ).toBeVisible(); + + const radioBtnQ15_1 = page + .getByRole('row', { name: 'code1 : le libellé du code 1 contient du gras' }) + .getByRole('radio', { name: 'Oui' }); + await radioBtnQ15_1.check(); + expect(await radioBtnQ15_1.isChecked()).toBeTruthy(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect(page.getByText('III - Tableaux')).toBeVisible(); + await expect(page.getByText('Ce module concerne les tableaux')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText( + '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER' + ) + ).toBeVisible(); + await expect( + page.getByRole('cell', { name: 'Nombre de personnes, entre 0 et 20' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'moins de 15' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'moins de 15 ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByLabel( + '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGERRappel de la valeur collectée INTEGER = 12' + ) + ).toBeVisible(); + await expect( + page.getByRole('cell', { name: 'de 16 à 17 ans' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'de 16 à 17 ans ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + ).toBeVisible(); + await expect( + page.getByRole('cell', { name: 'de 18 à 19 ans' }) + ).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'de 18 à 19 ans ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: '20 et plus' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: '20 et plus ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + ).toBeVisible(); + await page + .getByRole('row', { + name: 'moins de 15 ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByLabel( + '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGERRappel de la valeur collectée INTEGER = 12' + ) + .fill('3'); + await page + .getByRole('row', { + name: 'moins de 15 ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByLabel( + '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGERRappel de la valeur collectée INTEGER = 12' + ) + .fill('3'); + await page + .getByRole('row', { + name: 'de 16 à 17 ans ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .fill('4'); + await page + .getByRole('row', { + name: 'de 18 à 19 ans ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .fill('5'); + + await page + .getByRole('row', { + name: '20 et plus ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .fill('6'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText('La somme est supérieure au nombre collecté : 12') + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page + .getByRole('row', { + name: '20 et plus ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .fill('2'); + + await page + .getByRole('row', { + name: 'de 18 à 19 ans ➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .getByRole('textbox', { + name: '➡ 16. Tableau TIC - répartition du nb habitants, comparaison question INTEGER Rappel de la valeur collectée INTEGER = 12', + }) + .fill('1'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Q17 + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + await expect( + page.getByText('➡ 17. Tableau un axe simple, une mesure, sans unité') + ).toBeVisible(); + await expect( + page.getByRole('cell', { name: 'Mesure de type numérique' }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 1' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'choix 1 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByLabel( + '➡ 17. Tableau un axe simple, une mesure, sans unitéCOntrole sur somme des lignes > 100' + ) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 2' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'choix 2 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByRole('textbox', { + name: '➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 3' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'choix 3 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByRole('textbox', { + name: '➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 4' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'choix 4 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByRole('textbox', { + name: '➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + ).toBeVisible(); + await expect(page.getByRole('cell', { name: 'choix 5' })).toBeVisible(); + await expect( + page + .getByRole('row', { + name: 'choix 5 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByRole('textbox', { + name: '➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + ).toBeVisible(); + + await page + .getByRole('row', { + name: 'choix 1 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByLabel( + '➡ 17. Tableau un axe simple, une mesure, sans unitéCOntrole sur somme des lignes > 100' + ) + .fill('12'); + expect( + await page + .getByRole('row', { + name: 'choix 1 ➡ 17. Tableau un axe simple, une mesure, sans unité COntrole sur somme des lignes > 100', + }) + .getByLabel( + '➡ 17. Tableau un axe simple, une mesure, sans unitéCOntrole sur somme des lignes > 100' + ) + .inputValue() + ).toEqual('12'); + await page.getByRole('button', { name: 'Continuer' }).click(); + //Q18 + await page + .locator('#lunatic-table-td-jfkzpexn-0-1') + .getByLabel('➡ 18. Tableau un axe simple, plusieurs mesures, sans unité') + .fill('1'); + expect( + await page + .locator('#lunatic-table-td-jfkzpexn-0-1') + .getByLabel('➡ 18. Tableau un axe simple, plusieurs mesures, sans unité') + .inputValue() + ).toEqual('1'); + await page + .getByRole('row', { + name: 'choix 1 ➡ 18. Tableau un axe simple, plusieurs mesures, sans unité', + }) + .getByRole('radio', { name: 'Oui' }) + .click(); + await page + .getByRole('row', { + name: 'choix 1 ➡ 18. Tableau un axe simple, plusieurs mesures, sans unité', + }) + .getByRole('radio', { name: 'Oui' }) + .click(); + await page + .getByRole('row', { + name: 'choix 1 ➡ 18. Tableau un axe simple, plusieurs mesures, sans unité', + }) + .getByRole('radio', { name: 'Oui' }) + .click(); + await page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Oui' }) + .click(); + expect( + await page + .getByRole('row', { name: 'choix 3' }) + .getByRole('radio', { name: 'Oui' }) + .isChecked() + ).toBeTruthy(); + await page + .getByRole('row', { + name: 'choix 5 ➡ 18. Tableau un axe simple, plusieurs mesures, sans unité', + }) + .getByRole('radio', { name: 'Oui' }) + .click(); + + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page.getByText( + '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité' + ) + ).toBeVisible(); + await page + .locator('#lunatic-table-td-jfkzttm3-0-1') + .getByLabel('➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité') + .fill('1'); + + await page + .locator('#lunatic-table-td-jfkzttm3-1-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('12'); + + await page + .locator('#lunatic-table-td-jfkzttm3-2-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('13'); + + await page + .locator('#lunatic-table-td-jfkzttm3-3-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('14'); + + await page + .locator('#lunatic-table-td-jfkzttm3-4-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('15'); + + await page + .locator('#lunatic-table-td-jfkzttm3-5-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('16'); + + await page + .locator('#lunatic-table-td-jfkzttm3-6-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('17'); + + await page + .locator('#lunatic-table-td-jfkzttm3-7-1') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('18'); + + await page.locator('#lunatic-table-td-jfkzttm3-1-2 #jfkzttm3').fill('21'); + + await page + .locator('#lunatic-table-td-jfkzttm3-0-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('22'); + + await page + .locator('#lunatic-table-td-jfkzttm3-1-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('23'); + + await page + .locator('#lunatic-table-td-jfkzttm3-2-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('24'); + + await page + .locator('#lunatic-table-td-jfkzttm3-3-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('25'); + + await page + .locator('#lunatic-table-td-jfkzttm3-4-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('26'); + await page + .locator('#lunatic-table-td-jfkzttm3-5-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('27'); + await page + .locator('#lunatic-table-td-jfkzttm3-6-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('28'); + await page + .locator('#lunatic-table-td-jfkzttm3-7-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('29'); + + await page + .locator('#lunatic-table-td-jfkzttm3-5-2') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('27'); + + await page + .locator('#lunatic-table-td-jfkzttm3-0-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('3'); + await page + .locator('#lunatic-table-td-jfkzttm3-1-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('3'); + + await page + .locator('#lunatic-table-td-jfkzttm3-2-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('31'); + + await page + .locator('#lunatic-table-td-jfkzttm3-3-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('32'); + + await page + .locator('#lunatic-table-td-jfkzttm3-4-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('33'); + + await page + .locator('#lunatic-table-td-jfkzttm3-5-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('34'); + + await page + .locator('#lunatic-table-td-jfkzttm3-6-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('35'); + + await page + .locator('#lunatic-table-td-jfkzttm3-7-3') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('36'); + + await page + .locator('#lunatic-table-td-jfkzttm3-0-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('4'); + + await page + .locator('#lunatic-table-td-jfkzttm3-1-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('41'); + + await page + .locator('#lunatic-table-td-jfkzttm3-2-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('42'); + + await page + .locator('#lunatic-table-td-jfkzttm3-3-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('43'); + + await page + .locator('#lunatic-table-td-jfkzttm3-4-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('44'); + + await page + .locator('#lunatic-table-td-jfkzttm3-5-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('45'); + + await page + .locator('#lunatic-table-td-jfkzttm3-6-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('46'); + + await page + .locator('#lunatic-table-td-jfkzttm3-7-4') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('47'); + + await page + .locator('#lunatic-table-td-jfkzttm3-0-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('5'); + + await page + .locator('#lunatic-table-td-jfkzttm3-1-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('51'); + + await page + .locator('#lunatic-table-td-jfkzttm3-2-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('52'); + + await page + .locator('#lunatic-table-td-jfkzttm3-3-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('53'); + + await page + .locator('#lunatic-table-td-jfkzttm3-4-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('54'); + + await page + .locator('#lunatic-table-td-jfkzttm3-5-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('55'); + + await page + .locator('#lunatic-table-td-jfkzttm3-6-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('56'); + + await page + .locator('#lunatic-table-td-jfkzttm3-7-5') + .getByRole('textbox', { + name: '➡ 19. Tableau 2 axes - 1 mesure de type numérique, sans unité', + }) + .fill('57'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByRole('row', { + name: 'code1 code 1 1 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByLabel('➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité') + .fill('11'); + + await page + .getByRole('row', { + name: 'code 1 2 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByRole('textbox', { + name: '➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité', + }) + .fill('12'); + + await page + .getByRole('row', { + name: 'code2 code 2 1 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByRole('textbox', { + name: '➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité', + }) + .fill('21'); + + await page + .getByRole('row', { + name: 'code 2 2 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByRole('textbox', { + name: '➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité', + }) + .fill('22'); + await page + .getByRole('row', { + name: 'code 2 3 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByRole('textbox', { + name: '➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité', + }) + .fill('23'); + await page + .getByRole('row', { + name: 'code 3 ➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité k€', + }) + .getByRole('textbox', { + name: '➡ 20. Tableau 1 axe avec hiérarchie , 1 mesure, avec unité', + }) + .fill('30'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel( + '➡ 21. Tableau dynamique jusque 5 lignes, 2 mesures dont une unité A CREER' + ) + .fill('11'); + await page.locator('#main').click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel('➡ 22. Quel est votre prénom ?Controle sur prénom vide') + .click(); + await page + .getByLabel('➡ 22. Quel est votre prénom ?Controle sur prénom vide') + .press('CapsLock'); + await page + .getByLabel('➡ 22. Quel est votre prénom ?Controle sur prénom vide') + .fill('AAAAA'); + await page + .getByLabel('➡ 22. Quel est votre prénom ?Controle sur prénom vide') + .press('CapsLock'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 23. Quelle est votre adresse email ?').click(); + await page + .getByLabel('➡ 23. Quelle est votre adresse email ?') + .fill('a@gmail.com'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect(page.getByText('Description socio démo de AAAAA')).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //oui + expect( + page.getByText('➡ 24. Bonjour AAAAA, êtes vous majeur ?') + ).toBeVisible(); + await page.getByRole('radio', { name: 'Oui' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText('➡ 25. AAAAA, quelle est votre date de naissance ?') + ).toBeVisible(); + await page.locator('#main').click(); + await page + .getByLabel( + '➡ 25. AAAAA, quelle est votre date de naissance ?Format année : AAAAControle sur age et fait d’être majeurAGE calculé : null' + ) + .fill('2000-03-19'); + await page.locator('#main').click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + //cas homme + await page.getByRole('radio', { name: 'Homme' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page + .getByLabel( + '➡ 27. Question masquée par défaut, qui s’affiche lorsque l’individu coche majeurSi a coché Homme, la question 33 disparaitra' + ) + .click(); + await page + .getByLabel( + '➡ 27. Question masquée par défaut, qui s’affiche lorsque l’individu coche majeurSi a coché Homme, la question 33 disparaitra' + ) + .fill("ok c'est noté"); + await page.getByRole('button', { name: 'Continuer' }).click(); + //cas femme + await page.getByRole('button', { name: 'Retour' }).click(); + await page.getByRole('button', { name: 'Retour' }).click(); + await page.getByRole('radio', { name: 'Femme' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText( + '➡ 28. Question affichée par défaut, filtrée si l’individu est un homme' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + expect( + page.getByText('V - PERSO - Composition du ménage - boucle type logement') + ); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect(page.getByRole('button', { name: 'Continuer' })).toBeVisible(); + await expect(page.getByRole('button', { name: 'Retour' })).toBeVisible(); + expect(page.getByText('Description de votre ménage')); + expect( + page.getByText( + 'Nous allons maintenant décrire les personnes qui vivent avec madameAAAAA' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Continuer' }).click(); + + await page + .getByLabel( + '➡ 29. Combien de personnes vivent dans votre logement, y compris vous ?' + ) + .click(); + await page + .getByLabel( + '➡ 29. Combien de personnes vivent dans votre logement, y compris vous ?' + ) + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 30. Combien avez vous d’enfants à charge ?').click(); + await page + .getByLabel('➡ 30. Combien avez vous d’enfants à charge ?') + .fill('5'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText( + 'le ménage doit comporter au moins un adulte. Vous en déclarez -3' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page + .getByLabel('➡ 30. Combien avez vous d’enfants à charge ?') + .fill('2'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await expect( + page + .getByRole('dialog', { name: 'Des points requièrent votre attention.' }) + .getByText( + 'le ménage doit comporter au moins un adulte. Vous en déclarez 0' + ) + ).toBeVisible(); + await page.getByRole('button', { name: 'Corriger ma réponse' }).click(); + await page + .getByLabel( + '➡ 30. Combien avez vous d’enfants à charge ?Controle sur nb enfantsNb adultes : 0' + ) + .click(); + await page + .getByLabel( + '➡ 30. Combien avez vous d’enfants à charge ?Controle sur nb enfantsNb adultes : 0' + ) + .fill('1'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByLabel('➡ 31. Nom').first().click(); + await page.getByLabel('➡ 31. Nom').first().press('CapsLock'); + await page.getByLabel('➡ 31. Nom').first().fill('AAA'); + await page.getByLabel('➡ 31. Nom').nth(1).click(); + await page.getByLabel('➡ 31. Nom').nth(1).fill('BBB'); + await page.getByLabel('➡ 32. Age entre 0 et 100').first().click(); + await page.getByLabel('➡ 32. Age entre 0 et 100').first().fill('18'); + await page.getByLabel('➡ 32. Age entre 0 et 100').nth(1).click(); + await page.getByLabel('➡ 32. Age entre 0 et 100').nth(1).fill('19'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText('➡ 33. AAA, quelle est votre taille en centimètres ?') + ).toBeVisible(); + await page + .getByLabel( + '➡ 33. AAA, quelle est votre taille en centimètres ?Controle sur taille - si taille < 80' + ) + .click(); + await page + .getByLabel( + '➡ 33. AAA, quelle est votre taille en centimètres ?Controle sur taille - si taille < 80' + ) + .fill('175'); + await page.getByRole('button', { name: 'Continuer' }).click(); + expect( + page.getByText('➡ 33. BBB, quelle est votre taille en centimètres ?') + ).toBeVisible(); + await page + .getByLabel( + '➡ 33. BBB, quelle est votre taille en centimètres ?Controle sur taille - si taille < 80' + ) + .click(); + await page + .getByLabel( + '➡ 33. BBB, quelle est votre taille en centimètres ?Controle sur taille - si taille < 80' + ) + .fill('158'); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.locator('#main').click(); + await page.getByRole('button', { name: 'Continuer' }).click(); + await page.getByRole('button', { name: 'Continuer' }).click(); +}); diff --git a/package.json b/package.json index 08cb7ae3..5d7672f4 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "devDependencies": { "@commitlint/cli": "^17.1.2", "@commitlint/config-conventional": "^17.1.0", + "@playwright/test": "^1.35.1", "@welldone-software/why-did-you-render": "^6.2.3", "copy-and-watch": "^0.1.5", "eslint": "^8.12.0", diff --git a/playwright.config.ts b/playwright.config.ts new file mode 100644 index 00000000..7d5a589e --- /dev/null +++ b/playwright.config.ts @@ -0,0 +1,77 @@ +import { defineConfig, devices } from '@playwright/test'; + +/** + * Read environment variables from file. + * https://github.com/motdotla/dotenv + */ +// require('dotenv').config(); + +/** + * See https://playwright.dev/docs/test-configuration. + */ +export default defineConfig({ + testDir: './e2e', + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'html', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + // baseURL: 'http://127.0.0.1:3000', + + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry', + }, + + /* Configure projects for major browsers */ + projects: [ + // { + // name: 'chromium', + // use: { ...devices['Desktop Chrome'] }, + // }, + + { + name: 'firefox', + use: { ...devices['Desktop Firefox'] }, + }, + + // { + // name: 'webkit', + // use: { ...devices['Desktop Safari'] }, + // }, + + /* Test against mobile viewports. */ + // { + // name: 'Mobile Chrome', + // use: { ...devices['Pixel 5'] }, + // }, + // { + // name: 'Mobile Safari', + // use: { ...devices['iPhone 12'] }, + // }, + + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], + + /* Run your local dev server before starting the tests */ + // webServer: { + // command: 'npm run start', + // url: 'http://127.0.0.1:3000', + // reuseExistingServer: !process.env.CI, + // }, +}); diff --git a/public/static/questionnaire/boucle-fixe/form.json b/public/static/questionnaire/boucle-fixe/form.json new file mode 100644 index 00000000..4652daa0 --- /dev/null +++ b/public/static/questionnaire/boucle-fixe/form.json @@ -0,0 +1,916 @@ +{ + "cleaning": { "Q1": { "Q2": "(Q1= \"A\")" } }, + "variables": [ + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "COMMENT_QE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "PRENOM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "Q1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "Q2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "P1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "P2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NB" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "PRENOM2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "AGE" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_PRENOM", + "inFilter": "false", + "shapeFrom": "PRENOM" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_Q1", + "inFilter": "false", + "shapeFrom": "Q1" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["Q1"], + "expression": { "type": "VTL", "value": "(Q1= \"A\")" }, + "name": "FILTER_RESULT_Q2", + "inFilter": "false", + "shapeFrom": "Q1" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_P1", + "inFilter": "false", + "shapeFrom": "P1" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_P2", + "inFilter": "false", + "shapeFrom": "P1" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NB", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_PRENOM2", + "inFilter": "false", + "shapeFrom": "PRENOM2" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_AGE", + "inFilter": "false", + "shapeFrom": "AGE" + } + ], + "components": [ + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "components": [ + { + "componentType": "Subsequence", + "goToPage": "2", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + "subSequence": { + "id": "l7g7ou85", + "page": "2", + "label": { "type": "VTL|MD", "value": "SS11" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7g7ou85", + "page": "2", + "label": { "type": "VTL|MD", "value": "SS11" } + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM"], + "controls": [ + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Prénom est vide\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(PRENOM,\"\")=\"\")" + }, + "id": "l7g7tek6-CI-0" + } + ], + "response": { "name": "PRENOM" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + "subSequence": { + "id": "l7g7ou85", + "page": "2", + "label": { "type": "VTL|MD", "value": "SS11" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7g7tek6", + "page": "2", + "label": { "type": "VTL|MD", "value": "\"➡ 1. \" || \"PRENOM\"" }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7g7tek6-lfgkfl45", + "label": { + "type": "VTL|MD", + "value": "\"Ajout d’un contrôle sur prénom vide\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + } + ], + "bindingDependencies": ["PRENOM"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7pusaki", + "page": "2", + "label": { "type": "VTL|MD", "value": "Ajoute un prénom" }, + "lines": { + "min": { "type": "VTL", "value": "1" }, + "max": { "type": "VTL", "value": "4" } + } + }, + { + "paginatedLoop": true, + "componentType": "Loop", + "loopDependencies": ["PRENOM"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["PRENOM"], + "goToPage": "3.1", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + "subSequence": { + "id": "l7g7lnew", + "page": "3.1", + "label": { "type": "VTL|MD", "value": "SS12" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7g7lnew", + "label": { "type": "VTL|MD", "value": "SS12" } + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM", "Q1"], + "controls": [ + { + "bindingDependencies": ["Q1"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"Q1 est vide\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(Q1,\"\")=\"\")" }, + "id": "kx05sq4y-CI-0" + } + ], + "response": { "name": "Q1" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + "subSequence": { + "id": "l7g7lnew", + "page": "3.1", + "label": { "type": "VTL|MD", "value": "SS12" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kx05sq4y", + "page": "3.1", + "label": { + "type": "VTL|MD", + "value": "\"➡ 2. \" || \"Q1 de \" || PRENOM" + }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "HELP", + "id": "kx05sq4y-lciynl4d", + "label": { + "type": "VTL|MD", + "value": "\"Filtre pour affichage de Q2 : Q2 affichée si Q1 = A, donc à tester\"" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kx05sq4y-lfgkbdvi", + "label": { + "type": "VTL|MD", + "value": "\"Contrôle sur Q1 vide\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM", "Q2"], + "response": { "name": "Q2" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + }, + "subSequence": { + "id": "l7g7lnew", + "page": "3.1", + "label": { "type": "VTL|MD", "value": "SS12" } + } + }, + "conditionFilter": { + "bindingDependencies": ["Q1"], + "type": "VTL", + "value": "(Q1= \"A\")" + }, + "id": "kx06v7yq", + "page": "3.2", + "label": { + "type": "VTL|MD", + "value": "\"➡ 3. \" || \"Affichage de Q2 si Q1 = A - rappel du prénom : \" || PRENOM" + }, + "mandatory": false, + "maxLength": 249 + } + ], + "bindingDependencies": ["PRENOM", "Q1", "Q2"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"S1 - boucle liée de 1 à max 4 avec un nb inconnu au début\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7puyos3", + "page": "3", + "maxPage": "2", + "iterations": { "type": "VTL", "value": "count(PRENOM)" } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "components": [ + { + "componentType": "Subsequence", + "goToPage": "5", + "hierarchy": { + "sequence": { + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + }, + "subSequence": { + "id": "l7puoovt", + "page": "5", + "label": { "type": "VTL|MD", "value": "Decrire le produit" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7puoovt", + "page": "5", + "label": { "type": "VTL|MD", "value": "Decrire le produit" }, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7puoovt-l7pv1nnm", + "label": { + "type": "VTL|MD", + "value": "\"on décrit un produit\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["P1"], + "controls": [ + { + "bindingDependencies": ["P1"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"P1 est vide\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(P1,\"\")=\"\")" }, + "id": "l7pu8g5e-CI-0" + } + ], + "response": { "name": "P1" }, + "hierarchy": { + "sequence": { + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + }, + "subSequence": { + "id": "l7puoovt", + "page": "5", + "label": { "type": "VTL|MD", "value": "Decrire le produit" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7pu8g5e", + "page": "5", + "label": { + "type": "VTL|MD", + "value": "\"➡ 4. \" || \"Décrire un produit\"" + }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7pu8g5e-lfgmlc9s", + "label": { + "type": "VTL|MD", + "value": "\"Contrôle sur P1 vide\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["P2"], + "response": { "name": "P2" }, + "hierarchy": { + "sequence": { + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + }, + "subSequence": { + "id": "l7puoovt", + "page": "5", + "label": { "type": "VTL|MD", "value": "Decrire le produit" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7pu5agy", + "page": "5", + "label": { + "type": "VTL|MD", + "value": "\"➡ 5. \" || \"Avis sur produit\"" + }, + "mandatory": false, + "maxLength": 249 + } + ], + "bindingDependencies": ["P1", "P2"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "l7puc9t3", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "\"II - \" || \"S2 - boucle type conjoncture, de 1 à 4, ne sera pas liée\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7puibqj", + "page": "5", + "label": { "type": "VTL|MD", "value": "Ajouter un produit" }, + "lines": { + "min": { "type": "VTL", "value": "1" }, + "max": { "type": "VTL", "value": "4" } + } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(NB)) and (0>NB or 100NB)" + }, + "id": "kwupqy19-format-decimal" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { "type": "VTL|MD", "value": "\"➡ 6. \" || \"NB\"" }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kwupqy19-kx09g78a", + "label": { + "type": "VTL|MD", + "value": "\"on vérifie que la formule cast-string-NB est ok :\" || cast(NB,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["NB"], + "min": 0, + "response": { "name": "NB" }, + "decimals": 0, + "id": "kwupqy19", + "page": "7" + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "loopDependencies": ["NB"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["NB"], + "goToPage": "8", + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + }, + "subSequence": { + "id": "kx061cac", + "page": "8", + "label": { "type": "VTL|MD", "value": "SS31" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kx061cac", + "page": "8", + "label": { "type": "VTL|MD", "value": "SS31" } + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM2", "NB"], + "response": { "name": "PRENOM2" }, + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + }, + "subSequence": { + "id": "kx061cac", + "page": "8", + "label": { "type": "VTL|MD", "value": "SS31" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kwupruv2", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"➡ 7. \" || \"PRENOM\"" }, + "mandatory": false, + "maxLength": 249 + } + ], + "bindingDependencies": ["NB", "PRENOM2"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7pv0z7b", + "page": "8", + "lines": { + "min": { "type": "VTL", "value": "nvl(NB,1)" }, + "max": { "type": "VTL", "value": "nvl(NB,1)" } + } + }, + { + "paginatedLoop": true, + "componentType": "Loop", + "loopDependencies": ["PRENOM2"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["PRENOM2"], + "goToPage": "9.1", + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + }, + "subSequence": { + "id": "kx09u145", + "page": "9.1", + "label": { "type": "VTL|MD", "value": "SS32" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kx09u145", + "label": { "type": "VTL|MD", "value": "SS32" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 99.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(AGE)) and (0>AGE or 99AGE)" + }, + "id": "kx05rmm0-format-decimal" + }, + { + "bindingDependencies": ["AGE"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"AGE est vide\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(AGE,\"\")=\"\")" }, + "id": "kx05rmm0-CI-0" + } + ], + "max": 99, + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + }, + "subSequence": { + "id": "kx09u145", + "page": "9.1", + "label": { "type": "VTL|MD", "value": "SS32" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 8. \" || \"AGE de \" || PRENOM2" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kx05rmm0-lfgmwbpy", + "label": { + "type": "VTL|MD", + "value": "\"Contrôle sur AGE vide\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["PRENOM2", "AGE"], + "min": 0, + "response": { "name": "AGE" }, + "decimals": 0, + "id": "kx05rmm0", + "page": "9.1" + } + ], + "bindingDependencies": ["PRENOM2", "AGE"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kx06a9lq", + "page": "6", + "label": { + "type": "VTL|MD", + "value": "\"III - \" || \"S3 - boucle N occurrences, N collecté en premier, type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7puvvpz", + "page": "9", + "maxPage": "1", + "iterations": { "type": "VTL", "value": "count(PRENOM2)" } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "10", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-SEQ", + "page": "10", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + }, + { + "componentType": "Textarea", + "bindingDependencies": ["COMMENT_QE"], + "response": { "name": "COMMENT_QE" }, + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "10", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-QUESTION", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\"" + }, + "mandatory": false, + "maxLength": 2000 + } + ], + "pagination": "question", + "resizing": { + "NB": { "variables": ["PRENOM2", "AGE"], "size": "nvl(NB,1)" }, + "PRENOM": { "variables": ["Q1", "Q2"], "size": "count(PRENOM)" } + }, + "label": { + "type": "VTL|MD", + "value": "QNONREG - tous types boucle nombre variable ou fixe (min=max) - ok" + }, + "lunaticModelVersion": "2.3.1", + "modele": "TESTANNE", + "enoCoreVersion": "2.4.1", + "generatingDate": "05-05-2023 09:46:31", + "missing": false, + "id": "kx0a2hn8", + "maxPage": "11" +} diff --git a/public/static/questionnaire/boucle-liees/form.json b/public/static/questionnaire/boucle-liees/form.json new file mode 100644 index 00000000..8c00d688 --- /dev/null +++ b/public/static/questionnaire/boucle-liees/form.json @@ -0,0 +1,728 @@ +{ + "cleaning": {}, + "variables": [ + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "COMMENT_QE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "LOGENQ" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "LOGAUT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NBHAB" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "PRENOM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "Q1INDIV" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "Q2INDIV" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "MONTANTINDIV" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "FIN" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_LOGENQ", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_LOGAUT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NBHAB", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_PRENOM", + "inFilter": "false", + "shapeFrom": "PRENOM" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_Q1INDIV", + "inFilter": "false", + "shapeFrom": "Q1INDIV" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_Q2INDIV", + "inFilter": "false", + "shapeFrom": "Q1INDIV" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_MONTANTINDIV", + "inFilter": "false", + "shapeFrom": "Q1INDIV" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_FIN", + "inFilter": "false" + } + ], + "components": [ + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + { + "componentType": "Radio", + "bindingDependencies": ["LOGENQ"], + "response": { "name": "LOGENQ" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "options": [ + { "label": { "type": "VTL|MD", "value": "\"Oui\"" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "\"Non\"" }, "value": "2" } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyiqf4wp", + "page": "2", + "label": { + "type": "VTL|MD", + "value": "\"➡ 1. \" || \"LOGENQ : déclenchera controle si LOGAUT = oui et LOGENT = Oui\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kyiqf4wp-lfm956z0", + "label": { "type": "VTL|MD", "value": "\"LOGENQ : \" || LOGENQ" }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["LOGAUT"], + "controls": [ + { + "bindingDependencies": ["LOGENQ", "LOGAUT"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Vous avez indiqué avoir deux résidences principales, pouvez-vous corriger l’une de vos réponses ?\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not((nvl(LOGENQ,\" \")=\"1\") and (nvl(LOGAUT,\" \")=\"1\"))" + }, + "id": "kyiqiyjr-CI-0" + } + ], + "response": { "name": "LOGAUT" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "options": [ + { "label": { "type": "VTL|MD", "value": "\"Oui\"" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "\"Non\"" }, "value": "2" } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyiqiyjr", + "page": "3", + "label": { + "type": "VTL|MD", + "value": "\"➡ 2. \" || \"LOGAUT : déclenche controle si LOGAUT = oui et LOGENT = Oui\"" + }, + "mandatory": false + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 1 et 10.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(NBHAB)) and (1>NBHAB or 10NBHAB)" + }, + "id": "kyn3wfvd-format-decimal" + }, + { + "bindingDependencies": ["NBHAB"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"supérieur à 5\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(NBHAB,0) > 5)" }, + "id": "kyn3wfvd-CI-0" + } + ], + "max": 10, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 3. \" || \"NBHAB : controle si > 5\"" + }, + "mandatory": false, + "bindingDependencies": ["NBHAB"], + "min": 1, + "response": { "name": "NBHAB" }, + "decimals": 0, + "id": "kyn3wfvd", + "page": "4" + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "loopDependencies": ["NBHAB"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["NBHAB"], + "goToPage": "5", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn4090i", + "page": "5", + "label": { "type": "VTL|MD", "value": "Prénom" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn4090i", + "page": "5", + "label": { "type": "VTL|MD", "value": "Prénom" } + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM", "NBHAB"], + "controls": [ + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"prénom = A\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(PRENOM = \"A\")" }, + "id": "kyn41vx2-CI-0" + }, + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Prenom est vide\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(isnull(PRENOM))" }, + "id": "kyn41vx2-CI-1" + } + ], + "response": { "name": "PRENOM" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn4090i", + "page": "5", + "label": { "type": "VTL|MD", "value": "Prénom" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn41vx2", + "page": "5", + "label": { "type": "VTL|MD", "value": "\"➡ 4. \" || \"Prénom\"" }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "HELP", + "id": "kyn41vx2-l7j11vrz", + "label": { + "type": "VTL|MD", + "value": "\"Deux controles sur le prénom : un sur le vide et sur Prénom = A\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + } + ], + "bindingDependencies": ["NBHAB", "PRENOM"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn3scy8", + "page": "5", + "lines": { + "min": { "type": "VTL", "value": "NBHAB" }, + "max": { "type": "VTL", "value": "NBHAB" } + } + }, + { + "paginatedLoop": true, + "componentType": "Loop", + "loopDependencies": ["PRENOM"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["PRENOM"], + "goToPage": "6.1", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn43dhb", + "page": "6.1", + "label": { "type": "VTL|MD", "value": "Boucles" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn43dhb", + "label": { "type": "VTL|MD", "value": "Boucles" } + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["PRENOM", "Q1INDIV"], + "controls": [ + { + "bindingDependencies": ["Q1INDIV"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Remplir Q1 INDIV\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(isnull(Q1INDIV) or Q1INDIV=\"\")" + }, + "id": "kyn48ve5-CI-0" + } + ], + "response": { "name": "Q1INDIV" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn43dhb", + "page": "6.1", + "label": { "type": "VTL|MD", "value": "Boucles" } + } + }, + "options": [ + { "label": { "type": "VTL|MD", "value": "\"Oui\"" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "\"Non\"" }, "value": "2" } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn48ve5", + "page": "6.1", + "label": { + "type": "VTL|MD", + "value": "\"➡ 5. \" || \"Q1 de \" || PRENOM" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kyn48ve5-kyo4yga9", + "label": { + "type": "VTL|MD", + "value": "\"Controle si Q1INDIV vide\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Radio", + "bindingDependencies": ["PRENOM", "Q2INDIV"], + "controls": [ + { + "bindingDependencies": ["Q1INDIV", "Q2INDIV", "PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Q1 et Q2 de \" || PRENOM || \" incompatibles\" " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(Q1INDIV,\"\") = \"1\" and nvl(Q2INDIV,\"\")=\"1\")" + }, + "id": "kyn413gz-CI-0" + } + ], + "response": { "name": "Q2INDIV" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn43dhb", + "page": "6.1", + "label": { "type": "VTL|MD", "value": "Boucles" } + } + }, + "options": [ + { "label": { "type": "VTL|MD", "value": "\"Oui\"" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "\"Non\"" }, "value": "2" } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn413gz", + "page": "6.2", + "label": { + "type": "VTL|MD", + "value": "\"➡ 6. \" || \"Q2 de \" || PRENOM" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kyn413gz-l8udcein", + "label": { + "type": "VTL|MD", + "value": "\" controle si Q1 = 1 et Q2 = 1\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(MONTANTINDIV)) and (0>MONTANTINDIV or 100MONTANTINDIV)" + }, + "id": "kyo4bj5g-format-decimal" + }, + { + "bindingDependencies": ["MONTANTINDIV"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"inférieur à 10\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(MONTANTINDIV < 10)" }, + "id": "kyo4bj5g-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyn43dhb", + "page": "6.1", + "label": { "type": "VTL|MD", "value": "Boucles" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 7. \" || \"Montant entre 0 et 100 pour l’individu \" || PRENOM" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kyo4bj5g-l7izilib", + "label": { + "type": "VTL|MD", + "value": "\"Contrôles : un vérifie que saisie inférieure à 10 \"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["PRENOM", "MONTANTINDIV"], + "min": 0, + "response": { "name": "MONTANTINDIV" }, + "decimals": 0, + "id": "kyo4bj5g", + "page": "6.3" + } + ], + "bindingDependencies": ["PRENOM", "Q1INDIV", "Q2INDIV", "MONTANTINDIV"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyn3zwkg", + "page": "6", + "maxPage": "3", + "iterations": { "type": "VTL", "value": "count(PRENOM)" } + }, + { + "componentType": "Subsequence", + "goToPage": "7", + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyo2vhbm", + "page": "7", + "label": { "type": "VTL|MD", "value": "Autre" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyo2vhbm", + "label": { "type": "VTL|MD", "value": "Autre" } + }, + { + "componentType": "Input", + "bindingDependencies": ["FIN"], + "response": { "name": "FIN" }, + "hierarchy": { + "sequence": { + "id": "kwupyhsh", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S1\"" } + }, + "subSequence": { + "id": "kyo2vhbm", + "page": "7", + "label": { "type": "VTL|MD", "value": "Autre" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kyo2xe36", + "page": "7", + "label": { "type": "VTL|MD", "value": "\"➡ 8. \" || \"FIN \"" }, + "mandatory": false, + "maxLength": 249 + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-SEQ", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + }, + { + "componentType": "Textarea", + "bindingDependencies": ["COMMENT_QE"], + "response": { "name": "COMMENT_QE" }, + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-QUESTION", + "page": "9", + "label": { + "type": "VTL|MD", + "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\"" + }, + "mandatory": false, + "maxLength": 2000 + } + ], + "pagination": "question", + "resizing": { + "NBHAB": { + "variables": ["PRENOM", "Q1INDIV", "Q2INDIV", "MONTANTINDIV"], + "size": "NBHAB" + } + }, + "label": { + "type": "VTL|MD", + "value": "QNONREG - Controles intervariables dans boucles liées - ok" + }, + "lunaticModelVersion": "2.3.1", + "modele": "TESTANNE", + "enoCoreVersion": "2.4.1", + "generatingDate": "24-04-2023 09:15:35", + "missing": false, + "id": "l7j0wwqx", + "maxPage": "9" +} diff --git a/public/static/questionnaire/numerique/form.json b/public/static/questionnaire/numerique/form.json new file mode 100644 index 00000000..2232221b --- /dev/null +++ b/public/static/questionnaire/numerique/form.json @@ -0,0 +1,2394 @@ +{ + "cleaning": {}, + "variables": [ + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "COMMENT_QE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "REEL" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM3" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM4" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM5" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM6" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUM7" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "REEL1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "REEL2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "REEL3" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "GRAND" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QREL" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QREL2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QNUMBIS" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QRATIO" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QSOMME" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QPRODUIT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QDIFFERENCE" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_REEL", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM1", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM2", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM3", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM4", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM5", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM6", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUM7", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_REEL1", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_REEL2", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_REEL3", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_GRAND", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QREL", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QREL2", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QNUMBIS", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QRATIO", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QSOMME", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QPRODUIT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QDIFFERENCE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["QREL", "QREL2"], + "expression": { + "type": "VTL", + "value": "round(nvl(QREL,0)+ nvl(QREL2,0),2)" + }, + "name": "CALC_SOMME", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["QREL", "QREL2"], + "expression": { + "type": "VTL", + "value": "round(nvl(QREL,0) * nvl(QREL2,0),2)" + }, + "name": "CALC_PRODUIT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["QREL", "QREL2"], + "expression": { + "type": "VTL", + "value": "round(nvl(QREL,0) - nvl(QREL2,0),2)" + }, + "name": "CALC_DIFFERENCE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["QREL", "QREL2"], + "expression": { + "type": "VTL", + "value": "round(nvl(QREL,0) / nvl(QREL2,0),2)" + }, + "name": "CALC_RATIO", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["GRAND"], + "expression": { "type": "VTL", "value": "nvl(GRAND,0)*2" }, + "name": "GRAND2", + "inFilter": "false" + } + ], + "components": [ + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + { + "componentType": "Subsequence", + "goToPage": "2", + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "l7u9bv18", + "page": "2", + "label": { "type": "VTL|MD", "value": "CONTROLES FORMAT" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7u9bv18", + "label": { "type": "VTL|MD", "value": "CONTROLES FORMAT" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM)) and (0>QNUM or 100QNUM)" + }, + "id": "l7u993fh-format-decimal" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "l7u9bv18", + "page": "2", + "label": { "type": "VTL|MD", "value": "CONTROLES FORMAT" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 1. \" || \"Saisie d’un entier compris entre 0 et 100 - sans controle hors format\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7u993fh-l7u9l1hx", + "label": { + "type": "VTL|MD", + "value": "\"QNUM vaut : \" || cast(QNUM,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM"], + "min": 0, + "response": { "name": "QNUM" }, + "decimals": 0, + "id": "l7u993fh", + "page": "2" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(REEL)) and (-100.00>REEL or 100.00REEL)" + }, + "id": "l7u9owg3-format-decimal" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "l7u9bv18", + "page": "2", + "label": { "type": "VTL|MD", "value": "CONTROLES FORMAT" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 2. \" || \"Saisie d’un réel entre -100 et 100, 2 chiffres après virgule\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7u9owg3-l7u9vd4u", + "label": { + "type": "VTL|MD", + "value": "\"QREEL vaut : \" || cast(REEL,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["REEL"], + "min": -100, + "response": { "name": "REEL" }, + "decimals": 2, + "id": "l7u9owg3", + "page": "3" + }, + { + "componentType": "Subsequence", + "goToPage": "4", + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kd0cbson", + "label": { "type": "VTL|MD", "value": "Tests simples sur des entiers" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM1)) and (0>QNUM1 or 100QNUM1)" + }, + "id": "k0dzbfek-format-decimal" + }, + { + "bindingDependencies": ["QNUM1"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"sup à 5\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM1,0) > 5)" }, + "id": "k0dzbfek-CI-0" + }, + { + "bindingDependencies": ["QNUM1"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"superieur à 6\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM1,0) > 6)" }, + "id": "k0dzbfek-CI-1" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 3. \" || \"Test de supériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Si valeur supérieure à 5 message d’info. si superieur à 6 autre message\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "k0dzbfek-kzgzg0bk", + "label": { + "type": "VTL|MD", + "value": "Tester 2 et 20 (pour vérifier ordre numérique et lexico)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM1"], + "min": 0, + "response": { "name": "QNUM1" }, + "decimals": 0, + "id": "k0dzbfek", + "page": "4" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM2)) and (0>QNUM2 or 100QNUM2)" + }, + "id": "kd0a6rn3-format-decimal" + }, + { + "bindingDependencies": ["QNUM2"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"vous n’avez pas répondu à la question\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM2,\"\")=\"\")" }, + "id": "kd0a6rn3-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 4. \" || \"Test sur valeur numérique vide\"" + }, + "mandatory": false, + "bindingDependencies": ["QNUM2"], + "min": 0, + "response": { "name": "QNUM2" }, + "decimals": 0, + "id": "kd0a6rn3", + "page": "5" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM3)) and (0>QNUM3 or 100QNUM3)" + }, + "id": "kd0a8h62-format-decimal" + }, + { + "bindingDependencies": ["QNUM3"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"le nombre saisi est inférieur à 8\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM3,0) < 8)" }, + "id": "kd0a8h62-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 5. \" || \"Test d’infériorité stricte - Saisie d’un nombre compris entre 0 et 100 - Message si valeur inférieure à 8\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0a8h62-kzgzr5b4", + "label": { + "type": "VTL|MD", + "value": "Tester 2 et 20 (pour vérifier ordre numérique et lexico)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM3"], + "min": 0, + "response": { "name": "QNUM3" }, + "decimals": 0, + "id": "kd0a8h62", + "page": "6" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM4)) and (0>QNUM4 or 100QNUM4)" + }, + "id": "kd0a4t4f-format-decimal" + }, + { + "bindingDependencies": ["QNUM4"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur saisie est supérieure ou égale à 5\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM4,0) >= 5)" }, + "id": "kd0a4t4f-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 6. \" || \"Test de supériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur supérieure à 5 \"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0a4t4f-kzgzrq25", + "label": { + "type": "VTL|MD", + "value": "Tester 2 et 20 (pour vérifier ordre numérique et lexico) Tester pour le cas d’égalité" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM4"], + "min": 0, + "response": { "name": "QNUM4" }, + "decimals": 0, + "id": "kd0a4t4f", + "page": "7" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM5)) and (0>QNUM5 or 100QNUM5)" + }, + "id": "kd0ac92p-format-decimal" + }, + { + "bindingDependencies": ["QNUM5"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La valeur saisie est inférieure ou égale à 8\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QNUM5 <= 8 and not(isnull(QNUM5)))" + }, + "id": "kd0ac92p-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 7. \" || \"Test d’infériorité non stricte - Saisie d’un nombre compris entre 0 et 100 - Test si valeur inférieure à 8\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0ac92p-kzgzp1k0", + "label": { + "type": "VTL|MD", + "value": "Tester 2 et 20 (pour vérifier ordre numérique et lexico) Tester 8 pour le cas égalité" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM5"], + "min": 0, + "response": { "name": "QNUM5" }, + "decimals": 0, + "id": "kd0ac92p", + "page": "8" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 9.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM6)) and (0>QNUM6 or 9QNUM6)" + }, + "id": "k1cahy88-format-decimal" + }, + { + "bindingDependencies": ["QNUM6"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur est égale à 4\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM6,0) = 4)" }, + "id": "k1cahy88-CI-0" + } + ], + "max": 9, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 8. \" || \"Test d’égalité - Message si = 4\"" + }, + "mandatory": false, + "bindingDependencies": ["QNUM6"], + "min": 0, + "response": { "name": "QNUM6" }, + "decimals": 0, + "id": "k1cahy88", + "page": "9" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 9.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUM7)) and (0>QNUM7 or 9QNUM7)" + }, + "id": "kd0ch7pf-format-decimal" + }, + { + "bindingDependencies": ["QNUM7"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La valeur est zéro\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(QNUM7,0) = 0)" }, + "id": "kd0ch7pf-CI-0" + } + ], + "max": 9, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cbson", + "page": "4", + "label": { + "type": "VTL|MD", + "value": "Tests simples sur des entiers" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 9. \" || \"Test d’égalité à 0 - Message si = 0\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0ch7pf-kzgzyu8d", + "label": { + "type": "VTL|MD", + "value": "Tester 0 - si vide sort aussi le message" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QNUM7"], + "min": 0, + "response": { "name": "QNUM7" }, + "decimals": 0, + "id": "kd0ch7pf", + "page": "10" + }, + { + "componentType": "Subsequence", + "goToPage": "11", + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cdj48", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kd0cdj48", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(REEL1)) and (-100.00>REEL1 or 100.00REEL1)" + }, + "id": "kd0aa5ah-format-decimal" + }, + { + "bindingDependencies": ["REEL1"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur est supérieure à -4.51\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(REEL1 > -4.51 and not(isnull(REEL1)))" + }, + "id": "kd0aa5ah-CI-0" + }, + { + "bindingDependencies": ["REEL1"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur est inférieure à -4.51\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(REEL1 < -4.51 and not(isnull(REEL1)))" + }, + "id": "kd0aa5ah-CI-1" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cdj48", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 10. \" || \"Test d’un reel par rapport à une constante négative à virgule - test des positionnements par rapport à -4.51 (sup, inf, égal)\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0aa5ah-lfs2ygex", + "label": { + "type": "VTL|MD", + "value": "\"Tester un nombre égal ou inférieur, le message disparait si saisie de -4.51\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["REEL1"], + "min": -100, + "response": { "name": "REEL1" }, + "decimals": 2, + "id": "kd0aa5ah", + "page": "11" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(REEL2)) and (-100.00>REEL2 or 100.00REEL2)" + }, + "id": "l5qvuk9e-format-decimal" + }, + { + "bindingDependencies": ["REEL2"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"superieur à 4.51\"" }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(REEL2 > 4.51 and not(isnull(REEL2)))" + }, + "id": "l5qvuk9e-CI-0" + }, + { + "bindingDependencies": ["REEL2"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"inferieur à 4.51\"" }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(REEL2 < 4.51 and not(isnull(REEL2)))" + }, + "id": "l5qvuk9e-CI-1" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cdj48", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 11. \" || \"Test d’un réel par rapport à une constante positive décimale - test des positionnements par rapport à 4.51 (sup, inf, égal)\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "l5qvuk9e-lfs30of4", + "label": { + "type": "VTL|MD", + "value": "\"Message disparair si saisie de 4.51\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["REEL2"], + "min": -100, + "response": { "name": "REEL2" }, + "decimals": 2, + "id": "l5qvuk9e", + "page": "12" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(REEL3)) and (-100.00>REEL3 or 100.00REEL3)" + }, + "id": "l5qvtc2l-format-decimal" + }, + { + "bindingDependencies": ["REEL3"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"superieur à 4\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(REEL3 > 4)" }, + "id": "l5qvtc2l-CI-0" + }, + { + "bindingDependencies": ["REEL3"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"inferieur à 4\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(REEL3,4) < 4)" }, + "id": "l5qvtc2l-CI-1" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cdj48", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 12. \" || \"Test d’un réel par rapport à une constante entière - test des positionnements par rapport à 4 (sup, égal)\"" + }, + "mandatory": false, + "bindingDependencies": ["REEL3"], + "min": -100, + "response": { "name": "REEL3" }, + "decimals": 2, + "id": "l5qvtc2l", + "page": "13" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0.00 et 1000000000.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(GRAND)) and (0.00>GRAND or 1000000000.00GRAND)" + }, + "id": "kd0c3h3b-format-decimal" + }, + { + "bindingDependencies": ["GRAND"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "la valeur saisie GRAND est supérieure à 1000 " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(cast(nvl(GRAND,\"0\"),number) > 1000)" + }, + "id": "kd0c3h3b-CI-0" + } + ], + "max": 1000000000, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0cdj48", + "page": "11", + "label": { + "type": "VTL|MD", + "value": "Tests sur des relatifs et des réels" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 13. \" || \"Test d’un grand réel par rapport à une constante (max = 1000000000) - test des positionnements par rapport à 1000 - Personnalisation du message d’erreur avec la valeur (précision = 2, max = 1000000000)\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0c3h3b-l5qsemyu", + "label": { + "type": "VTL|MD", + "value": "Rappel : posait souci dans Orbeon" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0c3h3b-lfs01ijx", + "label": { + "type": "VTL|MD", + "value": "\"Affichage de 2* GRAND :\" || cast(GRAND2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["GRAND2", "GRAND"], + "min": 0, + "response": { "name": "GRAND" }, + "decimals": 2, + "id": "kd0c3h3b", + "page": "14" + }, + { + "componentType": "Subsequence", + "bindingDependencies": [ + "QREL", + "QREL2", + "CALC_SOMME", + "CALC_PRODUIT", + "CALC_DIFFERENCE", + "CALC_RATIO" + ], + "goToPage": "15", + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + }, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0a5rkr-kzh01fub", + "label": { + "type": "VTL|MD", + "value": "Les nombres sont QREL et QREL2 Leur somme vaut CALC_SOMME - Leur produit vaut CALC_PRODUIT - Leur différence vaut CALC_DIFFERENCE - Leur division vaut CALC_RATIO" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QREL)) and (-100.00>QREL or 100.00QREL)" + }, + "id": "kd0achk0-format-decimal" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 14. \" || \"Test sur ordre de deux variables - partie 1 - les contrôles portent sur la question suivante\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0achk0-l5qs57q7", + "label": { + "type": "VTL|MD", + "value": "\"Saisir un réel entre -100 et 100, 2 chiffres après virgule max\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QREL"], + "min": -100, + "response": { "name": "QREL" }, + "decimals": 2, + "id": "kd0achk0", + "page": "16" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -100.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QREL2)) and (-100.00>QREL2 or 100.00QREL2)" + }, + "id": "kd0bl558-format-decimal" + }, + { + "bindingDependencies": ["QREL", "QREL2"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"le premier nombre est supérieur\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(QREL > QREL2)" }, + "id": "kd0bl558-CI-0" + }, + { + "bindingDependencies": ["QREL", "QREL2"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"le premier nombre est inférieur\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(QREL < QREL2)" }, + "id": "kd0bl558-CI-1" + }, + { + "bindingDependencies": ["QREL", "QREL2"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"les deux nombres sont égaux\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(QREL = QREL2)" }, + "id": "kd0bl558-CI-2" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 15. \" || \"Test sur ordre de deux variables - partie 2\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0bl558-kzgp1ckr", + "label": { + "type": "VTL|MD", + "value": "\"Saisir un réel entre -100 et 100, 2 chiffres après virgule max\"" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bl558-kzgzzsbo", + "label": { + "type": "VTL|MD", + "value": "Tester supérieur, inférieur, identique" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bl558-kzgzn873", + "label": { + "type": "VTL|MD", + "value": "Ne pas oublier de tester ordre numérique et ordre lexicographique" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QREL2"], + "min": -100, + "response": { "name": "QREL2" }, + "decimals": 2, + "id": "kd0bl558", + "page": "17" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0.00 et 100.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QNUMBIS)) and (0.00>QNUMBIS or 100.00QNUMBIS)" + }, + "id": "l5qt3xu9-format-decimal" + }, + { + "bindingDependencies": ["QNUMBIS", "QREL2"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"saisie > QREL2\"" }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QNUMBIS > QREL2 and not(isnull(QNUMBIS)))" + }, + "id": "l5qt3xu9-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 16. \" || \"Test entre un entier et un réel - saisir entre 0 et 100 - controle sur saisie > QREL2\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "l5qt3xu9-l5qt5usw", + "label": { + "type": "VTL|MD", + "value": "\"rappel QREL2 : \" || cast(QREL2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QREL2", "QNUMBIS"], + "min": 0, + "response": { "name": "QNUMBIS" }, + "decimals": 2, + "id": "l5qt3xu9", + "page": "18" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -400.00 et 400.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QRATIO)) and (-400.00>QRATIO or 400.00QRATIO)" + }, + "id": "kd0bu8xz-format-decimal" + }, + { + "bindingDependencies": ["CALC_RATIO", "QRATIO"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"Ratio différent\"" }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(CALC_RATIO<>QRATIO and not(isnull(QRATIO)))" + }, + "id": "kd0bu8xz-CI-0" + } + ], + "max": 400, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 17. \" || \"Test avec une variable calculée : le ratio - Saisissez une valeur pour la comparer à la division des deux nombres précédents\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0bu8xz-l5qsfsto", + "label": { + "type": "VTL|MD", + "value": "\"QREL \" || cast(QREL,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bu8xz-l5qsl50s", + "label": { + "type": "VTL|MD", + "value": "\"QREL2 \" || cast(QREL2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bu8xz-l5qtjjss", + "label": { + "type": "VTL|MD", + "value": "\"ratio calculé : \" || cast(CALC_RATIO,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QREL", "QREL2", "CALC_RATIO", "QRATIO"], + "min": -400, + "response": { "name": "QRATIO" }, + "decimals": 2, + "id": "kd0bu8xz", + "page": "19" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -200.00 et 200.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QSOMME)) and (-200.00>QSOMME or 200.00QSOMME)" + }, + "id": "k0gj7g4v-format-decimal" + }, + { + "bindingDependencies": ["QSOMME", "CALC_SOMME"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur saisie est inférieure à la somme\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QSOMME < CALC_SOMME and not(isnull(QSOMME)))" + }, + "id": "k0gj7g4v-CI-0" + }, + { + "bindingDependencies": ["QSOMME", "CALC_SOMME"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La valeur saisie est supérieure à la somme\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QSOMME > CALC_SOMME and not(isnull(QSOMME)))" + }, + "id": "k0gj7g4v-CI-1" + } + ], + "max": 200, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 18. \" || \"Test avec une variable calculée : la somme - Saisissez une valeur pour la comparer à la somme des deux nombres précédents\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "k0gj7g4v-kzs9lmqk", + "label": { + "type": "VTL|MD", + "value": "\"somme calculée : \" || cast(CALC_SOMME,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "k0gj7g4v-l5qsqev9", + "label": { + "type": "VTL|MD", + "value": "\"QREL : \" || cast(QREL,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "k0gj7g4v-l5qsn0zd", + "label": { + "type": "VTL|MD", + "value": "\"QREL2 : \" || cast(QREL2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["CALC_SOMME", "QREL", "QREL2", "QSOMME"], + "min": -200, + "response": { "name": "QSOMME" }, + "decimals": 2, + "id": "k0gj7g4v", + "page": "20" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -4000.00 et 4000.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QPRODUIT)) and (-4000.00>QPRODUIT or 4000.00QPRODUIT)" + }, + "id": "kd0bx24r-format-decimal" + }, + { + "bindingDependencies": ["QPRODUIT", "CALC_PRODUIT"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"la valeur saisie est différente du produit\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QPRODUIT <> CALC_PRODUIT and not(isnull(QPRODUIT)))" + }, + "id": "kd0bx24r-CI-0" + } + ], + "max": 4000, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 19. \" || \"Test avec une variable calculée : le produit - Saisissez une valeur pour la comparer au produit des deux nombres précédents\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0bx24r-l5qsnxn1", + "label": { + "type": "VTL|MD", + "value": "\"QREL \" || cast(QREL,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bx24r-l5qs6s2e", + "label": { + "type": "VTL|MD", + "value": "\"QREL2 \" || cast(QREL2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0bx24r-l5qsojx6", + "label": { + "type": "VTL|MD", + "value": "\"produit calculé : \" || cast(CALC_PRODUIT,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["QREL", "QREL2", "CALC_PRODUIT", "QPRODUIT"], + "min": -4000, + "response": { "name": "QPRODUIT" }, + "decimals": 2, + "id": "kd0bx24r", + "page": "21" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre -400.00 et 400.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(QDIFFERENCE)) and (-400.00>QDIFFERENCE or 400.00QDIFFERENCE)" + }, + "id": "kd0c2j4a-format-decimal" + }, + { + "bindingDependencies": ["QDIFFERENCE", "CALC_DIFFERENCE"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"Différence\"" }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(QDIFFERENCE <> CALC_DIFFERENCE and not(isnull(QDIFFERENCE)))" + }, + "id": "kd0c2j4a-CI-0" + } + ], + "max": 400, + "hierarchy": { + "sequence": { + "id": "kd09v80w", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Tests sur variables numériques\"" + } + }, + "subSequence": { + "id": "kd0a5rkr", + "page": "15", + "label": { + "type": "VTL|MD", + "value": "Tests sur variables collectées, ordre relatif et variables calculées" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 20. \" || \"Test avec une variable calculée : la différence - Saisissez une valeur pour la comparer au produit des deux nombres précédents\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "kd0c2j4a-l5qsky9a", + "label": { + "type": "VTL|MD", + "value": "\"QREL \" || cast(QREL,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0c2j4a-l5qspruc", + "label": { + "type": "VTL|MD", + "value": "\"QREL2 \" || cast(QREL2,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "kd0c2j4a-l5qt39hp", + "label": { + "type": "VTL|MD", + "value": "\"diff calculée : \" || cast(CALC_DIFFERENCE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": [ + "QREL", + "QREL2", + "CALC_DIFFERENCE", + "QDIFFERENCE" + ], + "min": -400, + "response": { "name": "QDIFFERENCE" }, + "decimals": 2, + "id": "kd0c2j4a", + "page": "22" + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "23", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-SEQ", + "page": "23", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + }, + { + "componentType": "Textarea", + "bindingDependencies": ["COMMENT_QE"], + "response": { "name": "COMMENT_QE" }, + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "23", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-QUESTION", + "page": "24", + "label": { + "type": "VTL|MD", + "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\"" + }, + "mandatory": false, + "maxLength": 2000 + } + ], + "pagination": "question", + "resizing": {}, + "label": { + "type": "VTL|MD", + "value": "QNONREG - Controles Numériques VTL ok" + }, + "lunaticModelVersion": "2.3.2-rc7", + "modele": "QTESTCONTR", + "enoCoreVersion": "2.4.1-pairwise", + "generatingDate": "26-06-2023 07:51:33", + "missing": false, + "id": "kzfezgxb", + "maxPage": "24" +} diff --git a/public/static/questionnaire/sum-min/form.json b/public/static/questionnaire/sum-min/form.json new file mode 100644 index 00000000..64b97796 --- /dev/null +++ b/public/static/questionnaire/sum-min/form.json @@ -0,0 +1,600 @@ +{ + "cleaning": { + "IND_MAJEUR": { "DIVERS": "(SUM_MAJEUR > 0)" }, + "SUM_MAJEUR": { "DIVERS": "(SUM_MAJEUR > 0)" }, + "AGE": { "DIVERS": "(SUM_MAJEUR > 0)" } + }, + "variables": [ + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "COMMENT_QE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NB" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "PRENOM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "AGE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "DIVERS" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NB", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_PRENOM", + "inFilter": "false", + "shapeFrom": "PRENOM" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["AGE"], + "expression": { + "type": "VTL", + "value": "if nvl(AGE,0) > 17 then 1 else 0" + }, + "name": "IND_MAJEUR", + "inFilter": "true", + "shapeFrom": "PRENOM" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_AGE", + "inFilter": "false", + "shapeFrom": "AGE" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["SUM_MAJEUR"], + "expression": { "type": "VTL", "value": "(SUM_MAJEUR > 0)" }, + "name": "FILTER_RESULT_DIVERS", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["IND_MAJEUR", "AGE"], + "expression": { "type": "VTL", "value": "sum(IND_MAJEUR)" }, + "name": "SUM_MAJEUR", + "inFilter": "true" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["AGE"], + "expression": { "type": "VTL", "value": "sum(AGE)" }, + "name": "SUM_AGE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["AGE"], + "expression": { "type": "VTL", "value": "min(AGE)" }, + "name": "MIN_AGE", + "inFilter": "false" + } + ], + "components": [ + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 10.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(NB)) and (0>NB or 10NB)" + }, + "id": "kze792d8-format-decimal" + } + ], + "max": 10, + "hierarchy": { + "sequence": { + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { "type": "VTL|MD", "value": "\"➡ 1. \" || \"NB\"" }, + "mandatory": false, + "bindingDependencies": ["NB"], + "min": 0, + "response": { "name": "NB" }, + "decimals": 0, + "id": "kze792d8", + "page": "2" + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "loopDependencies": ["NB"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["NB"], + "goToPage": "3", + "hierarchy": { + "sequence": { + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + }, + "subSequence": { + "id": "ksynhpl3", + "page": "3", + "label": { "type": "VTL|MD", "value": "\"Habitants\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksynhpl3", + "page": "3", + "label": { "type": "VTL|MD", "value": "\"Habitants\"" } + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM", "NB"], + "controls": [ + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Prenom est vide - controle nvl\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(PRENOM,\"\")=\"\")" + }, + "id": "ksyjvi40-CI-0" + }, + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"PRénom vaut A\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(PRENOM = \"A\")" }, + "id": "ksyjvi40-CI-1" + } + ], + "response": { "name": "PRENOM" }, + "hierarchy": { + "sequence": { + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + }, + "subSequence": { + "id": "ksynhpl3", + "page": "3", + "label": { "type": "VTL|MD", "value": "\"Habitants\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksyjvi40", + "page": "3", + "label": { "type": "VTL|MD", "value": "\"➡ 2. \" || \"prénom\"" }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "HELP", + "id": "ksyjvi40-l7uj49ok", + "label": { + "type": "VTL|MD", + "value": "\"Tester Prénom vide et Prénom = A\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + } + ], + "bindingDependencies": ["NB", "PRENOM"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "ksyjs7vy", + "page": "1", + "label": { "type": "VTL|MD", "value": "\"I - \" || \"S0\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksykfdm9", + "page": "3", + "lines": { + "min": { "type": "VTL", "value": "cast(NB,integer)" }, + "max": { "type": "VTL", "value": "cast(NB,integer)" } + } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + }, + { + "paginatedLoop": true, + "componentType": "Loop", + "loopDependencies": ["PRENOM"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["PRENOM"], + "goToPage": "5.1", + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + }, + "subSequence": { + "id": "ksyjxw3a", + "page": "5.1", + "label": { "type": "VTL|MD", "value": "\"Les ages\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksyjxw3a", + "label": { "type": "VTL|MD", "value": "\"Les ages\"" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(AGE)) and (0>AGE or 100AGE)" + }, + "id": "ksyke448-format-decimal" + }, + { + "bindingDependencies": ["AGE"], + "criticality": "WARN", + "errorMessage": { "type": "VTL|MD", "value": "\"Age est vide\"" }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(isnull(AGE))" }, + "id": "ksyke448-CI-0" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + }, + "subSequence": { + "id": "ksyjxw3a", + "page": "5.1", + "label": { "type": "VTL|MD", "value": "\"Les ages\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 3. \" || \"Age de l’individu : \" || PRENOM" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "ksyke448-ktwsl4qu", + "label": { + "type": "VTL|MD", + "value": "\"AGE vaut : \" || cast(AGE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "ksyke448-l7g2enbf", + "label": { + "type": "VTL|MD", + "value": "\"IND_MAJEUR :\" || cast(IND_MAJEUR,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["AGE", "IND_MAJEUR", "PRENOM"], + "min": 0, + "response": { "name": "AGE" }, + "decimals": 0, + "id": "ksyke448", + "page": "5.1" + } + ], + "bindingDependencies": ["AGE", "IND_MAJEUR", "PRENOM"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ksynkaoo", + "page": "5", + "maxPage": "1", + "iterations": { "type": "VTL", "value": "count(PRENOM)" } + }, + { + "componentType": "Subsequence", + "bindingDependencies": ["SUM_MAJEUR", "SUM_AGE", "MIN_AGE"], + "goToPage": "6", + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + }, + "subSequence": { + "id": "ku2pnlmr", + "page": "6", + "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "ku2pnlmr", + "page": "6", + "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" }, + "declarations": [ + { + "declarationType": "HELP", + "id": "ku2pnlmr-l7t4dzz2", + "label": { + "type": "VTL|MD", + "value": "\"Affichage du nb de majeurs : \" || cast(SUM_MAJEUR,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "ku2pnlmr-l806u4c8", + "label": { + "type": "VTL|MD", + "value": "\"Affichage du somme age : \" || cast(SUM_AGE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "ku2pnlmr-lg6mo14c", + "label": { + "type": "VTL|MD", + "value": "\"Affichage du min des ages sans cast: \" || cast(MIN_AGE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["DIVERS"], + "response": { "name": "DIVERS" }, + "hierarchy": { + "sequence": { + "id": "ksyniqzx", + "page": "4", + "label": { "type": "VTL|MD", "value": "\"II - \" || \"S1\"" } + }, + "subSequence": { + "id": "ku2pnlmr", + "page": "6", + "label": { "type": "VTL|MD", "value": "\"Affichage de qq var\"" } + } + }, + "conditionFilter": { + "bindingDependencies": ["SUM_MAJEUR", "IND_MAJEUR", "AGE"], + "type": "VTL", + "value": "(SUM_MAJEUR > 0)" + }, + "id": "ku2pxugf", + "page": "7", + "label": { "type": "VTL|MD", "value": "\"➡ 4. \" || \"divers\"" }, + "mandatory": false, + "maxLength": 249 + }, + { + "componentType": "Sequence", + "bindingDependencies": ["SUM_AGE", "SUM_MAJEUR", "MIN_AGE"], + "hierarchy": { + "sequence": { + "id": "l7yz0fe5", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"S3\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l7yz0fe5", + "page": "8", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"S3\"" }, + "declarations": [ + { + "declarationType": "HELP", + "id": "l7yz0fe5-l7yyye9y", + "label": { + "type": "VTL|MD", + "value": "\"Affichage de la somme des ages : \" || cast(SUM_AGE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "l7yz0fe5-l7yz5mgk", + "label": { + "type": "VTL|MD", + "value": "\"Affichage du nb de majeurs : \" || cast(SUM_MAJEUR,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "l7yz0fe5-l7yyrp0q", + "label": { + "type": "VTL|MD", + "value": "\"Affichage du min des ages : \" || cast(MIN_AGE,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "9", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-SEQ", + "page": "9", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + }, + { + "componentType": "Textarea", + "bindingDependencies": ["COMMENT_QE"], + "response": { "name": "COMMENT_QE" }, + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "9", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-QUESTION", + "page": "10", + "label": { + "type": "VTL|MD", + "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\"" + }, + "mandatory": false, + "maxLength": 2000 + } + ], + "pagination": "question", + "resizing": { "NB": { "variables": ["AGE"], "size": "cast(NB,integer)" } }, + "label": { + "type": "VTL|MD", + "value": "QNONREG - sum, min dans une boucle et sur controle prénom et test filtre occurrence" + }, + "lunaticModelVersion": "2.3.2-rc5", + "modele": "TESTSURSUM", + "enoCoreVersion": "2.4.1-pairwise", + "generatingDate": "12-05-2023 15:10:33", + "missing": false, + "id": "lb3ei722", + "maxPage": "10" +} diff --git a/public/static/questionnaire/tous-composants/form.json b/public/static/questionnaire/tous-composants/form.json new file mode 100644 index 00000000..29dbde0d --- /dev/null +++ b/public/static/questionnaire/tous-composants/form.json @@ -0,0 +1,6705 @@ +{ + "cleaning": { + "MAJEUR": { + "QMASQUEE": "(MAJEUR=\"1\")", + "QFILTRE": "(MAJEUR=\"1\") and (isnull(SEXE) or SEXE=\"2\")" + }, + "SEXE": { "QFILTRE": "(MAJEUR=\"1\") and (isnull(SEXE) or SEXE=\"2\")" } + }, + "variables": [ + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "COMMENT_QE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TEXTECOURT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TEXTELONG" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "INTEGER" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "FLOAT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "UNIT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "DATE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "BOOLEEN" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "RADIO" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "CHECKBOX" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "IMAGE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "DROPDOWN" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "AUTOCOMPL" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B3" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B4" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B5" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B6" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B7" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_B8" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ON1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ON2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ON3" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ON4" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ON5" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR1" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR2" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR3" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR4" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR5" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR6" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR7" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QCM_ONR8" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAUTIC11" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAUTIC21" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAUTIC31" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAUTIC41" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A1M11" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A1M21" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A1M31" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A1M41" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A1M51" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M11" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M12" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M13" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M21" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M22" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M23" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M31" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M32" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M33" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M41" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M42" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M43" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M51" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M52" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1A3M53" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A11" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A12" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A13" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A14" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A15" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A21" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A22" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A23" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A24" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A25" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A31" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A32" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A33" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A34" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A35" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A41" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A42" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A43" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A44" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A45" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A51" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A52" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A53" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A54" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A55" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A61" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A62" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A63" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A64" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A65" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A71" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A72" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A73" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A74" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A75" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A81" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A82" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A83" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A84" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU2A85" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M11" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M21" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M31" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M41" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M51" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAU1AH1M61" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "TABLEAUDYN" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "PRENOM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "EMAIL" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "MAJEUR" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NAISSANCE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "SEXE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QMASQUEE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "QFILTRE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NBPERS" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": null, + "EDITED": null, + "INPUTED": null, + "FORCED": null, + "PREVIOUS": null + }, + "name": "NBENFANT" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "THL_PRENOM" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "THL_AGE" + }, + { + "variableType": "COLLECTED", + "values": { + "COLLECTED": [null], + "EDITED": [null], + "INPUTED": [null], + "FORCED": [null], + "PREVIOUS": [null] + }, + "name": "TAILLE" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TEXTECOURT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TEXTELONG", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_INTEGER", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_FLOAT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_UNIT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_DATE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_BOOLEEN", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_RADIO", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_CHECKBOX", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_IMAGE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_DROPDOWN", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_AUTOCOMPL", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QCM_B", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QCM_ON", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_QCM_ONR", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAUTIC", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAU1A1M", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAU1A3M", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAU2A", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAU1AH1M", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TABLEAUDYN", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_PRENOM", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_EMAIL", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_MAJEUR", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NAISSANCE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_SEXE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["MAJEUR"], + "expression": { "type": "VTL", "value": "(MAJEUR=\"1\")" }, + "name": "FILTER_RESULT_QMASQUEE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["MAJEUR", "SEXE"], + "expression": { + "type": "VTL", + "value": "(MAJEUR=\"1\") and (isnull(SEXE) or SEXE=\"2\")" + }, + "name": "FILTER_RESULT_QFILTRE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NBPERS", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_NBENFANT", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_THL_PRENOM", + "inFilter": "false", + "shapeFrom": "THL_PRENOM" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_THL_AGE", + "inFilter": "false", + "shapeFrom": "THL_PRENOM" + }, + { + "variableType": "CALCULATED", + "expression": { "type": "VTL", "value": "true" }, + "name": "FILTER_RESULT_TAILLE", + "inFilter": "false", + "shapeFrom": "TAILLE" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["NAISSANCE"], + "expression": { + "type": "VTL", + "value": "2022 - cast(substr(cast(NAISSANCE,string),1,4),integer)" + }, + "name": "AGEPRENOM", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["NBPERS", "NBENFANT"], + "expression": { + "type": "VTL", + "value": "nvl(NBPERS,0) - nvl(NBENFANT,0)" + }, + "name": "NBADULTES", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": ["SEXE"], + "expression": { + "type": "VTL", + "value": "if (nvl(SEXE,\"\") = \"1\") then \"monsieur\" else (if (nvl(SEXE,\"\") = \"2\") then \"madame\" else \"\")" + }, + "name": "CIVILITE", + "inFilter": "false" + }, + { + "variableType": "CALCULATED", + "bindingDependencies": [ + "TABLEAU1A1M11", + "TABLEAU1A1M21", + "TABLEAU1A1M31", + "TABLEAU1A1M41", + "TABLEAU1A1M51" + ], + "expression": { + "type": "VTL", + "value": "nvl(TABLEAU1A1M11,0)+nvl(TABLEAU1A1M21,0)+nvl(TABLEAU1A1M31,0)+nvl(TABLEAU1A1M41,0)+ nvl(TABLEAU1A1M51,0)" + }, + "name": "TOTAL_TAB", + "inFilter": "false" + } + ], + "components": [ + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + }, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "jfaz9kv9-jfazqgv2", + "label": { + "type": "VTL|MD", + "value": "Ce module comprend les questions ouvertes. ​ Ceci est une déclaration de type consigne, associée au titre du module." + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Subsequence", + "goToPage": "2", + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfazsitt", + "page": "2", + "label": { "type": "VTL|MD", "value": "Questions de type Texte" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfazsitt", + "label": { "type": "VTL|MD", "value": "Questions de type Texte" } + }, + { + "componentType": "Input", + "bindingDependencies": ["TEXTECOURT"], + "response": { "name": "TEXTECOURT" }, + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfazsitt", + "page": "2", + "label": { "type": "VTL|MD", "value": "Questions de type Texte" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfazww20", + "page": "2", + "label": { + "type": "VTL|MD", + "value": "\"➡ 1. \" || \"Je suis le libellé de la question de type texte de longueur inférieure à 250 caractères\"" + }, + "mandatory": false, + "maxLength": 5, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "jfazww20-k6gbafch", + "label": { + "type": "VTL|MD", + "value": "So close no matter how far couldn’t be much more from the heart forever trust in who we are and nothing else matters
never opened myself this way life is ours, we live it our way all these words I don’t just say and nothing else matters
trust I seek and I find in you every day for us something new open mind for a different view and nothing else matters never cared for what they do never cared for what they know But I know so close no matter how far couldn’t be much more from the heart forever trusting who we are and nothing else matters never cared for what they do never cared for what they know And I know I never opened myself this way life is ours, we live it our way all these words I don’t just say and nothing else matters trust I seek and I find in you every day for us something new open mind for a different view and nothing else matters never cared for what they say never cared for games they play never cared for what they do" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Textarea", + "bindingDependencies": ["TEXTELONG"], + "response": { "name": "TEXTELONG" }, + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfazsitt", + "page": "2", + "label": { "type": "VTL|MD", "value": "Questions de type Texte" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfazwjyv", + "page": "3", + "label": { + "type": "VTL|MD", + "value": "\"➡ 2. \" || \"Je suis le libellé de la question de type texte de longueur supérieure à 250 caractères. Demain, dès l’aube, à l’heure où blanchit la campagne, Je partirai. Vois-tu, je sais que tu m’attends. J’irai par la forêt, j’irai par la montagne. Je ne puis demeurer loin de toi plus longtemps. Je marcherai les yeux fixés sur mes pensées, Sans rien voir au dehors, sans entendre aucun bruit, Seul, inconnu, le dos courbé, les mains croisées, Triste, et le jour pour moi sera comme la nuit. Je ne regarderai ni l’or du soir qui tombe, Ni les voiles au loin descendant vers Harfleur, Et quand j’arriverai, je mettrai sur ta tombe Un bouquet de houx vert et de bruyère en fleur.\"" + }, + "mandatory": false, + "maxLength": 500, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "jfazwjyv-k6c6cjxu", + "label": { + "type": "VTL|MD", + "value": "Le champ de la réponse de type texte long est modifiable à la souris" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Subsequence", + "goToPage": "4", + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfjhggkx", + "page": "4", + "label": { "type": "VTL|MD", "value": "Numériques" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfjhggkx", + "label": { "type": "VTL|MD", "value": "Numériques" } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999999999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(INTEGER)) and (0>INTEGER or 999999999INTEGER)" + }, + "id": "jfjh1ndk-format-decimal" + } + ], + "max": 999999999, + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfjhggkx", + "page": "4", + "label": { "type": "VTL|MD", "value": "Numériques" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 3. \" || \"Numérique entier sans unité - grand (max= 999999999)\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "jfjh1ndk-l8ua25i0", + "label": { + "type": "VTL|MD", + "value": "\"Variable utilisée dans le tableau question 22\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["INTEGER"], + "min": 0, + "response": { "name": "INTEGER" }, + "decimals": 0, + "id": "jfjh1ndk", + "page": "4" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0.00 et 1000.00.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(FLOAT)) and (0.00>FLOAT or 1000.00FLOAT)" + }, + "id": "jfjhb2pz-format-decimal" + }, + { + "bindingDependencies": ["INTEGER", "FLOAT"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Message un peu long pour tester la modale sur smartphone. Vous devez saisir un nombre plus petit que pour la question 3 :\" || cast(INTEGER,string) || \" est plus grand que \" || cast(FLOAT,string) " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(INTEGER < FLOAT and not(isnull(INTEGER)) and not(isnull(FLOAT)))" + }, + "id": "jfjhb2pz-CI-0" + } + ], + "max": 1000, + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfjhggkx", + "page": "4", + "label": { "type": "VTL|MD", "value": "Numériques" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 4. \" || \"Numérique décimal sans unité (entre 0 et 1000.00)\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "jfjhb2pz-l8iohgoa", + "label": { + "type": "VTL|MD", + "value": "\"Controle par rapport à question 3 dont la valeur est :\" || cast(INTEGER,string)" + }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "jfjhb2pz-l8u98od1", + "label": { + "type": "VTL|MD", + "value": "\"Test : saisir un nombre plus grand que celui de la question 3 et vérifier affichage du controle\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["INTEGER", "FLOAT"], + "min": 0, + "response": { "name": "FLOAT" }, + "decimals": 2, + "id": "jfjhb2pz", + "page": "5" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 9999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(UNIT)) and (0>UNIT or 9999UNIT)" + }, + "id": "jfjtbqh1-format-decimal" + } + ], + "max": 9999, + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfjhggkx", + "page": "4", + "label": { "type": "VTL|MD", "value": "Numériques" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 5. \" || \"Numérique max 9999 avec[ unité](. 'l’unité choisie ici est le kilo euro mais je peux tester une infobulle un peu longue pour regarder') et infobulle sur le mot unité de cette question\"" + }, + "mandatory": false, + "unit": "k€", + "bindingDependencies": ["UNIT"], + "min": 0, + "response": { "name": "UNIT" }, + "decimals": 0, + "id": "jfjtbqh1", + "page": "6" + }, + { + "componentType": "Subsequence", + "goToPage": "7", + "hierarchy": { + "sequence": { + "id": "jfaz9kv9", + "page": "1", + "label": { + "type": "VTL|MD", + "value": "\"I - \" || \"Questions ouvertes - Titre de la séquence\"" + } + }, + "subSequence": { + "id": "jfjeuskc", + "page": "7", + "label": { "type": "VTL|MD", "value": "Autres formats de réponse" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfjeuskc", + "page": "7", + "label": { "type": "VTL|MD", "value": "Autres formats de réponse" }, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "jfjeuskc-k6c6agsi", + "label": { + "type": "VTL|MD", + "value": "Ce sous module comprend des questions de type : - date - durée - booléen" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Datepicker", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La date saisie doit être comprise entre 2000-01-01 et 2020-03-31.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(DATE)) and (cast(DATE, date, \"YYYY-MM-DD\")>cast(\"2020-03-31\", date, \"YYYY-MM-DD\") or cast(DATE, date, \"YYYY-MM-DD\")TABLEAUTIC11 or 20TABLEAUTIC11)" + }, + "id": "l8u8d67h-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 20.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAUTIC21)) and (0>TABLEAUTIC21 or 20TABLEAUTIC21)" + }, + "id": "l8u8d67h-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 20.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAUTIC31)) and (0>TABLEAUTIC31 or 20TABLEAUTIC31)" + }, + "id": "l8u8d67h-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 20.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAUTIC41)) and (0>TABLEAUTIC41 or 20TABLEAUTIC41)" + }, + "id": "l8u8d67h-format-decimal" + }, + { + "bindingDependencies": [ + "TABLEAUTIC11", + "TABLEAUTIC21", + "TABLEAUTIC31", + "TABLEAUTIC41", + "INTEGER" + ], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La somme est supérieure au nombre collecté : \" || cast(INTEGER,string) " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(TABLEAUTIC11,0)+nvl(TABLEAUTIC21,0)+nvl(TABLEAUTIC31,0)+ nvl(TABLEAUTIC41,0) > nvl(INTEGER,0))" + }, + "id": "l8u8d67h-CI-0" + } + ], + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 16. \" || \"Tableau TIC - répartition du nb habitants, comparaison question INTEGER\"" + }, + "body": [ + [ + { + "label": { "type": "VTL|MD", "value": "\"moins de 15\"" }, + "value": "1" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAUTIC11"], + "min": 0, + "max": 20, + "response": { "name": "TABLEAUTIC11" }, + "decimals": 0, + "id": "l8u8d67h-QOP-l8u8ju3p" + } + ], + [ + { + "label": { "type": "VTL|MD", "value": "\"de 16 à 17 ans\"" }, + "value": "2" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAUTIC21"], + "min": 0, + "max": 20, + "response": { "name": "TABLEAUTIC21" }, + "decimals": 0, + "id": "l8u8d67h-QOP-l8u8ezod" + } + ], + [ + { + "label": { "type": "VTL|MD", "value": "\"de 18 à 19 ans\"" }, + "value": "3" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAUTIC31"], + "min": 0, + "max": 20, + "response": { "name": "TABLEAUTIC31" }, + "decimals": 0, + "id": "l8u8d67h-QOP-l8u85xql" + } + ], + [ + { + "label": { "type": "VTL|MD", "value": "\"20 et plus\"" }, + "value": "4" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAUTIC41"], + "min": 0, + "max": 20, + "response": { "name": "TABLEAUTIC41" }, + "decimals": 0, + "id": "l8u8d67h-QOP-l8u80yaz" + } + ] + ], + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "l8u8d67h-l8u8f3sa", + "label": { + "type": "VTL|MD", + "value": "\"Rappel de la valeur collectée INTEGER = \" || cast(INTEGER,string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": [ + "TABLEAUTIC11", + "TABLEAUTIC21", + "TABLEAUTIC31", + "TABLEAUTIC41", + "INTEGER" + ], + "positioning": "HORIZONTAL", + "header": [ + { "label": { "type": "VTL|MD", "value": "" } }, + { + "label": { + "type": "VTL|MD", + "value": "\"Nombre de personnes, entre 0 et 20\"" + } + } + ], + "id": "l8u8d67h", + "page": "20" + }, + { + "componentType": "Table", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A1M11)) and (0>TABLEAU1A1M11 or 999TABLEAU1A1M11)" + }, + "id": "jfkzltkm-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A1M21)) and (0>TABLEAU1A1M21 or 999TABLEAU1A1M21)" + }, + "id": "jfkzltkm-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A1M31)) and (0>TABLEAU1A1M31 or 999TABLEAU1A1M31)" + }, + "id": "jfkzltkm-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A1M41)) and (0>TABLEAU1A1M41 or 999TABLEAU1A1M41)" + }, + "id": "jfkzltkm-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A1M51)) and (0>TABLEAU1A1M51 or 999TABLEAU1A1M51)" + }, + "id": "jfkzltkm-format-decimal" + }, + { + "bindingDependencies": [ + "TABLEAU1A1M11", + "TABLEAU1A1M21", + "TABLEAU1A1M31", + "TABLEAU1A1M41", + "TABLEAU1A1M51", + "TOTAL_TAB" + ], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La somme des lignes (\" || cast(TOTAL_TAB,string) || \") est supérieure à 100.\" " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(TABLEAU1A1M11,0)+nvl(TABLEAU1A1M21,0)+nvl(TABLEAU1A1M31,0)+nvl(TABLEAU1A1M41,0)+ nvl(TABLEAU1A1M51,0) > 100)" + }, + "id": "jfkzltkm-CI-0" + } + ], + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 17. \" || \"Tableau un axe simple, une mesure, sans unité\"" + }, + "body": [ + [ + { "label": { "type": "VTL|MD", "value": "choix 1" }, "value": "1" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A1M11"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A1M11" }, + "decimals": 0, + "id": "jfkzltkm-QOP-kfs6nvkt" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 2" }, "value": "2" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A1M21"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A1M21" }, + "decimals": 0, + "id": "jfkzltkm-QOP-kfs789y1" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "[choix 3](. '1 2 3 soleil')" + }, + "value": "3" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A1M31"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A1M31" }, + "decimals": 0, + "id": "jfkzltkm-QOP-kfs74fzv" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 4" }, "value": "4" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A1M41"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A1M41" }, + "decimals": 0, + "id": "jfkzltkm-QOP-kfs752q3" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 5" }, "value": "5" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A1M51"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A1M51" }, + "decimals": 0, + "id": "jfkzltkm-QOP-kfs70f2t" + } + ] + ], + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "jfkzltkm-l8ubvmec", + "label": { + "type": "VTL|MD", + "value": "\"COntrole sur somme des lignes > 100\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": [ + "TABLEAU1A1M11", + "TABLEAU1A1M21", + "TABLEAU1A1M31", + "TABLEAU1A1M41", + "TABLEAU1A1M51", + "TOTAL_TAB" + ], + "positioning": "HORIZONTAL", + "header": [ + { "label": { "type": "VTL|MD", "value": "" } }, + { "label": { "type": "VTL|MD", "value": "Mesure de type numérique" } } + ], + "id": "jfkzltkm", + "page": "21" + }, + { + "componentType": "Table", + "bindingDependencies": [ + "TABLEAU1A3M11", + "TABLEAU1A3M12", + "TABLEAU1A3M13", + "TABLEAU1A3M21", + "TABLEAU1A3M22", + "TABLEAU1A3M23", + "TABLEAU1A3M31", + "TABLEAU1A3M32", + "TABLEAU1A3M33", + "TABLEAU1A3M41", + "TABLEAU1A3M42", + "TABLEAU1A3M43", + "TABLEAU1A3M51", + "TABLEAU1A3M52", + "TABLEAU1A3M53" + ], + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A3M11)) and (0>TABLEAU1A3M11 or 999TABLEAU1A3M11)" + }, + "id": "jfkzpexn-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A3M21)) and (0>TABLEAU1A3M21 or 999TABLEAU1A3M21)" + }, + "id": "jfkzpexn-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A3M31)) and (0>TABLEAU1A3M31 or 999TABLEAU1A3M31)" + }, + "id": "jfkzpexn-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A3M41)) and (0>TABLEAU1A3M41 or 999TABLEAU1A3M41)" + }, + "id": "jfkzpexn-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1A3M51)) and (0>TABLEAU1A3M51 or 999TABLEAU1A3M51)" + }, + "id": "jfkzpexn-format-decimal" + } + ], + "positioning": "HORIZONTAL", + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "header": [ + { "label": { "type": "VTL|MD", "value": "" } }, + { "label": { "type": "VTL|MD", "value": "Mesure de type numérique" } }, + { "label": { "type": "VTL|MD", "value": "Mesure de type liste" } }, + { "label": { "type": "VTL|MD", "value": "Mesure de type texte" } } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfkzpexn", + "page": "22", + "label": { + "type": "VTL|MD", + "value": "\"➡ 18. \" || \"Tableau un axe simple, plusieurs mesures, sans unité\"" + }, + "body": [ + [ + { "label": { "type": "VTL|MD", "value": "choix 1" }, "value": "1" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A3M11"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A3M11" }, + "decimals": 0, + "id": "jfkzpexn-QOP-kfs6zwqz" + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["TABLEAU1A3M12"], + "response": { "name": "TABLEAU1A3M12" }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "id": "jfkzpexn-QOP-kfs76fb2" + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAU1A3M13"], + "response": { "name": "TABLEAU1A3M13" }, + "id": "jfkzpexn-QOP-kfs6rhps", + "maxLength": 25 + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 2" }, "value": "2" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A3M21"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A3M21" }, + "decimals": 0, + "id": "jfkzpexn-QOP-kfs6n365" + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["TABLEAU1A3M22"], + "response": { "name": "TABLEAU1A3M22" }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "id": "jfkzpexn-QOP-kfs6p4en" + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAU1A3M23"], + "response": { "name": "TABLEAU1A3M23" }, + "id": "jfkzpexn-QOP-kfs6qqki", + "maxLength": 25 + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "[choix 3](. '1 2 3 soleil')" + }, + "value": "3" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A3M31"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A3M31" }, + "decimals": 0, + "id": "jfkzpexn-QOP-kfs6r9ry" + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["TABLEAU1A3M32"], + "response": { "name": "TABLEAU1A3M32" }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "id": "jfkzpexn-QOP-kfs6plyt" + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAU1A3M33"], + "response": { "name": "TABLEAU1A3M33" }, + "id": "jfkzpexn-QOP-kfs6yj1e", + "maxLength": 25 + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 4" }, "value": "4" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A3M41"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A3M41" }, + "decimals": 0, + "id": "jfkzpexn-QOP-kfs70a3j" + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["TABLEAU1A3M42"], + "response": { "name": "TABLEAU1A3M42" }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "id": "jfkzpexn-QOP-kfs71729" + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAU1A3M43"], + "response": { "name": "TABLEAU1A3M43" }, + "id": "jfkzpexn-QOP-kfs6tod7", + "maxLength": 25 + } + ], + [ + { "label": { "type": "VTL|MD", "value": "choix 5" }, "value": "5" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU1A3M51"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1A3M51" }, + "decimals": 0, + "id": "jfkzpexn-QOP-kfs6s3d1" + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["TABLEAU1A3M52"], + "response": { "name": "TABLEAU1A3M52" }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "id": "jfkzpexn-QOP-kfs6oml8" + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAU1A3M53"], + "response": { "name": "TABLEAU1A3M53" }, + "id": "jfkzpexn-QOP-kfs6vpzt", + "maxLength": 25 + } + ] + ], + "mandatory": false + }, + { + "componentType": "Table", + "bindingDependencies": [ + "TABLEAU2A11", + "TABLEAU2A12", + "TABLEAU2A13", + "TABLEAU2A14", + "TABLEAU2A15", + "TABLEAU2A21", + "TABLEAU2A22", + "TABLEAU2A23", + "TABLEAU2A24", + "TABLEAU2A25", + "TABLEAU2A31", + "TABLEAU2A32", + "TABLEAU2A33", + "TABLEAU2A34", + "TABLEAU2A35", + "TABLEAU2A41", + "TABLEAU2A42", + "TABLEAU2A43", + "TABLEAU2A44", + "TABLEAU2A45", + "TABLEAU2A51", + "TABLEAU2A52", + "TABLEAU2A53", + "TABLEAU2A54", + "TABLEAU2A55", + "TABLEAU2A61", + "TABLEAU2A62", + "TABLEAU2A63", + "TABLEAU2A64", + "TABLEAU2A65", + "TABLEAU2A71", + "TABLEAU2A72", + "TABLEAU2A73", + "TABLEAU2A74", + "TABLEAU2A75", + "TABLEAU2A81", + "TABLEAU2A82", + "TABLEAU2A83", + "TABLEAU2A84", + "TABLEAU2A85" + ], + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A11)) and (0>TABLEAU2A11 or 100TABLEAU2A11)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A12)) and (0>TABLEAU2A12 or 100TABLEAU2A12)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A13)) and (0>TABLEAU2A13 or 100TABLEAU2A13)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A14)) and (0>TABLEAU2A14 or 100TABLEAU2A14)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A15)) and (0>TABLEAU2A15 or 100TABLEAU2A15)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A21)) and (0>TABLEAU2A21 or 100TABLEAU2A21)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A22)) and (0>TABLEAU2A22 or 100TABLEAU2A22)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A23)) and (0>TABLEAU2A23 or 100TABLEAU2A23)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A24)) and (0>TABLEAU2A24 or 100TABLEAU2A24)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A25)) and (0>TABLEAU2A25 or 100TABLEAU2A25)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A31)) and (0>TABLEAU2A31 or 100TABLEAU2A31)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A32)) and (0>TABLEAU2A32 or 100TABLEAU2A32)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A33)) and (0>TABLEAU2A33 or 100TABLEAU2A33)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A34)) and (0>TABLEAU2A34 or 100TABLEAU2A34)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A35)) and (0>TABLEAU2A35 or 100TABLEAU2A35)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A41)) and (0>TABLEAU2A41 or 100TABLEAU2A41)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A42)) and (0>TABLEAU2A42 or 100TABLEAU2A42)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A43)) and (0>TABLEAU2A43 or 100TABLEAU2A43)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A44)) and (0>TABLEAU2A44 or 100TABLEAU2A44)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A45)) and (0>TABLEAU2A45 or 100TABLEAU2A45)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A51)) and (0>TABLEAU2A51 or 100TABLEAU2A51)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A52)) and (0>TABLEAU2A52 or 100TABLEAU2A52)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A53)) and (0>TABLEAU2A53 or 100TABLEAU2A53)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A54)) and (0>TABLEAU2A54 or 100TABLEAU2A54)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A55)) and (0>TABLEAU2A55 or 100TABLEAU2A55)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A61)) and (0>TABLEAU2A61 or 100TABLEAU2A61)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A62)) and (0>TABLEAU2A62 or 100TABLEAU2A62)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A63)) and (0>TABLEAU2A63 or 100TABLEAU2A63)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A64)) and (0>TABLEAU2A64 or 100TABLEAU2A64)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A65)) and (0>TABLEAU2A65 or 100TABLEAU2A65)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A71)) and (0>TABLEAU2A71 or 100TABLEAU2A71)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A72)) and (0>TABLEAU2A72 or 100TABLEAU2A72)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A73)) and (0>TABLEAU2A73 or 100TABLEAU2A73)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A74)) and (0>TABLEAU2A74 or 100TABLEAU2A74)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A75)) and (0>TABLEAU2A75 or 100TABLEAU2A75)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A81)) and (0>TABLEAU2A81 or 100TABLEAU2A81)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A82)) and (0>TABLEAU2A82 or 100TABLEAU2A82)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A83)) and (0>TABLEAU2A83 or 100TABLEAU2A83)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A84)) and (0>TABLEAU2A84 or 100TABLEAU2A84)" + }, + "id": "jfkzttm3-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU2A85)) and (0>TABLEAU2A85 or 100TABLEAU2A85)" + }, + "id": "jfkzttm3-format-decimal" + } + ], + "positioning": "HORIZONTAL", + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "header": [ + { "label": { "type": "VTL|MD", "value": "" } }, + { "label": { "type": "VTL|MD", "value": "choix 1" } }, + { "label": { "type": "VTL|MD", "value": "choix 2" } }, + { + "label": { "type": "VTL|MD", "value": "[choix 3](. '1 2 3 soleil')" } + }, + { "label": { "type": "VTL|MD", "value": "choix 4" } }, + { "label": { "type": "VTL|MD", "value": "choix 5" } } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfkzttm3", + "page": "23", + "label": { + "type": "VTL|MD", + "value": "\"➡ 19. \" || \"Tableau 2 axes - 1 mesure de type numérique, sans unité\"" + }, + "body": [ + [ + { + "label": { + "type": "VTL|MD", + "value": "code1 : le libellé du code 1 contient **du gras**" + }, + "value": "1" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A11"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A11" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs74dod" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A12"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A12" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs714gr" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A13"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A13" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6yh8c" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A14"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A14" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6wx2s" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A15"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A15" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6ycig" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "code2 le libellé du code 2 contient *de l’italique*" + }, + "value": "2" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A21"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A21" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6p839" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A22"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A22" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6qzke" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A23"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A23" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6wcke" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A24"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A24" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6swtm" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A25"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A25" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6wkxw" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "code3 : le libellé du code 3 contient **du gras** et *de l’italique*" + }, + "value": "3" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A31"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A31" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs74pe1" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A32"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A32" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6r6v2" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A33"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A33" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs71abh" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A34"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A34" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs71r6u" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A35"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A35" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs70wj3" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "code4 : le libellé du code 4 contient du ***gras italique***" + }, + "value": "4" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A41"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A41" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6std4" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A42"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A42" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6wteu" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A43"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A43" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6o4tr" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A44"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A44" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs70s5e" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A45"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A45" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs73tkt" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "code5 : le libellé du code 5 contient des retours à la ligne ligne 2 ligne 3" + }, + "value": "5" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A51"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A51" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs765pz" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A52"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A52" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6vlxk" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A53"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A53" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs70fpo" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A54"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A54" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6yf0h" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A55"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A55" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs72bf8" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "code6" }, "value": "6" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A61"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A61" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6psi9" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A62"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A62" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs714kn" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A63"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A63" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs770cc" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A64"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A64" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs75dsl" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A65"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A65" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6pfhm" + } + ], + [ + { + "label": { + "type": "VTL|MD", + "value": "[code7](. 'My name is Bond, James Bond') le code 7 porte une infobulle" + }, + "value": "7" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A71"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A71" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6oi5b" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A72"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A72" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs74cck" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A73"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A73" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6zzlh" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A74"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A74" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs77kxk" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A75"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A75" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6wdle" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "code8" }, "value": "8" }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A81"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A81" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6o718" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A82"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A82" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6uhz5" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A83"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A83" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs6r0f9" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A84"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A84" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs751qu" + }, + { + "componentType": "InputNumber", + "bindingDependencies": ["TABLEAU2A85"], + "min": 0, + "max": 100, + "response": { "name": "TABLEAU2A85" }, + "decimals": 0, + "id": "jfkzttm3-QOP-kfs77396" + } + ] + ], + "mandatory": false + }, + { + "componentType": "Table", + "bindingDependencies": [ + "TABLEAU1AH1M11", + "TABLEAU1AH1M21", + "TABLEAU1AH1M31", + "TABLEAU1AH1M41", + "TABLEAU1AH1M51", + "TABLEAU1AH1M61" + ], + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M11)) and (0>TABLEAU1AH1M11 or 999TABLEAU1AH1M11)" + }, + "id": "jfkzrwce-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M21)) and (0>TABLEAU1AH1M21 or 999TABLEAU1AH1M21)" + }, + "id": "jfkzrwce-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M31)) and (0>TABLEAU1AH1M31 or 999TABLEAU1AH1M31)" + }, + "id": "jfkzrwce-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M41)) and (0>TABLEAU1AH1M41 or 999TABLEAU1AH1M41)" + }, + "id": "jfkzrwce-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M51)) and (0>TABLEAU1AH1M51 or 999TABLEAU1AH1M51)" + }, + "id": "jfkzrwce-format-decimal" + }, + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 999.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TABLEAU1AH1M61)) and (0>TABLEAU1AH1M61 or 999TABLEAU1AH1M61)" + }, + "id": "jfkzrwce-format-decimal" + } + ], + "positioning": "HORIZONTAL", + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "header": [ + { "colspan": 2, "label": { "type": "VTL|MD", "value": "" } }, + { + "label": { + "type": "VTL|MD", + "value": "Mesure de type numérique avec unité" + } + } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "jfkzrwce", + "page": "24", + "label": { + "type": "VTL|MD", + "value": "\"➡ 20. \" || \"Tableau 1 axe avec hiérarchie , 1 mesure, avec unité\"" + }, + "body": [ + [ + { + "rowspan": 2, + "label": { "type": "VTL|MD", "value": "code1" }, + "value": "10" + }, + { "label": { "type": "VTL|MD", "value": "code 1 1" }, "value": "11" }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M11"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M11" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs70aez" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "code 1 2" }, "value": "12" }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M21"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M21" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs6o7rs" + } + ], + [ + { + "rowspan": 3, + "label": { "type": "VTL|MD", "value": "code2" }, + "value": "20" + }, + { "label": { "type": "VTL|MD", "value": "code 2 1" }, "value": "21" }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M31"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M31" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs72t19" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "code 2 2" }, "value": "22" }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M41"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M41" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs77h7l" + } + ], + [ + { "label": { "type": "VTL|MD", "value": "code 2 3" }, "value": "23" }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M51"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M51" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs6vcz9" + } + ], + [ + { + "colspan": 2, + "label": { "type": "VTL|MD", "value": "code 3" }, + "value": "30" + }, + { + "componentType": "InputNumber", + "unit": "k€", + "bindingDependencies": ["TABLEAU1AH1M61"], + "min": 0, + "max": 999, + "response": { "name": "TABLEAU1AH1M61" }, + "decimals": 0, + "id": "jfkzrwce-QOP-kfs7347h" + } + ] + ], + "mandatory": false + }, + { + "componentType": "Input", + "bindingDependencies": ["TABLEAUDYN"], + "response": { "name": "TABLEAUDYN" }, + "hierarchy": { + "sequence": { + "id": "jfkyvabw", + "page": "19", + "label": { "type": "VTL|MD", "value": "\"III - \" || \"Tableaux\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k6c6kj14", + "page": "25", + "label": { + "type": "VTL|MD", + "value": "\"➡ 21. \" || \"Tableau dynamique jusque 5 lignes, 2 mesures dont une unité A CREER\"" + }, + "mandatory": false, + "maxLength": 249, + "declarations": [ + { + "declarationType": "STATEMENT", + "id": "k6c6qh0u-SI", + "label": { + "type": "VTL|MD", + "value": "La question suivante est une question de type tableau dynamique." + }, + "position": "BEFORE_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + }, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "k3opdj10-k6c39mjo", + "label": { + "type": "VTL|MD", + "value": "Nous allons maintenant personnaliser ce questionnaire" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["PRENOM"], + "controls": [ + { + "bindingDependencies": ["PRENOM"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Merci de renseigner votre prénom\"" + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(PRENOM,\"\")=\"\")" }, + "id": "k6c3ia6n-CI-0" + } + ], + "response": { "name": "PRENOM" }, + "hierarchy": { + "sequence": { + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k6c3ia6n", + "page": "27", + "label": { + "type": "VTL|MD", + "value": "\"➡ 22. \" || \"Quel est votre prénom ? \"" + }, + "mandatory": false, + "maxLength": 25, + "declarations": [ + { + "declarationType": "HELP", + "id": "k6c3ia6n-kzf8uqsy", + "label": { "type": "VTL|MD", "value": "Controle sur prénom vide" }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Input", + "bindingDependencies": ["EMAIL"], + "response": { "name": "EMAIL" }, + "hierarchy": { + "sequence": { + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k6gjzooe", + "page": "28", + "label": { + "type": "VTL|MD", + "value": "\"➡ 23. \" || \"Quelle est votre adresse email ?\"" + }, + "mandatory": false, + "maxLength": 80 + }, + { + "componentType": "Subsequence", + "bindingDependencies": ["PRENOM"], + "goToPage": "29", + "hierarchy": { + "sequence": { + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + } + }, + "subSequence": { + "id": "k3opeux2", + "page": "29", + "label": { + "type": "VTL|MD", + "value": "\"Description socio démo de \"|| PRENOM" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k3opeux2", + "page": "29", + "label": { + "type": "VTL|MD", + "value": "\"Description socio démo de \"|| PRENOM" + }, + "declarations": [ + { + "declarationType": "HELP", + "id": "k3opeux2-kzf8lbqn", + "label": { + "type": "VTL|MD", + "value": "Ajouter une décla sinon le titre de sous seq n’apparait pas" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "CheckboxOne", + "bindingDependencies": ["PRENOM", "MAJEUR"], + "response": { "name": "MAJEUR" }, + "hierarchy": { + "sequence": { + "id": "k3opdj10", + "page": "26", + "label": { + "type": "VTL|MD", + "value": "\"IV - \" || \"Séquence personnalisée et comportant des filtres\"" + } + }, + "subSequence": { + "id": "k3opeux2", + "page": "29", + "label": { + "type": "VTL|MD", + "value": "\"Description socio démo de \"|| PRENOM" + } + } + }, + "options": [ + { "label": { "type": "VTL|MD", "value": "Oui" }, "value": "1" }, + { "label": { "type": "VTL|MD", "value": "Non" }, "value": "2" } + ], + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k6c6mt9g", + "page": "30", + "label": { + "type": "VTL|MD", + "value": "\"➡ 24. \" || \"Bonjour \" || PRENOM || \", êtes vous majeur ?\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "INSTRUCTION", + "id": "k6c6mt9g-k6cbmkuw", + "label": { + "type": "VTL|MD", + "value": "\"Si vous répondez oui, alors les questions 27/28 apparaîtront\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ] + }, + { + "componentType": "Datepicker", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\"La date saisie doit être comprise entre 1900 et 2020.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(NAISSANCE)) and (cast(NAISSANCE, date, \"YYYY\")>cast(\"2020\", date, \"YYYY\") or cast(NAISSANCE, date, \"YYYY\")NBPERS or 20NBPERS)" + }, + "id": "k6c748uq-format-decimal" + } + ], + "max": 20, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "k6c75pyx", + "page": "36", + "label": { "type": "VTL|MD", "value": "Description de votre ménage" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 29. \" || \"Combien de personnes vivent dans votre logement, y compris vous ?\"" + }, + "mandatory": false, + "bindingDependencies": ["NBPERS"], + "min": 0, + "response": { "name": "NBPERS" }, + "decimals": 0, + "id": "k6c748uq", + "page": "37" + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 20.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(NBENFANT)) and (0>NBENFANT or 20NBENFANT)" + }, + "id": "k6c7oj3o-format-decimal" + }, + { + "bindingDependencies": ["NBPERS", "NBENFANT", "NBADULTES"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"le ménage doit comporter au moins un adulte. Vous en déclarez \" || cast(NBADULTES,string) " + }, + "typeOfControl": "CONSISTENCY", + "control": { + "type": "VTL", + "value": "not(nvl(NBPERS,0) - nvl(NBENFANT,0) < 1)" + }, + "id": "k6c7oj3o-CI-0" + } + ], + "max": 20, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "k6c75pyx", + "page": "36", + "label": { "type": "VTL|MD", "value": "Description de votre ménage" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 30. \" || \"Combien avez vous d’enfants à charge ?\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "k6c7oj3o-kzf9l7fc", + "label": { "type": "VTL|MD", "value": "Controle sur nb enfants" }, + "position": "AFTER_QUESTION_TEXT" + }, + { + "declarationType": "HELP", + "id": "k6c7oj3o-kzf9gony", + "label": { + "type": "VTL|MD", + "value": "\"Nb adultes : \" || cast(nvl(NBADULTES,0),string)" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["NBADULTES", "NBENFANT"], + "min": 0, + "response": { "name": "NBENFANT" }, + "decimals": 0, + "id": "k6c7oj3o", + "page": "38" + }, + { + "paginatedLoop": false, + "componentType": "Loop", + "loopDependencies": ["NBPERS"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["NBPERS"], + "goToPage": "39", + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "l8uaq797", + "page": "39", + "label": { "type": "VTL|MD", "value": "Décrire chaque habitant" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l8uaq797", + "page": "39", + "label": { "type": "VTL|MD", "value": "Décrire chaque habitant" } + }, + { + "componentType": "Input", + "bindingDependencies": ["THL_PRENOM", "NBPERS"], + "response": { "name": "THL_PRENOM" }, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "l8uaq797", + "page": "39", + "label": { "type": "VTL|MD", "value": "Décrire chaque habitant" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "k6ca0fk1", + "page": "39", + "label": { "type": "VTL|MD", "value": "\"➡ 31. \" || \"Nom\"" }, + "mandatory": false, + "maxLength": 249 + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 100.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(THL_AGE)) and (0>THL_AGE or 100THL_AGE)" + }, + "id": "l8uav5ld-format-decimal" + } + ], + "max": 100, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "l8uaq797", + "page": "39", + "label": { "type": "VTL|MD", "value": "Décrire chaque habitant" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 32. \" || \"Age entre 0 et 100\"" + }, + "mandatory": false, + "unit": "années", + "bindingDependencies": ["THL_AGE", "NBPERS"], + "min": 0, + "response": { "name": "THL_AGE" }, + "decimals": 0, + "id": "l8uav5ld", + "page": "39" + } + ], + "bindingDependencies": ["NBPERS", "THL_PRENOM", "THL_AGE"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l8uayz0h", + "page": "39", + "lines": { + "min": { "type": "VTL", "value": "nvl(NBPERS,1)" }, + "max": { "type": "VTL", "value": "nvl(NBPERS,1)" } + } + }, + { + "paginatedLoop": true, + "componentType": "Loop", + "loopDependencies": ["THL_PRENOM", "THL_AGE"], + "components": [ + { + "componentType": "Subsequence", + "bindingDependencies": ["THL_PRENOM", "THL_AGE"], + "goToPage": "40.1", + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "kzf9qrnj", + "page": "40.1", + "label": { + "type": "VTL|MD", + "value": "\"Questionnaire individuel de \" || THL_PRENOM" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kzf9qrnj", + "label": { + "type": "VTL|MD", + "value": "\"Questionnaire individuel de \" || THL_PRENOM" + } + }, + { + "componentType": "InputNumber", + "controls": [ + { + "criticality": "ERROR", + "errorMessage": { + "type": "VTL|MD", + "value": "\" La valeur doit être comprise entre 0 et 300.\"" + }, + "typeOfControl": "FORMAT", + "control": { + "type": "VTL", + "value": "not(not(isnull(TAILLE)) and (0>TAILLE or 300TAILLE)" + }, + "id": "k6ccf759-format-decimal" + }, + { + "bindingDependencies": ["TAILLE", "THL_AGE"], + "criticality": "WARN", + "errorMessage": { + "type": "VTL|MD", + "value": "\"Vous êtes bien petit pour votre âge. Vous avez \" || cast(THL_AGE,string) || \" ans ?\" " + }, + "typeOfControl": "CONSISTENCY", + "control": { "type": "VTL", "value": "not(nvl(TAILLE,81) < 80)" }, + "id": "k6ccf759-CI-0" + } + ], + "max": 300, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + }, + "subSequence": { + "id": "kzf9qrnj", + "page": "40.1", + "label": { + "type": "VTL|MD", + "value": "\"Questionnaire individuel de \" || THL_PRENOM" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "label": { + "type": "VTL|MD", + "value": "\"➡ 33. \" || THL_PRENOM || \", quelle est votre taille en centimètres ?\"" + }, + "mandatory": false, + "declarations": [ + { + "declarationType": "HELP", + "id": "k6ccf759-kzfaujvy", + "label": { + "type": "VTL|MD", + "value": "\"Controle sur taille - si taille < 80\"" + }, + "position": "AFTER_QUESTION_TEXT" + } + ], + "bindingDependencies": ["THL_PRENOM", "TAILLE", "THL_AGE"], + "min": 0, + "response": { "name": "TAILLE" }, + "decimals": 0, + "id": "k6ccf759", + "page": "40.1" + } + ], + "bindingDependencies": ["THL_PRENOM", "TAILLE", "THL_AGE"], + "depth": 1, + "hierarchy": { + "sequence": { + "id": "l262oeox", + "page": "35", + "label": { + "type": "VTL|MD", + "value": "\"V - \" || \"PERSO - Composition du ménage - boucle type logement\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "kfs6ox4i", + "page": "40", + "maxPage": "1", + "iterations": { "type": "VTL", "value": "count(THL_PRENOM)" } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "l8uan6l7", + "page": "41", + "label": { + "type": "VTL|MD", + "value": "\"VI - \" || \"FIN QUESTIONNAIRE\"" + } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "l8uan6l7", + "page": "41", + "label": { + "type": "VTL|MD", + "value": "\"VI - \" || \"FIN QUESTIONNAIRE\"" + } + }, + { + "componentType": "Sequence", + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "42", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-SEQ", + "page": "42", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + }, + { + "componentType": "Textarea", + "bindingDependencies": ["COMMENT_QE"], + "response": { "name": "COMMENT_QE" }, + "hierarchy": { + "sequence": { + "id": "COMMENT-SEQ", + "page": "42", + "label": { "type": "VTL|MD", "value": "\"Commentaire\"" } + } + }, + "conditionFilter": { "type": "VTL", "value": "true" }, + "id": "COMMENT-QUESTION", + "page": "43", + "label": { + "type": "VTL|MD", + "value": "\"Avez-vous des remarques concernant l'enquête ou des commentaires ?\"" + }, + "mandatory": false, + "maxLength": 2000 + } + ], + "pagination": "question", + "resizing": { + "NBPERS": { + "variables": ["THL_PRENOM", "THL_AGE", "TAILLE"], + "size": "nvl(NBPERS,1)" + } + }, + "label": { + "type": "VTL|MD", + "value": "QNONREG - Questionnaire tous composants" + }, + "lunaticModelVersion": "2.3.2-rc7", + "modele": "RESPDESIGN", + "enoCoreVersion": "2.4.1-pairwise", + "generatingDate": "26-06-2023 12:57:59", + "missing": false, + "id": "l9o7l439", + "maxPage": "43" +} diff --git a/tests-examples/demo-todo-app.spec.ts b/tests-examples/demo-todo-app.spec.ts new file mode 100644 index 00000000..2fd6016f --- /dev/null +++ b/tests-examples/demo-todo-app.spec.ts @@ -0,0 +1,437 @@ +import { test, expect, type Page } from '@playwright/test'; + +test.beforeEach(async ({ page }) => { + await page.goto('https://demo.playwright.dev/todomvc'); +}); + +const TODO_ITEMS = [ + 'buy some cheese', + 'feed the cat', + 'book a doctors appointment' +]; + +test.describe('New Todo', () => { + test('should allow me to add todo items', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + // Create 1st todo. + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press('Enter'); + + // Make sure the list only has one todo item. + await expect(page.getByTestId('todo-title')).toHaveText([ + TODO_ITEMS[0] + ]); + + // Create 2nd todo. + await newTodo.fill(TODO_ITEMS[1]); + await newTodo.press('Enter'); + + // Make sure the list now has two todo items. + await expect(page.getByTestId('todo-title')).toHaveText([ + TODO_ITEMS[0], + TODO_ITEMS[1] + ]); + + await checkNumberOfTodosInLocalStorage(page, 2); + }); + + test('should clear text input field when an item is added', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + // Create one todo item. + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press('Enter'); + + // Check that input is empty. + await expect(newTodo).toBeEmpty(); + await checkNumberOfTodosInLocalStorage(page, 1); + }); + + test('should append new items to the bottom of the list', async ({ page }) => { + // Create 3 items. + await createDefaultTodos(page); + + // create a todo count locator + const todoCount = page.getByTestId('todo-count') + + // Check test using different methods. + await expect(page.getByText('3 items left')).toBeVisible(); + await expect(todoCount).toHaveText('3 items left'); + await expect(todoCount).toContainText('3'); + await expect(todoCount).toHaveText(/3/); + + // Check all items in one call. + await expect(page.getByTestId('todo-title')).toHaveText(TODO_ITEMS); + await checkNumberOfTodosInLocalStorage(page, 3); + }); +}); + +test.describe('Mark all as completed', () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test.afterEach(async ({ page }) => { + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test('should allow me to mark all items as completed', async ({ page }) => { + // Complete all todos. + await page.getByLabel('Mark all as complete').check(); + + // Ensure all todos have 'completed' class. + await expect(page.getByTestId('todo-item')).toHaveClass(['completed', 'completed', 'completed']); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + }); + + test('should allow me to clear the complete state of all items', async ({ page }) => { + const toggleAll = page.getByLabel('Mark all as complete'); + // Check and then immediately uncheck. + await toggleAll.check(); + await toggleAll.uncheck(); + + // Should be no completed classes. + await expect(page.getByTestId('todo-item')).toHaveClass(['', '', '']); + }); + + test('complete all checkbox should update state when items are completed / cleared', async ({ page }) => { + const toggleAll = page.getByLabel('Mark all as complete'); + await toggleAll.check(); + await expect(toggleAll).toBeChecked(); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + + // Uncheck first todo. + const firstTodo = page.getByTestId('todo-item').nth(0); + await firstTodo.getByRole('checkbox').uncheck(); + + // Reuse toggleAll locator and make sure its not checked. + await expect(toggleAll).not.toBeChecked(); + + await firstTodo.getByRole('checkbox').check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 3); + + // Assert the toggle all is checked again. + await expect(toggleAll).toBeChecked(); + }); +}); + +test.describe('Item', () => { + + test('should allow me to mark items as complete', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + // Create two items. + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press('Enter'); + } + + // Check first item. + const firstTodo = page.getByTestId('todo-item').nth(0); + await firstTodo.getByRole('checkbox').check(); + await expect(firstTodo).toHaveClass('completed'); + + // Check second item. + const secondTodo = page.getByTestId('todo-item').nth(1); + await expect(secondTodo).not.toHaveClass('completed'); + await secondTodo.getByRole('checkbox').check(); + + // Assert completed class. + await expect(firstTodo).toHaveClass('completed'); + await expect(secondTodo).toHaveClass('completed'); + }); + + test('should allow me to un-mark items as complete', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + // Create two items. + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press('Enter'); + } + + const firstTodo = page.getByTestId('todo-item').nth(0); + const secondTodo = page.getByTestId('todo-item').nth(1); + const firstTodoCheckbox = firstTodo.getByRole('checkbox'); + + await firstTodoCheckbox.check(); + await expect(firstTodo).toHaveClass('completed'); + await expect(secondTodo).not.toHaveClass('completed'); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + await firstTodoCheckbox.uncheck(); + await expect(firstTodo).not.toHaveClass('completed'); + await expect(secondTodo).not.toHaveClass('completed'); + await checkNumberOfCompletedTodosInLocalStorage(page, 0); + }); + + test('should allow me to edit an item', async ({ page }) => { + await createDefaultTodos(page); + + const todoItems = page.getByTestId('todo-item'); + const secondTodo = todoItems.nth(1); + await secondTodo.dblclick(); + await expect(secondTodo.getByRole('textbox', { name: 'Edit' })).toHaveValue(TODO_ITEMS[1]); + await secondTodo.getByRole('textbox', { name: 'Edit' }).fill('buy some sausages'); + await secondTodo.getByRole('textbox', { name: 'Edit' }).press('Enter'); + + // Explicitly assert the new text value. + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + 'buy some sausages', + TODO_ITEMS[2] + ]); + await checkTodosInLocalStorage(page, 'buy some sausages'); + }); +}); + +test.describe('Editing', () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test('should hide other controls when editing', async ({ page }) => { + const todoItem = page.getByTestId('todo-item').nth(1); + await todoItem.dblclick(); + await expect(todoItem.getByRole('checkbox')).not.toBeVisible(); + await expect(todoItem.locator('label', { + hasText: TODO_ITEMS[1], + })).not.toBeVisible(); + await checkNumberOfTodosInLocalStorage(page, 3); + }); + + test('should save edits on blur', async ({ page }) => { + const todoItems = page.getByTestId('todo-item'); + await todoItems.nth(1).dblclick(); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages'); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).dispatchEvent('blur'); + + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + 'buy some sausages', + TODO_ITEMS[2], + ]); + await checkTodosInLocalStorage(page, 'buy some sausages'); + }); + + test('should trim entered text', async ({ page }) => { + const todoItems = page.getByTestId('todo-item'); + await todoItems.nth(1).dblclick(); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill(' buy some sausages '); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter'); + + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + 'buy some sausages', + TODO_ITEMS[2], + ]); + await checkTodosInLocalStorage(page, 'buy some sausages'); + }); + + test('should remove the item if an empty text string was entered', async ({ page }) => { + const todoItems = page.getByTestId('todo-item'); + await todoItems.nth(1).dblclick(); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill(''); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Enter'); + + await expect(todoItems).toHaveText([ + TODO_ITEMS[0], + TODO_ITEMS[2], + ]); + }); + + test('should cancel edits on escape', async ({ page }) => { + const todoItems = page.getByTestId('todo-item'); + await todoItems.nth(1).dblclick(); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).fill('buy some sausages'); + await todoItems.nth(1).getByRole('textbox', { name: 'Edit' }).press('Escape'); + await expect(todoItems).toHaveText(TODO_ITEMS); + }); +}); + +test.describe('Counter', () => { + test('should display the current number of todo items', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + // create a todo count locator + const todoCount = page.getByTestId('todo-count') + + await newTodo.fill(TODO_ITEMS[0]); + await newTodo.press('Enter'); + + await expect(todoCount).toContainText('1'); + + await newTodo.fill(TODO_ITEMS[1]); + await newTodo.press('Enter'); + await expect(todoCount).toContainText('2'); + + await checkNumberOfTodosInLocalStorage(page, 2); + }); +}); + +test.describe('Clear completed button', () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + }); + + test('should display the correct text', async ({ page }) => { + await page.locator('.todo-list li .toggle').first().check(); + await expect(page.getByRole('button', { name: 'Clear completed' })).toBeVisible(); + }); + + test('should remove completed items when clicked', async ({ page }) => { + const todoItems = page.getByTestId('todo-item'); + await todoItems.nth(1).getByRole('checkbox').check(); + await page.getByRole('button', { name: 'Clear completed' }).click(); + await expect(todoItems).toHaveCount(2); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]); + }); + + test('should be hidden when there are no items that are completed', async ({ page }) => { + await page.locator('.todo-list li .toggle').first().check(); + await page.getByRole('button', { name: 'Clear completed' }).click(); + await expect(page.getByRole('button', { name: 'Clear completed' })).toBeHidden(); + }); +}); + +test.describe('Persistence', () => { + test('should persist its data', async ({ page }) => { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + for (const item of TODO_ITEMS.slice(0, 2)) { + await newTodo.fill(item); + await newTodo.press('Enter'); + } + + const todoItems = page.getByTestId('todo-item'); + const firstTodoCheck = todoItems.nth(0).getByRole('checkbox'); + await firstTodoCheck.check(); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]); + await expect(firstTodoCheck).toBeChecked(); + await expect(todoItems).toHaveClass(['completed', '']); + + // Ensure there is 1 completed item. + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + // Now reload. + await page.reload(); + await expect(todoItems).toHaveText([TODO_ITEMS[0], TODO_ITEMS[1]]); + await expect(firstTodoCheck).toBeChecked(); + await expect(todoItems).toHaveClass(['completed', '']); + }); +}); + +test.describe('Routing', () => { + test.beforeEach(async ({ page }) => { + await createDefaultTodos(page); + // make sure the app had a chance to save updated todos in storage + // before navigating to a new view, otherwise the items can get lost :( + // in some frameworks like Durandal + await checkTodosInLocalStorage(page, TODO_ITEMS[0]); + }); + + test('should allow me to display active items', async ({ page }) => { + const todoItem = page.getByTestId('todo-item'); + await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); + + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole('link', { name: 'Active' }).click(); + await expect(todoItem).toHaveCount(2); + await expect(todoItem).toHaveText([TODO_ITEMS[0], TODO_ITEMS[2]]); + }); + + test('should respect the back button', async ({ page }) => { + const todoItem = page.getByTestId('todo-item'); + await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); + + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + + await test.step('Showing all items', async () => { + await page.getByRole('link', { name: 'All' }).click(); + await expect(todoItem).toHaveCount(3); + }); + + await test.step('Showing active items', async () => { + await page.getByRole('link', { name: 'Active' }).click(); + }); + + await test.step('Showing completed items', async () => { + await page.getByRole('link', { name: 'Completed' }).click(); + }); + + await expect(todoItem).toHaveCount(1); + await page.goBack(); + await expect(todoItem).toHaveCount(2); + await page.goBack(); + await expect(todoItem).toHaveCount(3); + }); + + test('should allow me to display completed items', async ({ page }) => { + await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole('link', { name: 'Completed' }).click(); + await expect(page.getByTestId('todo-item')).toHaveCount(1); + }); + + test('should allow me to display all items', async ({ page }) => { + await page.getByTestId('todo-item').nth(1).getByRole('checkbox').check(); + await checkNumberOfCompletedTodosInLocalStorage(page, 1); + await page.getByRole('link', { name: 'Active' }).click(); + await page.getByRole('link', { name: 'Completed' }).click(); + await page.getByRole('link', { name: 'All' }).click(); + await expect(page.getByTestId('todo-item')).toHaveCount(3); + }); + + test('should highlight the currently applied filter', async ({ page }) => { + await expect(page.getByRole('link', { name: 'All' })).toHaveClass('selected'); + + //create locators for active and completed links + const activeLink = page.getByRole('link', { name: 'Active' }); + const completedLink = page.getByRole('link', { name: 'Completed' }); + await activeLink.click(); + + // Page change - active items. + await expect(activeLink).toHaveClass('selected'); + await completedLink.click(); + + // Page change - completed items. + await expect(completedLink).toHaveClass('selected'); + }); +}); + +async function createDefaultTodos(page: Page) { + // create a new todo locator + const newTodo = page.getByPlaceholder('What needs to be done?'); + + for (const item of TODO_ITEMS) { + await newTodo.fill(item); + await newTodo.press('Enter'); + } +} + +async function checkNumberOfTodosInLocalStorage(page: Page, expected: number) { + return await page.waitForFunction(e => { + return JSON.parse(localStorage['react-todos']).length === e; + }, expected); +} + +async function checkNumberOfCompletedTodosInLocalStorage(page: Page, expected: number) { + return await page.waitForFunction(e => { + return JSON.parse(localStorage['react-todos']).filter((todo: any) => todo.completed).length === e; + }, expected); +} + +async function checkTodosInLocalStorage(page: Page, title: string) { + return await page.waitForFunction(t => { + return JSON.parse(localStorage['react-todos']).map((todo: any) => todo.title).includes(t); + }, title); +} diff --git a/yarn.lock b/yarn.lock index 3efa29b0..18be0570 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1884,6 +1884,16 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@playwright/test@^1.35.1": + version "1.35.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.35.1.tgz#a596b61e15b980716696f149cc7a2002f003580c" + integrity sha512-b5YoFe6J9exsMYg0pQAobNDR85T1nLumUYgUTtKm4d21iX2L7WqKq9dW8NGJ+2vX0etZd+Y7UeuqsxDXm9+5ZA== + dependencies: + "@types/node" "*" + playwright-core "1.35.1" + optionalDependencies: + fsevents "2.3.2" + "@pmmmwh/react-refresh-webpack-plugin@0.4.2": version "0.4.2" resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.4.2.tgz#1f9741e0bde9790a0e13272082ed7272a083620d" @@ -6519,6 +6529,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@2.3.2, fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + fsevents@^1.2.7: version "1.2.13" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" @@ -6527,11 +6542,6 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -10353,6 +10363,11 @@ pkg-up@3.1.0: dependencies: find-up "^3.0.0" +playwright-core@1.35.1: + version "1.35.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.35.1.tgz#52c1e6ffaa6a8c29de1a5bdf8cce0ce290ffb81d" + integrity sha512-pNXb6CQ7OqmGDRspEjlxE49w+4YtR6a3X6mT1hZXeJHWmsEz7SunmvZeiG/+y1yyMZdHnnn73WKYdtV1er0Xyg== + pnp-webpack-plugin@1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz#c9711ac4dc48a685dabafc86f8b6dd9f8df84149"