From 268d324350a5a639d4bc49dafd378d6d04f93f9c Mon Sep 17 00:00:00 2001 From: Edmund Hung Date: Wed, 11 Dec 2024 17:19:19 +0000 Subject: [PATCH] check if token is changed --- tests/integrations/sync-form-state.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integrations/sync-form-state.spec.ts b/tests/integrations/sync-form-state.spec.ts index e9fdbe88..7d5dfa24 100644 --- a/tests/integrations/sync-form-state.spec.ts +++ b/tests/integrations/sync-form-state.spec.ts @@ -3,6 +3,7 @@ import { getPlayground } from './helpers'; function getFieldset(form: Locator) { return { + token: form.locator('[name="token"]'), text: form.locator('[name="text"]'), textarea: form.locator('[name="textarea"]'), select: form.locator('[name="select"]'), @@ -27,6 +28,9 @@ async function assertFieldsetValue( ) { const fieldset = getFieldset(form); + // This check if Conform omit the token field based on the shouldSyncElement option + await expect(fieldset.token).toHaveValue('1-0624770'); + await expect(fieldset.text).toHaveValue(value.text); await expect(fieldset.textarea).toHaveValue(value.textarea); await expect(fieldset.select).toHaveValue(value.select);