From 3b2e99ac408588e4c2d1937bb82b957d2eb22db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Ign=C3=A1cio=20Fontoura=20Solla?= Date: Thu, 23 Jul 2026 21:39:14 -0300 Subject: [PATCH] Type municipalities e2e consent fixture with Payload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the `Function`-typed payload param (no-unsafe-function-type lint error blocking pre-push) with `Pick`, which also surfaced missing Lexical `version` fields in the consent fixture — now added. --- tests/e2e/campaignMunicipalities.e2e.spec.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/e2e/campaignMunicipalities.e2e.spec.ts b/tests/e2e/campaignMunicipalities.e2e.spec.ts index 9db0f8be..694b44c5 100644 --- a/tests/e2e/campaignMunicipalities.e2e.spec.ts +++ b/tests/e2e/campaignMunicipalities.e2e.spec.ts @@ -1,3 +1,5 @@ +import type { Payload } from 'payload' + import { SUPPORTER_REGISTRATION_CONSENT_KEY } from '../../src/utilities/campaignConsent.js' import { expect, test } from './fixtures/campaignE2EFixtures.js' @@ -8,7 +10,7 @@ import { expect, test } from './fixtures/campaignE2EFixtures.js' */ const ensureSupporterRegistrationConsent = async (campaign: { - payload: { find: Function; create: Function } + payload: Pick }) => { const existing = await campaign.payload.find({ collection: 'consent', @@ -29,7 +31,14 @@ const ensureSupporterRegistrationConsent = async (campaign: { children: [ { type: 'paragraph', - children: [{ type: 'text', text: 'Consentimento de cadastro de apoiador (E2E).' }], + version: 1, + children: [ + { + type: 'text', + version: 1, + text: 'Consentimento de cadastro de apoiador (E2E).', + }, + ], }, ], direction: 'ltr',