{"version":3,"names":["test","expect","runSteps","configure","ai","gateway","models","stepExecution","userFlowLow","userFlowHigh","assertionPrimary","assertionSecondary","assertionArbiter","TARGET","TEST_EMAIL","page","setTimeout","submitResponses","on","res","url","includes","push","status","ts","Date","toISOString","source","userFlow","steps","description","data","value","waitUntil","assertions","assertion","console","log","JSON","stringify","length","toBeGreaterThan","some","r","toBeTruthy"],"sources":["applicateur-hubspot.spec.ts"],"sourcesContent":["import { test, expect } from \"@playwright/test\";\nimport { runSteps, configure } from \"passmark\";\n\nconfigure({\n  ai: {\n    gateway: \"vercel\",\n    models: {\n      stepExecution: \"google/gemini-3.5-flash\",\n      userFlowLow: \"google/gemini-3-flash-preview\",\n      userFlowHigh: \"google/gemini-3.5-flash\",\n      assertionPrimary: \"anthropic/claude-sonnet-4.6\",\n      assertionSecondary: \"google/gemini-3-flash\",\n      assertionArbiter: \"anthropic/claude-sonnet-4.6\",\n    },\n  },\n});\n\nconst TARGET = \"https://covalba-next-wp-tom-integration-hubspot-client.paf-studio.dev/devenir-applicateur\";\nconst TEST_EMAIL = \"paf-studio-code+applicateur@agentmail.to\";\n\ntest(\"Formulaire Devenir Applicateur -> HubSpot (live)\", async ({ page }) => {\n  test.setTimeout(600_000);\n  const submitResponses: { url: string; status: number }[] = [];\n  page.on(\"response\", (res) => {\n    if (res.url().includes(\"/submissions/v3/integration/submit/\")) {\n      submitResponses.push({ url: res.url(), status: res.status() });\n    }\n  });\n  const ts = new Date().toISOString();\n  const source = `Test automatise Passmark (lead de test, ignorer) ${ts}`;\n  await runSteps({\n    page,\n    userFlow: \"Remplir entierement et soumettre le formulaire de candidature applicateur Covalba\",\n    steps: [\n      { description: `Navigate to ${TARGET}` },\n      { description: \"Scroll to the applicateur application form\" },\n      { description: \"Type the first name into the 'Prénom' input\", data: { value: \"Claude\" } },\n      { description: \"Type the last name into the 'Nom' input\", data: { value: \"TEST-Applicateur\" } },\n      { description: \"Type the email into the 'E-mail professionnel' input\", data: { value: TEST_EMAIL } },\n      { description: \"Type the phone number into the phone field (France +33 is preselected)\", data: { value: \"0612345678\" } },\n      { description: \"Type the company into the \\\"Nom de l'entreprise\\\" input\", data: { value: \"Paf-Studio Code (TEST)\" } },\n      { description: \"Type the city into the 'Ville' input\", data: { value: \"Orléans\" } },\n      { description: \"Type the company creation year into the 'Année de création de l'entreprise' number input\", data: { value: \"2015\" } },\n      { description: \"Check the checkbox labelled 'J'ai déjà effectué au moins un chantier cool roof'\" },\n      { description: \"Type into the 'Métier(s)' input\", data: { value: \"Étanchéité\" } },\n      { description: \"In the 'Clientèle' section, click/check the 'Tertiaire' option card\" },\n      { description: \"In the 'Clientèle' section, also click/check the 'Industries' option card\" },\n      { description: \"Type into the 'Où avez-vous entendu parler de Covalba ?' input\", data: { value: source } },\n      { description: \"Check the RGPD consent checkbox about Covalba processing your data\" },\n      { description: \"Click the 'Envoyer ma candidature' submit button\", waitUntil: \"A success confirmation with the heading 'Candidature envoyée !' is visible\" },\n    ],\n    assertions: [\n      { assertion: \"The form shows a success confirmation with a green check icon and the heading 'Candidature envoyée !'. The form fields are no longer visible.\" },\n    ],\n    test,\n    expect,\n  });\n  console.log(\"[hubspot] submit responses:\", JSON.stringify(submitResponses));\n  expect(submitResponses.length, \"au moins une requête HubSpot submit\").toBeGreaterThan(0);\n  expect(submitResponses.some((r) => r.status === 200), `HubSpot 200 attendu, recu ${JSON.stringify(submitResponses)}`).toBeTruthy();\n});\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,MAAM,QAAQ,kBAAkB;AAC/C,SAASC,QAAQ,EAAEC,SAAS,QAAQ,UAAU;AAE9CA,SAAS,CAAC;EACRC,EAAE,EAAE;IACFC,OAAO,EAAE,QAAQ;IACjBC,MAAM,EAAE;MACNC,aAAa,EAAE,yBAAyB;MACxCC,WAAW,EAAE,+BAA+B;MAC5CC,YAAY,EAAE,yBAAyB;MACvCC,gBAAgB,EAAE,6BAA6B;MAC/CC,kBAAkB,EAAE,uBAAuB;MAC3CC,gBAAgB,EA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