Skip to content

Commit

Permalink
check if token is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Dec 11, 2024
1 parent 28b2f28 commit 268d324
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integrations/sync-form-state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'),
Expand All @@ -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);
Expand Down

0 comments on commit 268d324

Please sign in to comment.